PDA

View Full Version : Rsync Exclude Question


vibranze
7th June 2007, 09:01
Hi Falko,

Thanks for the great article of Mirroring your website with Rsync. I have a question on the exclude parameter, you mentioned "exclude="**/abc" mean that it will exclude /var/www/abc.

If I want to rsync /data/* directory and want to exclude /data/user1/Temp, so what should I put in exclude, should I put "exclude=**/Temp" or "excluded=*/Temp"? Is the * go by level of folders?

And let's say if the target directory is already have "Temp" directory from the first rsync, will it be deleted if I exclude the Temp on the next rsync?

Kindly advise.

Cheers,
Vibranze

falko
8th June 2007, 19:18
Hi Falko,

Thanks for the great article of Mirroring your website with Rsync. I have a question on the exclude parameter, you mentioned "exclude="**/abc" mean that it will exclude /var/www/abc.

If I want to rsync /data/* directory and want to exclude /data/user1/Temp, so what should I put in exclude, should I put "exclude=**/Temp" or "excluded=*/Temp"? Is the * go by level of folders?I'd use exclude=/data/user1/Temp

And let's say if the target directory is already have "Temp" directory from the first rsync, will it be deleted if I exclude the Temp on the next rsync?

Not sure about this, you'd have to try it.

sjau
9th June 2007, 20:20
the Temp folder will be deleted if you also pass the --delete parameter...

and if you want to exclude more than one thing you could use

exclude_from="/path/to/exclude_file"


and add stuff like this:


/root
/usr
/tmp
/var/lib/
/var/log/