Skip to content

Commit

Permalink
#6 shell script to produce timestamped backups
Browse files Browse the repository at this point in the history
  • Loading branch information
jim618 committed Jun 1, 2015
1 parent e8c2280 commit 19631a1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions create-backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# Create a backup of the BRIT matcher store
# All files in the store directory are added to a datestamped zip file
# The backup file will typically be: backup-2015-06-01-17-43-02.zip
# and will be stored in a directory /var/brit/matcher/backup
mkdir /var/brit/matcher/backup
echo Creating zip file containing contents of /var/brit/matcher/store...
FILENAME="/var/brit/matcher/backup/backup-`date '+%Y-%m-%d-%H-%M-%S'`.zip"
zip -r $FILENAME /var/brit/matcher/store
echo
echo Backup created:
ls -l $FILENAME

0 comments on commit 19631a1

Please sign in to comment.