November 26, 20196 yr Hi, I've setup rsync to run backup to another server in the house on a cron. I however wonder if you would add anything to this to make it more safe? I run this command for example: Quote rsync -avu --delete --backup --backup-dir=/mnt/disk1/Deleted --suffix="_"$(date +"%Y%m%d") --stats --exclude=.Recyc -e "ssh -i /root/.ssh/NAS-rsync-key -T -o Compression=no -x" /mnt/disk9/Temp/testing/ [email protected]:/mnt/disk1/Test/ >> /home/nasbackuplogs/logs/disk11-backup-$(date +"%Y%m%d").log With this command i do: send new files to the backup destination move files that have been deleted on source to /mnt/disk1/Deleted on the destination server create a log file of happenings on a third server through a mounted smb share. The risk i see with this is what happens if for some reason the filsystem fails and it doesn't find any files in /mnt/disk9/Temp/testing/ and it triggers it to delete / move all the files in this to /mnt/disk1/Deleted and disk1 fills up? Or if user mistakingly has deleted everything in /mnt/disk9/Temp/testing/ and the backup now deletes everything... I feel like it would be good practice to have some kind of "limiter" how many files can be deleted per session else trigger a warning and require manual intervention? Any idea how to do this in scripting? Or am i going about this the complete wrong way? Thanks.
November 27, 20196 yr For advanced rules like that, I would either use Unassigned Devices or rclone to mount the remote server as a local disk and then use more a more advanced tool. Alternatively, you might want to consider Syncthing (docker is available on CA). Has a lot more functionalities.
Archived
This topic is now archived and is closed to further replies.