view 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
line wrap: on
line source
1 #!/bin/sh
3 TARGET_DIR=`date +%Y.%m.%d-%H.%M`
5 mkdir /home/r/proj/6.034/archive/$TARGET_DIR
7 cd /home/r/proj/6.034/archive/$TARGET_DIR
10 python2 /home/r/bin/gcp.py -f csv -p 68686960606- bortreb@gmail.com:/all/all/6.034* .
11 python2 /home/r/bin/gcp.py -p 68686960606- bortreb@gmail.com:/all/all/6.034* .
13 echo "Backup tester DB"
15 mysqldump -h sql.mit.edu -ptU45~br8nz -u \
16 6.034 6034+fall12_tester > ./6.034-tester.sql
18 echo "Backup wiki DB"
20 mysqldump -h sql.mit.edu -ptU45~br8nz -u \
21 6.034 6034+fall12_wiki > ./6.034-wiki.sql
23 echo "Backup all-databases"
25 mysqldump -h sql.mit.edu -ptU45~br8nz -u \
26 6.034 --all-databases > ./6.034-all-databases.sql
28 du -shc ./*