79
|
1 #!/bin/sh
|
|
2 # A backup script for high score lists, log files, saved games, and ttyrecs.
|
|
3 # Run from cron. Set up SSH keys to BACKUPACCT first.
|
|
4
|
|
5 BACKUPACCT='rlgbackup@icemonster.rlgallery.org'
|
90
|
6 NEWDIR=$(date +%Y.%m.%d-%H.%M.%S)
|
|
7 GAMESOURCE='/var/dgl/var/games/roguelike/'
|
79
|
8 TTYRECSRC=/var/dgl/dgldir/ttyrec/
|
|
9
|
90
|
10 if [ -e /etc/rlg-testing ]
|
|
11 then
|
|
12 GAMEDEST="$BACKUPACCT:testing/games/$NEWDIR"
|
|
13 TTYRECDEST="$BACKUPACCT:testing/ttyrecs"
|
|
14 else
|
|
15 GAMEDEST="$BACKUPACCT:production/games/$NEWDIR"
|
|
16 TTYRECDEST="$BACKUPACCT:production/ttyrecs"
|
|
17 fi
|
|
18
|
|
19 rsync -rqz "$GAMESOURCE" "$GAMEDEST"
|
79
|
20 rsync -rqz -pt "$TTYRECSRC" "$TTYRECDEST"
|
|
21
|
|
22 exit
|