[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Automaticly backup

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 7
Thread images: 1

File: no-cloud.png (216KB, 599x483px) Image search: [Google]
no-cloud.png
216KB, 599x483px
Hello /g
Here a free backup bash script to upload an gpg encrypted zip file of your web folder to mega

Feel free to improve this script and share it
#!/bin/sh

# How to backup automaticly your web site to mega with megatools
apt-get update && apt-get install -y build-essential pkg-config libglib2.0-dev libssl-dev libcurl4-openssl-dev libfuse-dev glib-networking zip unzip wget curl gzip
wget https://megatools.megous.com/builds/megatools-1.9.97.tar.gz
cd megatools-1.9.97

./configure && make && make install && ldconfig

nano ~/.megarc
[Login]
Username = Your_Mega_Username
Password = Your_Mega_Password

#CREATE USER 'saver'@'%' IDENTIFIED VIA mysql_native_password USING '***';GRANT ALL PRIVILEGES ON *.* TO 'saver'@'%' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;

# backup web folder
cd /var/www/html/

#remove zip file
rm bkup_var_web.zip
rm bkup_var_web.zip.asc
rm dump.sql.zip
#pass bdd MYSQL
passmysql='CHANGEMETOYOURBDDPASSWORD'
mail='[email protected]'
# dump bdd

mysqldump --user=saver --password=$passmysql --all-databases | gzip > dump.sql.zip

# create zip file
zip -9 -r bkup_var_web.zip *

# encrypt

gpg2 -ae --recipient $mail bkup_var_web.zip

#delete old bkup
megarm /Root/bkup_var_web.zip
#upload new backup
megaput bkup_var_web.zip.asc

#remove zip file
rm bkup_var_web.zip
rm bkup_var_web.zip.asc
rm dump.sql.zip
>>
>>59507492
This is garbage and I'm laughing at you right now
If you're feeling shame that's a good thing
You should never post again on this board
>>
>>59507492
>>>/x/
>>
>>59507492
I already have one of these.
You should gzip the file first.
>>
>>59507643
You're really honest and I appreciate that. Now show your solution.
>>
>>59508852
You did not even heed his advice to stop posting, and you have the audacity to ask him to post his solution?! Insolent fool.
>>
>>59509081
Well I'm not OP
Thread posts: 7
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.