Professional Web Applications Themes

using rsync - Mac Applications & Software

Hello, I'm confused about the use of rsync. Say I have a folder "Source" on the desktop, in it is another folder "Folder1" and in this folder are some text files "text1.txt", "text2.txt" etc. On the desktop is also an empty folder "Target". Like this: Desktop Source Folder1 text1.txt text2.txt text3.txt Target I want to copy/update the contents of Source to Target. To do this I use: rsync -aru Source/ Target After this the content of Source and Target is the same with the content of Source copied to Target. So far so good. Now when I change the content ...

  1. #1

    Default using rsync

    Hello,
    I'm confused about the use of rsync.
    Say I have a folder "Source" on the desktop, in it is another folder
    "Folder1" and in this folder are some text files "text1.txt",
    "text2.txt" etc.
    On the desktop is also an empty folder "Target".

    Like this:

    Desktop
    Source
    Folder1
    text1.txt
    text2.txt
    text3.txt

    Target

    I want to copy/update the contents of Source to Target.

    To do this I use:

    rsync -aru Source/ Target

    After this the content of Source and Target is the same with the
    content of Source copied to Target. So far so good.

    Now when I change the content of one of the text files in Source and
    update Source and Target again with

    rsync -aru Source/ Target

    I was expecting rsync to only update the changes in the text files.
    To my surprise and confusion I find rsync instead removes the changed
    text files from Target. I don't get it, what am I doing wrong?

    Steven

    --
    nl



    Steven Guest

  2. #2

    Default Re: using rsync


    "Steven" <nl> wrote in message
    news:supernews.com... 


    I've had some weird experiences with rsync too.

    Firstly, what version are you using? You should google for RsyncX and
    download it. This version is resource-fork-friendly as opposed to older
    versions.

    Secondly, the flags you're sending: -a is equivalent to -rlptgoD so maybe
    it's a little conused by the additional -r

    Thirdly, I have experienced files _disappearing_ too, but if you log out and
    log back in again, the files magically reappear. Don't know why.

    Whay are you using the -u flag? I would have thought that the -a flag is
    sufficient for archiving purposes.

    Perhaps you can debug a bit if you switch on a few -v flags to see what's
    going on.

    hth,

    hc


    huchal Guest

  3. #3

    Default Re: using rsync

    huchal wrote:
     [/ref]

     

    I'm using what is installed with MacOS X 10.2.6.
     

    You're right, I already figured this out. But it seems to make no
    difference.
     

    You'rre right, I see this too! I hadn't noticed this before, thanks.. 

    The -u flag is for 'update only', so newer files are not overwritten.

    Steven

    --
    nl


    Steven Guest

  4. #4

    Default Re: using rsync

    > > Firstly, what version are you using? You should google for RsyncX and 
    >
    > I'm using what is installed with MacOS X 10.2.6[/ref]

    If you run

    rsync --version

    it'll tell you what version is installed. I've been using the RsyncX version
    and have found it excellent. No more figuring out what has been created by
    which application... It's a small download.

    Hc


    huchal Guest

  5. #5

    Default Re: using rsync

    huchal wrote:
     
    >>
    >>I'm using what is installed with MacOS X 10.2.6[/ref]
    >
    > If you run
    >
    > rsync --version[/ref]

    rsync version 2.5.2 protocol version 26
    Copyright (C) 1996-2002 by Andrew Tridgell and others
    <http://rsync.samba.org/>
    Capabilities: 64-bit files, socketpairs, hard links, symlinks,
    batchfiles, IPv6,
    32-bit system inums, 64-bit internal inums
     

    I'll check it out, thanks,

    Steven



    --
    nl


    Steven Guest

  6. #6

    Default Re: using rsync

    Steven <nl> writes:
     [/ref]
    >

    >
    > I'm using what is installed with MacOS X 10.2.6.

    >
    > You're right, I already figured this out. But it seems to make no
    > difference.

    >
    > You'rre right, I see this too! I hadn't noticed this before, thanks.. 
    >
    > The -u flag is for 'update only', so newer files are not overwritten.[/ref]

    Have you checked the clocks on both machines? If one was inaccurate,
    rsync might mistakenly think a newer file is older. This could then
    lead to very confusing behavior.
    Hal Guest

  7. #7

    Default Re: using rsync


    "Hal Sadofsky" <uoregon.edu> wrote in message
    news:uoregon.edu...
     

    I think the test the OP was doing was between different folders on the same
    machine AFAIK.

    Strange though, we both experienced missing files which magically reappeared
    when we logged back in.

    hc


    huchal Guest

  8. #8

    Default Re: using rsync

    In message <bk9820$qsigm$news.uni-berlin.de>, "huchal"
    <net> wrote: 
    >
    > I think the test the OP was doing was between different folders on the[/ref]
    same 

    In the terminal or in the Finder? In the Finder, I could understand that
    rsync does not notify the Finder about the directory changes but it's very
    strange if you don't see the file in the terminal with 'ls'...

    -Laurent.
    --
    ================================================== ===============
    Laurent Daudelin Logiciels Nemesys Software
    mailto:net <http://nemesys.dyndns.org>
    Replace ihatespam with verizon to reply
    +++++++++++ Sent using an Apple Newton MessagePad 2100 ++++++++++

    Laurent Guest

Similar Threads

  1. rsync with ssh and a different cipher?
    By pbeckhelm@gmail.com in forum Linux / Unix Administration
    Replies: 4
    Last Post: February 11th, 09:25 PM
  2. rsync group?
    By Robert R in forum Linux / Unix Administration
    Replies: 0
    Last Post: October 9th, 03:15 PM
  3. rsync or wget?
    By David Fokkema in forum Debian
    Replies: 11
    Last Post: July 16th, 06:50 PM
  4. unix Q: how to reinstate rsync?
    By hughchal in forum Mac Applications & Software
    Replies: 3
    Last Post: June 27th, 06:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139