diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-05-07 23:25:48 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-05-07 23:25:48 +0200 |
commit | 667b67ddac7ededf514d08888423791a99a66f3f (patch) | |
tree | 853ec06858cdb841df6a59b1d5e39e9f93a993bb /backup2dsm | |
download | scripts-667b67ddac7ededf514d08888423791a99a66f3f.tar.gz scripts-667b67ddac7ededf514d08888423791a99a66f3f.tar.bz2 scripts-667b67ddac7ededf514d08888423791a99a66f3f.zip |
first commit
Diffstat (limited to 'backup2dsm')
-rwxr-xr-x | backup2dsm | 25 |
1 files changed, 25 insertions, 0 deletions
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 |