annotate scripts/backup-push @ 89:0c3e63de292c

Small updates to the About page.
author John "Elwin" Edwards
date Fri, 06 Sep 2019 09:57:35 -0400
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