Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Backup alternative: rsync + external server

Discussion in 'General Discussion' started by stormrider, Feb 4, 2008.

  1. stormrider

    stormrider Member

    Jan 12, 2007
    Likes Received:
    Trophy Points:

    I'm trying to figure out how to backup my /home to an external server using rsync ( probably the best way to backup without overloading your server ).

    How does it work?

    The following script is ran on the external server:

    mv b.3 b.tmp
    mv b.2 b.3
    mv b.1 b.2
    mv b.0 b.1
    mv b.tmp b.0
    cp -al b.1/. b.0
    In this case, we will keep 4 backups.

    After this, we run a rsync to b.0 folder ON the cpanel server:

    rsync -avprz --delete -e ssh /home/ user@exampĺ
    It works fine, saves a LOT of bandwidth and uses less resources than the default cpbackup on FTP.

    What's the problem?

    My problem is when i need to restore a backup.

    When i run rsync my permissions get messed up. They are all changed to the user on the external server.

    Does anyone have an idea of how to solve this problem with permissions?

  2. markhard

    markhard Well-Known Member

    Apr 22, 2004
    Likes Received:
    Trophy Points:
    have you looked at the rsync help page?

    rsync --help

    last time i see it, it does have option to preserve the file permission, symlink, etc
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice