aboutsummaryrefslogtreecommitdiff
path: root/backup2dsm
diff options
context:
space:
mode:
Diffstat (limited to 'backup2dsm')
-rwxr-xr-xbackup2dsm25
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