Register
It is currently Tue Sep 16, 2014 9:30 pm

rsync exclude-from


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sun Sep 13, 2009 12:36 pm   

Joined: Sun Sep 13, 2009 12:08 pm
Posts: 2
Hi all,

I'm trying to backup my critical files with rsync over ssh. Everything is working well with the exception, of course, of the file selection function. I've tried just about everything and am now banging my head against my desk (hence the uncomfortable dizziness, so excuse my typos.)

rsync should backup only specific folders in /home/me/business/ so, in order to include folders explicitly, I've put this in my exclude-from file:

+ business/webdeb
+ business/webdeb/
+ business/webdeb/**
- business/webdeb*
- *

This works fine, but now I want to exclude this particular directory: /home/me/business/webdeb/clients/acme/lotsojunk. Here's where rsync becomes too much of a sadistic puzzle. I've tried every combination of exclude patterns to allow everything BUT this folder to be included- to no avail, rysnc simply ignores the rules. So I need expert advice on how to do this.

I would greatly appreciate if you could provide a solution to this.

Thank you!

Alan.


Top
 Profile WWW  
 PostPosted: Sun Sep 13, 2009 2:37 pm   

Joined: Sun Sep 13, 2009 12:08 pm
Posts: 2
Alright, I was able to find the solution after much googling and even more caffeine.

It seems that I need to add this rule before the others:

- **/lotsojunk*
+ business/webdeb
+ business/webdeb/
+ business/webdeb/**
- business/webdeb*
- *

Thanks to J.W. Schultz who posted this solution somewhere back in 2004.


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 8 guests


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 post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP