-
-
Save githubber/a0fc2b20fe8f820d23c9fac87574f33d to your computer and use it in GitHub Desktop.
Revisions
-
n2j3 revised this gist
Mar 31, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,8 +15,8 @@ DESTFILE="$BACKUP_DST/$NOW.tgz" 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 dropbox_uploader.sh location /root/dropbox_uploader.sh upload "$DESTFILE" #remove temporary files rm -f "$NOW-Databases.sql" "$DESTFILE" -
n2j3 revised this gist
Mar 30, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ DESTFILE="$BACKUP_DST/$NOW.tgz" 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. dropbox_uploader has to be in your $PATH dropbox_uploader.sh upload "$DESTFILE" #remove temporary files -
n2j3 revised this gist
Mar 30, 2013 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,16 +4,19 @@ BACKUP_DST="/tmp" MYSQL_SERVER="127.0.0.1" MYSQL_USER="mysql username" MYSQL_PASS="mysql password" #VPS_ID="vpsidentifier" # Stop editing here. NOW=$(date +"%Y.%m.%d") DESTFILE="$BACKUP_DST/$NOW.tgz" #DESTFILE="$BACKUP_DST/$VPS_ID.$NOW.tgz # 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 dropbox_uploader.sh upload "$DESTFILE" #remove temporary files rm -f "$NOW-Databases.sql" "$DESTFILE" -
n2j3 created this gist
Mar 30, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/bin/bash BACKUP_SRC="/root /etc /home" BACKUP_DST="/tmp" MYSQL_SERVER="127.0.0.1" MYSQL_USER="mysql username" MYSQL_PASS="mysql password" # # Stop editing here. NOW=$(date +"%Y.%m.%d") DESTFILE="$BACKUP_DST/$NOW.tgz" # 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" dropbox_uploader.sh upload "$DESTFILE" rm -f "$NOW-Databases.sql" "$DESTFILE"