changeset 79:ea014ed97581

Add a script for making backups.
author John "Elwin" Edwards
date Fri, 13 Jan 2017 17:36:23 -0500
parents be4c54a9e51d
children 716f8305d412
files scripts/backup-push
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/backup-push	Fri Jan 13 17:36:23 2017 -0500
@@ -0,0 +1,14 @@
+#!/bin/sh
+# 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`
+TTYRECSRC=/var/dgl/dgldir/ttyrec/
+TTYRECDEST="$BACKUPACCT:ttyrecs"
+
+rsync -rqz "$SOURCE" "$BACKUPACCT:games/$NEWDIR"
+rsync -rqz -pt "$TTYRECSRC" "$TTYRECDEST"
+
+exit