Mercurial > hg > rlgallery-misc
changeset 90:44cf8c7c2c7a
Rearrange some backup locations.
author | John "Elwin" Edwards |
---|---|
date | Fri, 06 Sep 2019 14:26:48 -0400 |
parents | 0c3e63de292c |
children | d417016bbf73 |
files | scripts/backup-push |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/backup-push Fri Sep 06 09:57:35 2019 -0400 +++ b/scripts/backup-push Fri Sep 06 14:26:48 2019 -0400 @@ -2,13 +2,21 @@ # A backup script for high score lists, log files, saved games, and ttyrecs. # Run from cron. Set up SSH keys to BACKUPACCT first. -SOURCE='/var/dgl/var/games/roguelike/' BACKUPACCT='rlgbackup@icemonster.rlgallery.org' -NEWDIR=`date +%Y.%m.%d-%H.%M.%S` +NEWDIR=$(date +%Y.%m.%d-%H.%M.%S) +GAMESOURCE='/var/dgl/var/games/roguelike/' TTYRECSRC=/var/dgl/dgldir/ttyrec/ -TTYRECDEST="$BACKUPACCT:ttyrecs" -rsync -rqz "$SOURCE" "$BACKUPACCT:games/$NEWDIR" +if [ -e /etc/rlg-testing ] +then + GAMEDEST="$BACKUPACCT:testing/games/$NEWDIR" + TTYRECDEST="$BACKUPACCT:testing/ttyrecs" +else + GAMEDEST="$BACKUPACCT:production/games/$NEWDIR" + TTYRECDEST="$BACKUPACCT:production/ttyrecs" +fi + +rsync -rqz "$GAMESOURCE" "$GAMEDEST" rsync -rqz -pt "$TTYRECSRC" "$TTYRECDEST" exit