LinuxQuestions.org
Review your favorite Linux distribution.
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 05-05-2018, 04:26 PM   #1
jjjman321
LQ Newbie
 
Registered: May 2018
Posts: 2

Rep: Reputation: Disabled
rsync behaviour


Hi - trying to copy one UnRAID server to another via rsync, using this command:

rsync -av --delete root@192.168.1.200:/mnt/user/Media/ /mnt/user/Media/

"Media" is a user share spanning multiple drives on both computers with a directory tree underneath it.

My issue is that rsync is pre-creating all the subdirectories on the first destination drive before copying any data, forcing all files to try to fit on one drive (which they won't).

Is there a switch or option for rsync to delay creating each destination directory until data is written into that directory? That way, UnRAID would distribute the files to various drives as defined in the share's definition.

Thanks!
 
Old 05-05-2018, 06:08 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,731

Rep: Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130
Not directly. My advice would be to pre-create the tree with the folders distributed and mounted as you desire, then use rsync to populate the tree with the files. We are rather bending the intent of rsync to match your purpose in a way it was not intended.

That said, there IS a way to change the order in which it does certain things. I doubt it will help you much, but examine the command line options mentioned on the man page carefully for detail.
 
1 members found this post helpful.
Old 05-06-2018, 07:01 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,480

Rep: Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997
I think --delete-during might work.
 
Old 05-06-2018, 09:46 PM   #4
jjjman321
LQ Newbie
 
Registered: May 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
I think --delete-during might work.
Thanks - I tried that, but that appears to control wether deleted source files are deleted in the destination. My issue is during the initial sync, when all the destination directories are created the first time.

I wish rsync created a directory, populated that directory, then created the next directory, rather than create all the destination directories first before copying the actual files.
 
Old 05-07-2018, 04:54 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,480

Rep: Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997
I think the issue is with how rsync handles file systems. Your share is constructed suchwise that rsync views it as several separate file systems. If you can find a way to make it look like one file system, rsync will probably work.
 
  


Reply


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
Odd rsync behaviour (Ubuntu) funkytwig Linux - Newbie 8 07-31-2017 06:48 PM
Random, very odd behaviour crashing rsync switch10 Linux - Desktop 4 04-14-2010 02:19 AM
weird rsync -avz behaviour centguy Linux - Software 3 02-02-2010 12:14 AM
rsync - inefficient behaviour? Unclesmiff Linux - Software 4 01-02-2008 12:13 PM
is this normal rsync behaviour? nass Slackware 5 05-03-2007 02:40 PM

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

All times are GMT -5. The time now is 07:03 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