Skip to content

Instantly share code, notes, and snippets.

@githubber githubber/ forked from n2j3/
Created Sep 16, 2016

What would you like to do?
simplified backup script utilising Fabrizi's dropbox uploader. Based on Dave Hope's backup script ( )
BACKUP_SRC="/root /etc /home"
MYSQL_USER="mysql username"
MYSQL_PASS="mysql password"
# Stop editing here.
NOW=$(date +"%Y.%m.%d")
# Backup files.
mysqldump -u $MYSQL_USER -h $MYSQL_SERVER -p$MYSQL_PASS --all-databases > "$NOW-Databases.sql"
tar cfz "$DESTFILE" $BACKUP_SRC "$NOW-Databases.sql"
#upload to dropbox. make sure the following line points to the correct location
/root/ upload "$DESTFILE"
#remove temporary files
rm -f "$NOW-Databases.sql" "$DESTFILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.