Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix

  • Loading branch information...
commit a13c384b51eafa297343591372802c6c3f82098f 1 parent 46ff16b
@mizzy authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 ghe-backup.sh
View
10 ghe-backup.sh
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.