LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2017, 01:14 PM   #1
EVL
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Rep: Reputation: Disabled
rsync from Source with Modified Directory Structure to Previous, Unmodified Destination


I would like to set up a backup system using rsync.

Problem is, I'm constantly changing the source directory structure, as I reorganize and acquire new files.

I can't do a simple cp or rsync, because it won't find the corresponding files in the target directory.

How can I tell rsync to look elsewhere in the target directory structure for a file that it doesn't find where it would be if source directory structure were unchanged.

I've checked the man page for relevant options, finding ..

-y, --fuzzy find similar file for basis if no dest file
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files

I can't quite understand whether this is even relevant ..

Suggestions? Much appreciated.

EVL

PS .. I haven't replied to those who answered my previous question because my web connection is SOO SLOWWW right now. Will respond later.
 
Old 02-05-2017, 06:46 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
https://www.linuxquestions.org/quest...llected-35954/
rsync tutorial and advices/best practices there.

Good Luck.
 
Old 02-08-2017, 11:32 PM   #3
EVL
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
thanks, Habitual, for the link

It has lots of info on rsync.

Unfortunately, it doesn't tell me how to do periodic backup/sync's of a directory whose structure may change occasionally.

Maybe there's no provision for that?

Thanks.

EVL
 
Old 02-09-2017, 12:55 AM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
There is no provision for it.
 
Old 02-09-2017, 05:23 AM   #5
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,440
Blog Entries: 3

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Quote:
Originally Posted by EVL View Post
How can I tell rsync to look elsewhere in the target directory structure for a file that it doesn't find where it would be if source directory structure were unchanged.
You'd have to find a way to calculate or predict the correct target directory structure and pass that as an environment variable to rsync
 
  


Reply

Tags
back-up, copy


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync - Only copy files that do not exist at the destination directory? wh33t Linux - Software 3 03-02-2014 06:30 PM
Rsync deleting files from destination directory Russell P Linux - Newbie 2 07-14-2011 12:07 PM
What parameter do I add to RSYNC to update modified or new files to the destination? tankman1989 Linux - Software 2 02-20-2010 07:20 PM
Changing permissions of destination directory after rsync cliff123 Linux - General 1 12-26-2007 04:09 AM
RSYNC Directory Structure? carlosinfl Linux - General 2 09-18-2007 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration