Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using Rsync to do backups, best practices?

Featured Replies

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.

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.