Rsync problem

Discussion in 'Site & Server Administration' started by countrydj, Dec 19, 2011.

  1. #1
    Hi Guys...

    I need to transfer some files from one server to another.
    This is the command that I normally use:
    rsync -ae ssh myfiles 88.88.88.88:/directory-owned-by-root/
    Code (markup):
    This won't work because I have changed the ssh port to 5678 (example) and I have disallowed root login.
    My normal login is: mylogin.
    So I tried:
    rsync -ae 'ssh -p5678 -lmylogin' myfiles 88.88.88.88:/directory-owned-by-root/
    Code (markup):
    This won't work because mylogin doesn't have permission to write to root ownership.

    Has anybody got any ideas how I can copy my files

    Thanks,

    John C
     
    countrydj, Dec 19, 2011 IP
  2. lachrymologist

    lachrymologist Active Member

    Messages:
    456
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    70
    #2
    why don't you change the directory?

    rsync -ae 'ssh -p5678 -lmylogin' myfiles 88.88.88.88:/directory-owned-by-mylogin/
     
    lachrymologist, Dec 19, 2011 IP
  3. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #3
    Hello there,

    The command should be as follows:

    rsync -ae 'ssh -p 5678' myfiles myuser@88.88.88.88:/directory-owned-by-user/
    Code (markup):
    Chris
     
    RHS-Chris, Dec 19, 2011 IP
  4. countrydj

    countrydj Active Member

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #4
    Hi Guys..
    Many thanks for your reply.
    I found that if I PULLED rather than PUSHED it worked for me.
    This is the command that I used:
    rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/
    Code (markup):
    Thank you,

    John C
     
    countrydj, Dec 20, 2011 IP