This is a Bash script, for websit manager to backup site files and database, and set the number of days to retain, sync to dropbox.
Default working directory of this manual can be modify.
/home/backup/
Please visit this page to view detailed configuration process.
Click here to open the Dropbox registration page, enter a name, password, email to complete the registration.
After registration is complete, you will jump to the Dropbox download page to download the the Dropbox client installation program to install.
Open the developers page https://www.dropbox.com/developers, Click "My Apps" on the left to enter the apps list, create a new app, then get the App key and the App secret.
Dropbox Uploader is a BASH script which can be used to upload, download, delete or list files from Dropbox, an online file sharing, synchronization and backup service.
curl -o dropbox_uploader.tar.gz https://nodeload.github.com/andreafabrizi/Dropbox-Uploader/tar.gz/master tar xvzf dropbox_uploader.tar.gz mv Dropbox-Uploader-master/dropbox_uploader.sh ./ rm -rf Dropbox-Uploader-master dropbox_uploader.tar.gz
chmod a+x dropbox_uploader.sh ./dropbox_uploader.sh # App key: # App secret: # Access level you have chosen, App folder or Full Dropbox [a/f]: > Access token Setup completed!
Dropbox Uploader configuration file will be save in "~/.dropbox_uploader"
curl -o erBackup.tar.gz https://github.com/everright/erBashBackupSyncToDropbox/archive/master.tar.gz tar xvzf erBackup.tar.gz mv erBashBackupSyncToDropbox/erBackup.sh ./ rm -rf erBashBackupSyncToDropbox erBackup.tar.gz
chmod a+x erBackup.sh
Edit the bash file, and replace these settings
EMAIL_TO="[email protected]" #Your e-mail address, multiple separated by commas DROPBOX_DIR="" #Dropbox storage folder, left blank is / DROPBOX_UPLOADER="/test/dropbox/dropbox_uploader.sh" #Dropbox Uploader bash script BACKUP_SRC="/test/dropbox/files /test/dropbox/test.sh" #Backup files and folders, multiple separated by a space BACKUP_DST="/test/dropbox/backup" #Local storage backup folder MYSQL_SERVER="localhost" #MySQL Host MYSQL_USER="mysqluser" #MySQL Username MYSQL_PASS="userpassword" #MySQL Password MYSQL_DUMP="/usr/local/mysql5.5.10/bin/mysqldump" #mysqldump command DATABASES="wp_everright wp_everright_cn" #Backup databases, multiple separated by a space LIMIT_DAYS=7 #The number of days to retain the backup files
crontab -e 0 0 * * * /bin/bash /home/backup/erBackup.sh&
startLevel : h2 tocScroll : false #disable toc item scroll on clicked
This is a Bash script, for websit manager to backup site files and database, and set the number of days to retain, sync to dropbox.
Default working directory of this manual can be modify.
/home/backup/
Please visit this page to view detailed configuration process.
Click here to open the Dropbox registration page, enter a name, password, email to complete the registration.
After registration is complete, you will jump to the Dropbox download page to download the the Dropbox client installation program to install.
Open the developers page https://www.dropbox.com/developers, Click "My Apps" on the left to enter the apps list, create a new app, then get the App key and the App secret.
Dropbox Uploader is a BASH script which can be used to upload, download, delete or list files from Dropbox, an online file sharing, synchronization and backup service.
curl -o dropbox_uploader.tar.gz https://nodeload.github.com/andreafabrizi/Dropbox-Uploader/tar.gz/master tar xvzf dropbox_uploader.tar.gz mv Dropbox-Uploader-master/dropbox_uploader.sh ./ rm -rf Dropbox-Uploader-master dropbox_uploader.tar.gz
chmod a+x dropbox_uploader.sh ./dropbox_uploader.sh # App key: # App secret: # Access level you have chosen, App folder or Full Dropbox [a/f]: > Access token Setup completed!
Dropbox Uploader configuration file will be save in "~/.dropbox_uploader"
curl -o erBackup.tar.gz https://github.com/everright/erBashBackupSyncToDropbox/archive/master.tar.gz tar xvzf erBackup.tar.gz mv erBashBackupSyncToDropbox/erBackup.sh ./ rm -rf erBashBackupSyncToDropbox erBackup.tar.gz
chmod a+x erBackup.sh
Edit the bash file, and replace these settings
EMAIL_TO="[email protected]" #Your e-mail address, multiple separated by commas DROPBOX_DIR="" #Dropbox storage folder, left blank is / DROPBOX_UPLOADER="/test/dropbox/dropbox_uploader.sh" #Dropbox Uploader bash script BACKUP_SRC="/test/dropbox/files /test/dropbox/test.sh" #Backup files and folders, multiple separated by a space BACKUP_DST="/test/dropbox/backup" #Local storage backup folder MYSQL_SERVER="localhost" #MySQL Host MYSQL_USER="mysqluser" #MySQL Username MYSQL_PASS="userpassword" #MySQL Password MYSQL_DUMP="/usr/local/mysql5.5.10/bin/mysqldump" #mysqldump command DATABASES="wp_everright wp_everright_cn" #Backup databases, multiple separated by a space LIMIT_DAYS=7 #The number of days to retain the backup files
crontab -e 0 0 * * * /bin/bash /home/backup/erBackup.sh&
startLevel : h2 numbered : false #disable numbered tocClass : er_toc er_toc_disc
This is a Bash script, for websit manager to backup site files and database, and set the number of days to retain, sync to dropbox.
Default working directory of this manual can be modify.
/home/backup/
Please visit this page to view detailed configuration process.
Click here to open the Dropbox registration page, enter a name, password, email to complete the registration.
After registration is complete, you will jump to the Dropbox download page to download the the Dropbox client installation program to install.
Open the developers page https://www.dropbox.com/developers, Click "My Apps" on the left to enter the apps list, create a new app, then get the App key and the App secret.
Dropbox Uploader is a BASH script which can be used to upload, download, delete or list files from Dropbox, an online file sharing, synchronization and backup service.
curl -o dropbox_uploader.tar.gz https://nodeload.github.com/andreafabrizi/Dropbox-Uploader/tar.gz/master tar xvzf dropbox_uploader.tar.gz mv Dropbox-Uploader-master/dropbox_uploader.sh ./ rm -rf Dropbox-Uploader-master dropbox_uploader.tar.gz
chmod a+x dropbox_uploader.sh ./dropbox_uploader.sh # App key: # App secret: # Access level you have chosen, App folder or Full Dropbox [a/f]: > Access token Setup completed!
Dropbox Uploader configuration file will be save in "~/.dropbox_uploader"
curl -o erBackup.tar.gz https://github.com/everright/erBashBackupSyncToDropbox/archive/master.tar.gz tar xvzf erBackup.tar.gz mv erBashBackupSyncToDropbox/erBackup.sh ./ rm -rf erBashBackupSyncToDropbox erBackup.tar.gz
chmod a+x erBackup.sh
Edit the bash file, and replace these settings
EMAIL_TO="[email protected]" #Your e-mail address, multiple separated by commas DROPBOX_DIR="" #Dropbox storage folder, left blank is / DROPBOX_UPLOADER="/test/dropbox/dropbox_uploader.sh" #Dropbox Uploader bash script BACKUP_SRC="/test/dropbox/files /test/dropbox/test.sh" #Backup files and folders, multiple separated by a space BACKUP_DST="/test/dropbox/backup" #Local storage backup folder MYSQL_SERVER="localhost" #MySQL Host MYSQL_USER="mysqluser" #MySQL Username MYSQL_PASS="userpassword" #MySQL Password MYSQL_DUMP="/usr/local/mysql5.5.10/bin/mysqldump" #mysqldump command DATABASES="wp_everright wp_everright_cn" #Backup databases, multiple separated by a space LIMIT_DAYS=7 #The number of days to retain the backup files
crontab -e 0 0 * * * /bin/bash /home/backup/erBackup.sh&