Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rsync --exclude driving me crazy
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Tue Dec 21, 2004 3:19 pm    Post subject: rsync --exclude driving me crazy Reply with quote

I'm using rsnapshot to backup a server to a second harddisk. The second harddisk is mounted under /backup. I want to backup all of /, except for /backup (would be funny to do that I guess) and /tmp. So I start rsync (which itself works fine) with --exclude=backup/ --exclude=tmp/. But rsync still wants to backup /tmp and /backup! I also tried it with --exclude=/backup or --exclude=/backup/ etc. but it didn't help, whatever I try, rsync always also wants to read the contents of /backup and /tmp. What am I doing wrong here? The rsnapshot config file is OK, and I can see during the verbose output that the --exclude params are given to rsync. Any ideas?

Tom
Back to top
View user's profile Send private message
apfritts
Apprentice
Apprentice


Joined: 11 Sep 2004
Posts: 156
Location: Mountain View, California, USA

PostPosted: Tue Dec 21, 2004 3:28 pm    Post subject: idea Reply with quote

have you tried to do individual directories?
Back to top
View user's profile Send private message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Tue Dec 21, 2004 3:32 pm    Post subject: Reply with quote

You mean backup /etc to /backup/etc, /usr to /backup/usr and so forth? Well it's an idea, a little more complicated of course but I'll try it :-)
Back to top
View user's profile Send private message
apfritts
Apprentice
Apprentice


Joined: 11 Sep 2004
Posts: 156
Location: Mountain View, California, USA

PostPosted: Tue Dec 21, 2004 3:35 pm    Post subject: Reply with quote

:) yea....but you can always write a quick script to do it :D :P

that is how i had to do if when i made a backup of my system...except i just used cp instead of rsnapshot....hhmm
Back to top
View user's profile Send private message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Tue Dec 21, 2004 3:45 pm    Post subject: Reply with quote

Ok I just edited rsnapshot.conf accordingly and see what happens ... still running ... ... ... takes a long time :-) ... I need a faster HD ... ... making myself a coffee ... drinking the coffee ... drinking the second coffee ... damn .. and it WORKS! Thank you!. Well I'm still interested why it didn't work in the first way, but I think I know why. Rsnapshot expects to make a backup under the backup-root (/backup in my case), then hostname, then daily.0. So the path looks like /backup/hostname/daily.0 But I didn't want the hostname, so I told rsnapshot to not backup to hostname/ but to ./ and this may have confused rsync. Now, with your method, I still have --exclude=portage/ and this works.

Thanks a lot!

Tom
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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