View previous topic :: View next topic |
Author |
Message |
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Sun Nov 19, 2006 4:56 pm Post subject: rsync question. |
|
|
Ok.. Im trying to write my own backup script using rsync, and im having a little difficulty understanding how to backup multiple directories without using a loop.
for instance, I would like to backup /etc and /home/thorpe, however I would like to skip /home/thorpe.mozilla and /home/thorpe.thumbnails.
Ive tried....
Code: |
rsync -va --delete --delete-excluded --include="/etc /home/thorpe" --exclude="/home/thorpe.mozilla /home/thorpe.thumbnails"
|
but its just not working. Anyone give me a push? Im reading the manual entry but just not getting it.
Also, would there be a way to backup /home but skip say /home/user/tmp for each user? Something like /home/*/tmp ?
Thanks.
PS: Im not interested in using files as it seems --include-from and --exclude-from do. _________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Sun Nov 19, 2006 5:29 pm Post subject: |
|
|
Moved from Portage & Programming to Other Things Gentoo. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
limn l33t
Joined: 13 May 2005 Posts: 997
|
Posted: Sun Nov 19, 2006 5:56 pm Post subject: |
|
|
Instead of
Code: | --include="/etc /home/thorpe" |
try
Code: | --include="/etc" --include="/home/thorpe" |
Same with --exclude.
Adding
will exclude subdirectories named tmp. |
|
Back to top |
|
|
|