From 66fffb49aae0075ff053ab66878951422edb0e44 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Tue, 25 Jul 2023 20:26:51 +0200 Subject: [PATCH] chore: .rsync-filter and command examples for osx --- examples/dotfiles/.rsync-filter | 8 ++++++++ examples/rsync.backup-command.sh | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 examples/dotfiles/.rsync-filter diff --git a/examples/dotfiles/.rsync-filter b/examples/dotfiles/.rsync-filter new file mode 100644 index 0000000..fa7667f --- /dev/null +++ b/examples/dotfiles/.rsync-filter @@ -0,0 +1,8 @@ +- .DS_Store +- .localized +- .obsidian +- .terraform* +- #recycle +- @eaDir +- changes_* ++ ** diff --git a/examples/rsync.backup-command.sh b/examples/rsync.backup-command.sh index cf32c2c..aa2166b 100644 --- a/examples/rsync.backup-command.sh +++ b/examples/rsync.backup-command.sh @@ -9,3 +9,19 @@ rsync /data/ nas.lan:/data/ \ --exclude ".terraform*" --exclude "obsidian" \ --backup --backup-dir "changes_$(date +'%F_%H-%m-%S')" --exclude "changes_*" \ | grep -Ev -e uptodate -e "/$" + + +# cat '.rsync-filter' +# - .DS_Store +# - .localized +# - .obsidian +# - .terraform* +# - #recycle +# - @eaDir +# - changes_* +# + ** +/opt/homebrew/bin/rsync 'Data' 'nas.lan:Data' \ + -abchszAFLSUX \ + --partial --append-verify --fake-super --no-motd \ + --delete --backup-dir "changes_$(date +'%F_%H-%m-%S')" \ + --no-inc-recursive --info="progress2"