annotate backup-6.034.sh @ 22:d3b029607539

resurrected old backup script from 6.034.
author Robert McIntyre <rlm@mit.edu>
date Mon, 10 Jun 2013 08:48:20 -0400
parents
children
rev   line source
rlm@22 1 #!/bin/sh
rlm@22 2
rlm@22 3 TARGET_DIR=`date +%Y.%m.%d-%H.%M`
rlm@22 4
rlm@22 5 mkdir /home/r/proj/6.034/archive/$TARGET_DIR
rlm@22 6
rlm@22 7 cd /home/r/proj/6.034/archive/$TARGET_DIR
rlm@22 8
rlm@22 9
rlm@22 10 python2 /home/r/bin/gcp.py -f csv -p 68686960606- bortreb@gmail.com:/all/all/6.034* .
rlm@22 11 python2 /home/r/bin/gcp.py -p 68686960606- bortreb@gmail.com:/all/all/6.034* .
rlm@22 12
rlm@22 13 echo "Backup tester DB"
rlm@22 14
rlm@22 15 mysqldump -h sql.mit.edu -ptU45~br8nz -u \
rlm@22 16 6.034 6034+fall12_tester > ./6.034-tester.sql
rlm@22 17
rlm@22 18 echo "Backup wiki DB"
rlm@22 19
rlm@22 20 mysqldump -h sql.mit.edu -ptU45~br8nz -u \
rlm@22 21 6.034 6034+fall12_wiki > ./6.034-wiki.sql
rlm@22 22
rlm@22 23 echo "Backup all-databases"
rlm@22 24
rlm@22 25 mysqldump -h sql.mit.edu -ptU45~br8nz -u \
rlm@22 26 6.034 --all-databases > ./6.034-all-databases.sql
rlm@22 27
rlm@22 28 du -shc ./*
rlm@22 29