Hello All,
I am using I-MSCP for about a year now, and I am very happy with. I have a VPS and I am hosting few domains on it.
Recently I was thinking to simulate a disaster recovery plan, to see how fast and if I can restore the server. So I was looking online to know what part of my UBUNTU server I need to backup to be able to restore it correctly.
For I-MSCP part, there was only few article I have found, and while I was able to make backups, restoring my test server failed.
I am opening this thread due to this issue and I would like to get some help from someone who have don this already.
I will explain step by step on how I did the backups and how I wanted to restore them.
To backup I-MSCP related files and configs including mysql database I am using the following commands:
(I am creating a backup files using TAR and one backup for each section instead of having one single backup)
tar -cpzf imscp.tgz /var/www/imscp/backups/
tar -cpzf mail.tgz /var/mail/virtual/
tar -cpzf mysql.tgz /var/lib/mysql/
tar -cpzf www.tgz /var/www/virtual/
I am also dumping mysql databases to make sure all ok:
mysqldump -p --all-databases -u root -p > mysqldump.sql
Some articles online also suggest to backup /etc/imscp/ however I am not sure if that is really needed, since ubuntu server and I-MSCP will be reinstalled from scratch.
So, at this stage, I have all backups I should have, so to restore all on a test system, I was doing the following:
I have created a VM, and installed Ubuntu Server on it, the same version I have on the live system.
(Please note that first issue will be related to this: new IP and possible different network adapter name)
I have installed I-MSCP on it the same version I have on the live server.
At this stage, all ok, I have a new server with I-MSCP on it.
I have then restored all backed up files, and reimported mysql database as well.
Now, based on online article (), I should run
- perl /var/www/imscp/engine/setup/imscp-setup -d
But I do not have imscp-setup under that location (using latest I-MSCP version)
So instead on this command, I run the main setup file from the original installer:
- sudo perl imscp-autoinstall -d
As far I know, this should re-configure the setup, however it failed with some errors:
- In original server my network adapter in ens3 but in my test server is ens33, so scrip failed with message saying the network adapter ens3 not exist.
I have fixed that by renaming network adapter, but then another message, related to the different IP address this test VM have, installer was found the old one possibly from the restored files/database.
I have changed the IP in mysqldump, reimported it and this error was fixed, but then there was an error related to a subdomain module.
I have stopped at this stage and considered my disaster recovery plan failed.
Does anyone have the correct process to backup and restore I-MSCP on same server and different server/hardware/IP ?
Thank you.
Regards,
Gabor