Mercurial > backup
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/backup-6.034.sh Mon Jun 10 08:48:20 2013 -0400 1.3 @@ -0,0 +1,29 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +TARGET_DIR=`date +%Y.%m.%d-%H.%M` 1.7 + 1.8 +mkdir /home/r/proj/6.034/archive/$TARGET_DIR 1.9 + 1.10 +cd /home/r/proj/6.034/archive/$TARGET_DIR 1.11 + 1.12 + 1.13 +python2 /home/r/bin/gcp.py -f csv -p 68686960606- bortreb@gmail.com:/all/all/6.034* . 1.14 +python2 /home/r/bin/gcp.py -p 68686960606- bortreb@gmail.com:/all/all/6.034* . 1.15 + 1.16 +echo "Backup tester DB" 1.17 + 1.18 +mysqldump -h sql.mit.edu -ptU45~br8nz -u \ 1.19 + 6.034 6034+fall12_tester > ./6.034-tester.sql 1.20 + 1.21 +echo "Backup wiki DB" 1.22 + 1.23 +mysqldump -h sql.mit.edu -ptU45~br8nz -u \ 1.24 + 6.034 6034+fall12_wiki > ./6.034-wiki.sql 1.25 + 1.26 +echo "Backup all-databases" 1.27 + 1.28 +mysqldump -h sql.mit.edu -ptU45~br8nz -u \ 1.29 + 6.034 --all-databases > ./6.034-all-databases.sql 1.30 + 1.31 +du -shc ./* 1.32 +