Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rsync question.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
thorpe
l33t
l33t


Joined: 09 May 2005
Posts: 618
Location: Sydney, Australia.

PostPosted: Sun Nov 19, 2006 4:56 pm    Post subject: rsync question. Reply with quote

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
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sun Nov 19, 2006 5:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Sun Nov 19, 2006 5:56 pm    Post subject: Reply with quote

Instead of
Code:
--include="/etc /home/thorpe"

try
Code:
--include="/etc" --include="/home/thorpe"

Same with --exclude.
Adding
Code:
--exclude="tmp"

will exclude subdirectories named tmp.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum