cPanel & WHM Version 114 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Enhanced rsync backup, daemon support

Nathan Lierbo shared this idea 10 years ago
Open Discussion


I have some ideas to enhance backups for cPanel servers.

1) Improve rsync support for backups:

The current method of rsync to an attached drive or network share (be it NFS, iSCSI etc ..) is inadequate. The other method, of packing each account and compressing, is equally inadequate due to the additional resources and time it takes to restore accounts (I'm talking about whole server scenarios specifically).

cPanel needs to have support for rsyncing to an rsync daemon on a remote machine and promote server restoration via "Direct Migration", e.g. all important cPanel information is backed up and can be directly copied to a new server to restore service (/etc, /var/cpanel etc ..). It is very simple to configure an rsync daemon and equally simple to set an rsync going which connects to the daemon. Servers will benefit from less resources being used to complete backups and backups could be completed more often, due to the incremental nature of rsync.

From my own testing, a server with 346 accounts, home dir size of 70GB, MySQL dir size of 8GB, the initial rsync takes six hours, all subsequent rsyncs (12 hours after the initial one) take less than an hour. The server running the rsync daemon is benefitting from ZFS support, which has compression built in at the file system level, so the rsynced data is compressed at the same level as pkgacct would do it, so no space is being lost using rsync.

2) Quick way to restore rsynced accounts

A script to individually pack an account, using rsynced data, (I for one would be willing to pay extra for this), which creates a full backup, cpanel backup or cpanel move file.

Take the scenerio of one client asking for one account to be restored. You have everything you need to do it, home dir, cPanel files etc ... but at present, it would be a manual chore to restore. If you could magically set loose a script to do it for you, the time to restore would be reduced and you havn't had to keep compressed backups of all accounts.

3) Support for direct migration built in to cPanel

I've used the direct migration restoration method a few times and it is by far the quickest way to restore an entire server from catastophic failure. However, it has always been a manual job to do it. Some level of support to rsync from the other direction to restore would be handy.

Original thread:

Replies (2)


I'm a long time user and fan of cPanel, I've been surprised over and over that RSYNC hasn't been fully implemented into the backup system. I prefer to not use plugins if at all possible. I would prefer a method that is fully supported within the cPanel software itself.

RSYNC is a tremendously powerful tool, and should not be ignored.


I am struggling with this right now. The Rsync process copies ALL the server data into the /backup folder, then runs the rsync. This is really inefficient. Since we need double the server space in order to be able to run a backup.

Plus there's the copy overhead.

Why can't it just compare in place?

It's also 100% unclear how to restore data.

Leave a Comment
Attach a file