Y
Y
yagtec2015-12-14 17:30:51
linux
yagtec, 2015-12-14 17:30:51

What is the correct way to write exceptions for rsync\rsnapshot?

Hey!
Can you please tell me how to correctly set exclusions for some folders / files?
With the help of rsnapshot I'm trying to backup the user's folder separately (so far in it).

snapshot_root	/home/user/backup/
exclude_file	/home/user/.config/rsnapshot.exclude
backup	/home/user/	snapshot/

I've already tried this way and that, I understand that I'm being wise with the ways.
For example, I want not to pick up a heavy folder with downloads, I tried the options:
- /home/*/downloads/
- /home/**/downloads/
- /home/user/*/downloads/
- /user/downloads
- downloads/ 
- /downloads/

But anyway, the entire /home/user folder is synced, for the life of me :(
Perhaps one of the options is correct, but I'm afraid that I'm missing it, or I'm setting the path incorrectly in the backup directive.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SquareWheel, 2015-12-14
@SquareWheel

For example so.

rsync -avz '-e shh ' [email protected]:/home/  --exclude="downloads*" /somefolder/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question