annotate scripts/backup-push @ 82:14850d283b54

Update information about ttyrec terminal size.
author John "Elwin" Edwards
date Wed, 07 Feb 2018 20:54:48 -0500
parents ea014ed97581
children 44cf8c7c2c7a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
79
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
1 #!/bin/sh
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
2 # A backup script for high score lists, log files, saved games, and ttyrecs.
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
3 # Run from cron. Set up SSH keys to BACKUPACCT first.
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
4
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
5 SOURCE='/var/dgl/var/games/roguelike/'
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
6 BACKUPACCT='rlgbackup@icemonster.rlgallery.org'
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
7 NEWDIR=`date +%Y.%m.%d-%H.%M.%S`
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
8 TTYRECSRC=/var/dgl/dgldir/ttyrec/
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
9 TTYRECDEST="$BACKUPACCT:ttyrecs"
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
10
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
11 rsync -rqz "$SOURCE" "$BACKUPACCT:games/$NEWDIR"
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
12 rsync -rqz -pt "$TTYRECSRC" "$TTYRECDEST"
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
13
ea014ed97581 Add a script for making backups.
John "Elwin" Edwards
parents:
diff changeset
14 exit