From 667b67ddac7ededf514d08888423791a99a66f3f Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Wed, 7 May 2025 23:25:48 +0200 Subject: first commit --- backup2dsm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 backup2dsm diff --git a/backup2dsm b/backup2dsm new file mode 100755 index 0000000..f677a6f --- /dev/null +++ b/backup2dsm @@ -0,0 +1,25 @@ +#!/bin/sh + +# Diskstation isn't always on, so run this from the command line rather than cron. +# +# To avoid errors devices and links are skipped, permissions, times, +# group and owner are not written and files are compared by size only. +# +# Ssh is configured with ssh-copy-id for passwordless access +# and host:port details in .ssh/config +# +# Note: I set the rsync options on the diskstation but had to +# chmod 755 my diskstation's home folder before passwordless ssh worked + +rsync -r --no-D --no-t --no-o --no-g --no-p \ + --size-only \ + --delete \ + --update \ + --exclude .cache/ \ + --exclude Downloads/ \ + --exclude tmp/ \ + --exclude .local/share/Trash/ \ + --exclude .wine \ + --info=progress2 \ + --stats \ + /home/philip philip@dsm:backup-X220 -- cgit v1.2.3