Added example of backup command using rsync

This commit is contained in:
Michele Cereda
2022-07-03 00:25:53 +02:00
parent 2cc5cf8f6e
commit 72fd2e2d64

11
examples/rsync.backup.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
rsync /data/ nas.lan:/data/ \
--archive --copy-links --protect-args --delete \
--acls --xattrs --fake-super \
--partial --append-verify \
--compress --sparse --no-motd \
--human-readable --no-inc-recursive --info="progress2" -vv \
--exclude ".terraform*" --exclude "obsidian" \
--backup --backup-dir "changes_$(date +'%F_%H-%m-%S')" --exclude "changes_*" \
| grep -Ev -e uptodate -e "/$"