rsync with laptop at different locations - Networking

This is a discussion on rsync with laptop at different locations - Networking ; Hi all, I try to use rsync to copy files en mass from a single remote location to a single laptop but at two different locations and seem to get a problem. rsync simply starts the whole copying process all ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: rsync with laptop at different locations

  1. rsync with laptop at different locations

    Hi all,

    I try to use rsync to copy files en mass from a single remote location
    to a single laptop but at two different locations and seem to get a
    problem. rsync simply starts the whole copying process all over again
    (rather than incrementally) when I have run it at one location
    previously and now run it at the other, without apprently referring to
    the previous data, with no time saving, making it rather pointless to
    use rsync altogether.

    More specifically these locations where I use my laptop are at home,
    where I use a static IP and at work, where DHCP is used. I try to copy
    stuff from a server at work, to which I have access without password
    (RSA authentication).

    I wonder if this is an expected behaviour of rsync. At any rate, I'd
    very much appreciate if anybody could advise how to get round this
    problem, namely to get rsync to do incremental copy even if switching
    locations.

    Regards,
    Yo


  2. Re: rsync with laptop at different locations

    yosato_uk writes:

    >Hi all,


    >I try to use rsync to copy files en mass from a single remote location
    >to a single laptop but at two different locations and seem to get a
    >problem. rsync simply starts the whole copying process all over again
    >(rather than incrementally) when I have run it at one location
    >previously and now run it at the other, without apprently referring to
    >the previous data, with no time saving, making it rather pointless to
    >use rsync altogether.


    rsync does not care about the location of the laptop. It does care about
    the location on the laptop disk of the files.
    You MUST transfer the files to the same directory as the one they are in.
    It does work. It works no matter what the location of the laptop if you do
    it properly.

    Note that you may have forgotten that
    rsync -av remote:/a/b/dir/ dir
    and
    rsync -av remote:/a/b/dir dir
    are very very different.
    That terminal slash is crucial



    >More specifically these locations where I use my laptop are at home,
    >where I use a static IP and at work, where DHCP is used. I try to copy
    >stuff from a server at work, to which I have access without password
    >(RSA authentication).


    >I wonder if this is an expected behaviour of rsync. At any rate, I'd
    >very much appreciate if anybody could advise how to get round this
    >problem, namely to get rsync to do incremental copy even if switching
    >locations.



    No, it is expected behaviour when you do something wrong.
    There is no such problem with rsync.



  3. Re: rsync with laptop at different locations

    On Tuesday 22 May 2007 16:30, yosato_uk wrote:

    > I try to use rsync to copy files en mass from a single remote location
    > to a single laptop but at two different locations and seem to get a
    > problem. rsync simply starts the whole copying process all over again
    > (rather than incrementally) when I have run it at one location
    > previously and now run it at the other, without apprently referring to
    > the previous data, with no time saving, making it rather pointless to
    > use rsync altogether.


    Not really. Rsync does have other benefits. The ability to interrupt and
    resume, for instance.

    But your problem is probably related to a slightly different syntax, or an
    option that provokes the transfer to be run completely no matter what.
    You don't write what syntax use used, so...

    First, be sure to use the correct syntax. An example:
    rsync -v -a -r -e ssh user@remote:/dir/dir/source_dir /dir/target/

    This will ask you for the password on 'remote', then
    create /dir/target/source_dir on your laptop.

    If you only want the contents of the source, add a / to the source:
    rsync -v -a -r -e ssh user@remote:/dir/dir/source_dir/ /dir/target/



    Second, put this command in a script. Run the script, it'll avoid
    differences between runs. Oh, and put in full path names.

    Remove -v if you don't like extensive output (I do).



    --
    There is an art, it says, or rather, a knack to flying.
    The knack lies in learning how to throw yourself at the ground and miss.
    Douglas Adams

+ Reply to Thread