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
#!/bin/bash | |
# Simple Backup Script (inspried by https://zarino.co.uk/post/synology-rsync-backup/) | |
rsync -a -v --log-file="/var/services/homes/admin/log/backup.$(date +%Y-%m-%d-%H%M).log" \ | |
--exclude '*@SynoResource' \ | |
--exclude '@eaDir' \ | |
--exclude '*.vsmeta' \ | |
--exclude '.DS_Store' \ | |
/volume1/data/ /volumeUSB2/usbshare/data |
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
0 22 * * * root flock -n /var/services/homes/admin/lock/backup.lock /var/services/homes/admin/bin/backup.sh |
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
#/etc/logrotate.d/backup_sh | |
/var/services/homes/admin/log/backup*.log { | |
missingok | |
} |