Change destination root?

Max Kipness max at assuredata.com
Sun Dec 16 19:40:12 GMT 2007



Matt McCutchen-7 wrote:
> 
> On Sun, 2007-12-16 at 07:53 -0800, Max Kipness wrote:
>> I've got a source directory of /data with several subdirectories such as
>> subdir1/ subdir2/ subdir3/ , etc. I'd like to rsync these to a different
>> host under directory /backup, so that I have paths /backup/subdir1,
>> /backup/subdir2, etc. I also need to be able to use the option
>> --files-from.
>> 
>> So, a source dir of /data on host1, with a --files-from file containing:
>> 
>> subdir1
>> subdir2
>> subdir3
>> 
>> rsyncing to host2 and ending up with the file structure:
>> 
>> /backup/subdir1
>> /backup/subdir2
>> /backup/subdir3
>> 
>> Basically, I'd like to substitute /var for /backup. Is this possible?
> 
> This should just be a matter of changing the destination in your rsync
> command line from "/backup" to "/var".  The original command (assuming a
> push) would look like:
> 
> rsync [OPTION...] -r --files-from=THE-FF-LIST /data/ host2:/backup/
> 
> The new command would look like:
> 
> rsync [OPTION...] -r --files-from=THE-FF-LIST /data/ host2:/var/
> 
> Am I missing something?
> 
> Matt
> 
> -- 
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
> 
> 

I apologize, I explained it wrong. Let me try to explain it correctly with a
different example.

host1.domain.com 
Source Directory: /data

-files-from file

c/contents
c/contents

I want this to end up on host2.domain.com as

/backup/x/contents
/backup/x/contents

So it's not the root thats the problem but the next level down. I need to be
able to list the paths to be backed up via -files-from, but yet need c to
end up as x on the destination.

Thanks,
Max


-- 
View this message in context: http://www.nabble.com/Change-destination-root--tp14362791p14365146.html
Sent from the Samba - rsync mailing list archive at Nabble.com.



More information about the rsync mailing list