view backup-6.034.sh @ 26:14410daf5190 tip

get makefile.
author Robert McIntyre <rlm@mit.edu>
date Thu, 29 Jan 2015 20:51:17 -0800
parents d3b029607539
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 ./*