Initial commit
This commit is contained in:
22
backup/jobs/html.sh
Executable file
22
backup/jobs/html.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOCK="/usr/scheduler/backup-html.lock"
|
||||
if [ -f "$LOCK" ]; then
|
||||
echo "Another instance of $0 is running, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
touch $LOCK # Creates the file
|
||||
trap "rm $LOCK" EXIT
|
||||
|
||||
echo "Begining backup of HTML files..."
|
||||
|
||||
#if [ -f "/srv/backup/html/html.tar.gz" ]; then
|
||||
# echo "Rotating existing backup files..."
|
||||
# logrotate /usr/scheduler/logrotate_backup_html
|
||||
#fi
|
||||
|
||||
#echo "Creating tar gzip archive..."
|
||||
#tar -zcf /srv/backup/html/html.tar.gz /srv/data/html/
|
||||
rsnapshot daily
|
||||
echo "Backup finished!"
|
||||
Reference in New Issue
Block a user