Mauritz

Well-Known Member
Apr 29, 2015
62
0
6
Johannesburg
cPanel Access Level
Root Administrator
Is it possible to link 2 individual WHM accounts to sync accounts, config etc? Our setup currently is as follows:

1x primary cloud server (instance) (cloudlinux+whmvps)
1x secondary cloud server (instance) (centos6+whm2)

Both at different datacentres.

Our solution requirement is as follows:

1) Provide a cheaper package which will be hosted at the secondary server (international)
2) Provide a more expensive version where these clients will remain on the primary server but their accounts, data etc will be synced with the secondary server so in the event of the primary server going down, we offer the service of having a backup solution ready.
3) The servers will not have identical accounts, the secondary solution will have all accounts where the primary solution only houses the premium hosting clients.

Is this possible, can this be done through WHM and is there any risks involved? Are we crazy? "This will never work"? Any ideas are welcome!

Thank you!
 

LostNerd

Well-Known Member
Mar 12, 2014
258
12
18
Hastings, East Sussex, UK
cPanel Access Level
Root Administrator
Twitter
It could be possible to build a script that will download the cPanel backup files generated on the primary server to the secondary server at set intervals and run the restore command. That way, you could have the "premium" clients' accounts replicated to an extent however, I can't see a viable solution on setting up live data replication without having detrimental effects on your primary servers performance.

Good luck!
 

Mauritz

Well-Known Member
Apr 29, 2015
62
0
6
Johannesburg
cPanel Access Level
Root Administrator
I think I'm returning to forums from now on, always great help.

So if I understand you correctly, the best (not most reliable but a solution alltogether) will be:

1) Setup backups on the primary server and have it stored on Google Cloud.
2) Have the secondary server "import" the backups at set intervals and replace the data on the secondary server?

If we did this via a simple script to import and replace the existing data within the /home/ directory of specific accounts (whatever is in the backup), will there be any things we need to try and exclude so that the import data is compliant between the 2 instances?
 

LostNerd

Well-Known Member
Mar 12, 2014
258
12
18
Hastings, East Sussex, UK
cPanel Access Level
Root Administrator
Twitter
You've pretty much got the picture.

Have the script download the complete backup file to /home on the secondary server and then have it run:

Code:
/scripts/restorepkg <user>

*<user> = Username of account as stated in the backup/cpmove filename
It should restore the account in it's entirety to the moment the backup on the primary server was taken.