Files
wordpress-stack/backup/jobs/html.sh
2026-04-05 16:23:17 +00:00

23 lines
528 B
Bash
Executable File

#!/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!"