New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
rsync filter merge help
Hi
I'm having some trouble using filters with rsync (not include/exclude).
I want to backup /etc and /srv starting from /, and exclude every match of tmp/ folders.
This is the command:
rsync -azhP --filter='merge /etc/backup/filter.txt' / user@remote:backup
This is my filter.txt:
# exclude filter
- tmp/**
# include filter
+ /etc/**
+ /srv/**
# exclude everything else
- *
The issue is the exclude pattern, I can't get it to work with '- ', '/' or '/**'.
I get:
[sender] hiding directory etc because of pattern *
[sender] hiding directory srv because of pattern *
What's the correct filter forma to backup only these folders using rsync filters?
Thanks
Comments
You need to include the parent directories
/etc
and/srv
explicitly.