1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

rsync help

Discussion in 'Server Configuration and Hosting' started by Solidus, May 30, 2016.

  1. Solidus

    Solidus Well-Known Member

    Hey all.

    I want to backup my forum to my backup server, but file permissions are not being copied. Here's the command,

    Code:
    rsync -arvz -e 'ssh -p xx' --progress  testing/ root@1.1.1.1:/foo/bar/backup/
    Secondly, which method do you think is best?
    1: rsync'ing the entire httpdocs uncompressed, I believe rsync ignores files which haven't changed so after the 1st run I'm only syncing files from XF updates/plugin updates.

    2: gzip httpdocs and rsync that over, just 1 file.

    what's better?

    Thanks.
     
  2. Mouth

    Mouth Well-Known Member

    Never parse your ssh password in a cron or job command line, it will show on a processlist !
    Never parse your ssh password in a cron or job command line, it will show on a processlist !


    Option 1 is best, will save processing and bandwidth

    I use
    rsync -a --delete -e ssh
     
    Last edited: May 30, 2016
  3. Solidus

    Solidus Well-Known Member

    -p is specifying the port :)
    Although I do have the ssh key password protected, what's the best way to do it?
     
  4. Solidus

    Solidus Well-Known Member

    My understanding is that --password-file=pass.txt is the best option, correct?
    Or maybe -i to include the private ssh key?
     
  5. Mouth

    Mouth Well-Known Member

  6. Solidus

    Solidus Well-Known Member

    Yeah, I have already done that. The key shared between server and backup server is password protected.
     
  7. WSWD

    WSWD Well-Known Member

    -p, --perms preserve permissions
    -o, --owner preserve owner (root only)
    -g, --group preserve group
    -D, --devices preserve devices (root only)
    -t, --times preserve times
     
    Solidus likes this.
  8. Solidus

    Solidus Well-Known Member

    Thanks, I guess -arvzog should do it.
     

Share This Page