Permalink
Browse files

fix

  • Loading branch information...
mizzy committed Feb 16, 2013
1 parent 46ff16b commit a13c384b51eafa297343591372802c6c3f82098f
Showing with 7 additions and 3 deletions.
  1. +7 −3 ghe-backup.sh
View
@@ -2,6 +2,10 @@
BACKUP_DIR=/home/mizzy/backup/ghe
-ssh admin@ghe.tokyo.pb -- 'ghe-export-mysql' | gzip > $BACKUP_DIR/mysql-backup.sql.gz
-ssh admin@ghe.tokyo.pb -- 'ghe-export-redis' > $BACKUP_DIR/redis-backup.rdb
-ssh admin@ghe.tokyo.pb -- 'ghe-export-repositories' > $BACKUP_DIR/repositories-backup.tar
+ssh admin@ghe.tokyo.pb -- 'ghe-export-mysql' | gzip > $BACKUP_DIR/mysql-backup.sql.gz.tmp
+ssh admin@ghe.tokyo.pb -- 'ghe-export-redis' > $BACKUP_DIR/redis-backup.rdb.tmp
+ssh admin@ghe.tokyo.pb -- 'ghe-export-repositories' > $BACKUP_DIR/repositories-backup.tar.tmp
+
+mv $BACKUP_DIR/mysql-backup.sql.gz.tmp $BACKUP_DIR/mysql-backup.sql.gz
+mv $BACKUP_DIR/redis-backup.rdb.tmp $BACKUP_DIR/redis-backup.rdb
+mv $BACKUP_DIR/repositories-backup.tar.tmp $BACKUP_DIR/repositories-backup.tar

0 comments on commit a13c384

Please sign in to comment.