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!

Copy home directory and database to another server?

Discussion in 'Data Protection' started by Oluwatosin, Apr 19, 2018.

  1. Oluwatosin

    Oluwatosin Member

    Joined:
    Jul 1, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Lagos, Nigeria
    cPanel Access Level:
    Root Administrator
    Hello,

    I recently created a backup server and I'm looking for a script to copy home directories and databases from my main server and also keep the backup copies updated periodically.

    rsync -avzh --progress root@REMOTESERVERHOST:/home/ /home/

    I found the above script but not sure if this exactly what will work in my case as I also want this script to keep running so the directories on the backup server is almost or exactly a replica of the main server.

    Any suggestions?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Oluwatosin,

    If your goal is to backup account data and databases, then you could simply backup the accounts to the remote server using the backup options in Web Host Manager:

    Backup Configuration - Version 70 Documentation - cPanel Documentation

    If you choose the "Incremental" backup type in combination with "Rsync" for the remote destination, it will actually store the backups in an uncompressed state with the files available in their corresponding directory structure on the remote backup server.

    Note that attempting to replicate the entire contents of the hard drive isn't supported, and there's no easy way to restore an entire filesystem in such a case. Customers generally rely on third-party solutions from providers such as R1Soft if they need to backup the entire contents of the filesystem.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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