Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    25

    Default Backup alternative: rsync + external server

    Hello,

    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:

    Code:
    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:

    Code:
    rsync -avprz --delete -e ssh /home/ user@exampĺe.com:/home/user/b.0/
    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?

    Thanks.

  2. #2
    Member
    Join Date
    Apr 2004
    Posts
    215

    Default

    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
    HalfDedi.com : Half Dedicated Half Price
    We Provide Affordable VPS hosting solution in US and Singapore

Similar Threads & Tags
Similar threads

  1. rsync Server Backup, Minor Issues After Restore
    By Magotchi in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-16-2011, 04:00 PM
  2. Rsync script for backup of cpanel server
    By zigzam in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 06-08-2009, 02:54 PM
  3. Using rsync to enable automatic backup MX mail server domains
    By aarondwyer in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-09-2007, 08:48 PM
  4. rsync backup to my local Windows server - what should I install?
    By spaceman in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-26-2006, 05:14 PM
  5. External Backup Server
    By alserb in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-22-2003, 10:20 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube