-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6 shell script to produce timestamped backups
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |