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

    Jul 1, 2017
    Likes Received:
    Trophy Points:
    Lagos, Nigeria
    cPanel Access Level:
    Root Administrator

    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

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    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...

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