Hi, I need a small information on the way rsync copies the files . I am writing the files , links to a list file and I am passing the list file to rsync for copying to remote machine. The contents of the list file (passed to rsync for synchronisation) are /folder1/folder2/rep/01234018329/FSG2_PULL.txt#79GA91205KAE --- actual file /folder1/folder2/users/01234002360/my/FSG2_PULL#79GA91205KAE ---- link /folder1/folder2/rep/00000000090/TEST#79GA85630K9X /folder1/folder2/users/01234002360/my/TEST#79GA85630K9X /folder1/folder2/rep/00000000090/TEST#79GAL5005KMN /folder1/folder2/users/01234002360/my/TEST#79GAL5005KMN /folder1/folder2/rep/00000000090/TEST#79GAL5303KMQ /folder1/folder2/users/01234002360/my/TEST#79GAL5303KMQ /folder1/folder2/rep/00000000090/TEST#79GB04321Q0T /folder1/folder2/users/01234002360/my/TEST#79GB04321Q0T After rsync has transferred the files and links the log shown is /folder1/folder2/rep/00000000090/ /folder1/folder2/rep/00000000090/TEST#79GA85630K9X /folder1/folder2/rep/00000000090/TEST#79GAL5005KMN /folder1/folder2/rep/00000000090/TEST#79GAL5303KMQ /folder1/folder2/rep/00000000090/TEST#79GB04321Q0T /folder1/folder2/rep/01234018329/ /folder1/folder2/rep/01234018329/FSG2_PULL.txt#79GA91205KAE /folder1/folder2/users/01234002360/my/ /folder1/folder2/users/01234002360/my/FSG2_PULL#79GA91205KAE -> /folder1/folder2/rep/01234018329/FSG2_PULL.txt#79GA91205KAE /folder1/folder2/users/01234002360/my/TEST#79GA85630K9X -> /folder1/folder2/rep/00000000090/TEST#79GA85630K9X /folder1/folder2/users/01234002360/my/TEST#79GAL5005KMN -> /folder1/folder2/rep/00000000090/TEST#79GAL5005KMN /folder1/folder2/users/01234002360/my/TEST#79GAL5303KMQ -> /folder1/folder2/rep/00000000090/TEST#79GAL5303KMQ /folder1/folder2/users/01234002360/my/TEST#79GB04321Q0T -> /folder1/folder2/rep/00000000090/TEST#79GB04321Q0T The log shows the way the rsync is copying the files to destination dir. But i want rsync to copy the files the way the files and links are in the list file. Is it possible with rsync? If so how is it possible? Please help me. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20090716/c74aec29/attachment.html>
On Thu 16 Jul 2009, vvenu88 at gmail.com wrote:> The contents of the list file (passed to rsync for synchronisation) are > > /folder1/folder2/rep/01234018329/FSG2_PULL.txt#79GA91205KAE --- actual file > /folder1/folder2/users/01234002360/my/FSG2_PULL#79GA91205KAE ---- link > /folder1/folder2/rep/00000000090/TEST#79GA85630K9X > /folder1/folder2/users/01234002360/my/TEST#79GA85630K9X > /folder1/folder2/rep/00000000090/TEST#79GAL5005KMN > /folder1/folder2/users/01234002360/my/TEST#79GAL5005KMN > /folder1/folder2/rep/00000000090/TEST#79GAL5303KMQ > /folder1/folder2/users/01234002360/my/TEST#79GAL5303KMQ > /folder1/folder2/rep/00000000090/TEST#79GB04321Q0T > /folder1/folder2/users/01234002360/my/TEST#79GB04321Q0T > > After rsync has transferred the files and links the log shown is > > /folder1/folder2/rep/00000000090/ > /folder1/folder2/rep/00000000090/TEST#79GA85630K9X > /folder1/folder2/rep/00000000090/TEST#79GAL5005KMN > /folder1/folder2/rep/00000000090/TEST#79GAL5303KMQ > /folder1/folder2/rep/00000000090/TEST#79GB04321Q0T > > /folder1/folder2/rep/01234018329/ > /folder1/folder2/rep/01234018329/FSG2_PULL.txt#79GA91205KAE > > /folder1/folder2/users/01234002360/my/ > /folder1/folder2/users/01234002360/my/FSG2_PULL#79GA91205KAE -> > /folder1/folder2/rep/01234018329/FSG2_PULL.txt#79GA91205KAE > /folder1/folder2/users/01234002360/my/TEST#79GA85630K9X -> > /folder1/folder2/rep/00000000090/TEST#79GA85630K9X > /folder1/folder2/users/01234002360/my/TEST#79GAL5005KMN -> > /folder1/folder2/rep/00000000090/TEST#79GAL5005KMN > /folder1/folder2/users/01234002360/my/TEST#79GAL5303KMQ -> > /folder1/folder2/rep/00000000090/TEST#79GAL5303KMQ > /folder1/folder2/users/01234002360/my/TEST#79GB04321Q0T -> > /folder1/folder2/rep/00000000090/TEST#79GB04321Q0T > > The log shows the way the rsync is copying the files to destination dir. > But i want rsync to copy the files the way the files and links are in the > list file.Why? It doesn't make any difference. Once two files are hard-linked, there is no difference whatsoever between both names (names are effectively just links).> Is it possible with rsync?No; rsync will always transfer the files alphabetically (sorted). Hence linked files will first be transferred as the first name to be found in the sorted list. Paul
On Thu, Jul 16, 2009 at 12:11 PM, <vvenu88 at gmail.com> wrote:> But i want rsync to copy the files the way the files and links are in the > list file. > Is it possible with rsync? > If so how is it possible?Do it one file+link at a time, very inefficient--- but what is the reason behind the way you want it?
Paul, On Thu, 2009-07-16 at 15:10 +0200, Paul Slootman wrote:> On Thu 16 Jul 2009, vvenu88 at gmail.com wrote: > > /folder1/folder2/users/01234002360/my/FSG2_PULL#79GA91205KAE -> > > /folder1/folder2/rep/01234018329/FSG2_PULL.txt#79GA91205KAE> Once two files are hard-linked, there is > no difference whatsoever between both names (names are effectively just > links).The log shows symlinks (->), not hard links (=>). Of course, your point stands. -- Matt
On Thu 16 Jul 2009, Matt McCutchen wrote:> On Thu, 2009-07-16 at 15:10 +0200, Paul Slootman wrote: > > > Once two files are hard-linked, there is > > The log shows symlinks (->), not hard links (=>). Of course, your point > stands.I wish people would be more specific when talking about links :-( When I started off on unix there were no symlinks, so a plain link to me is a hard link :-) Paul