How to set up a new CubeBackup server and connect it to the backups made by an old server
In some cases, you may wish to switch to a new CubeBackup instance on a new server and point it to the data backed up by your old server. For example, if you have upgraded your server or if your old server crashed, you may want to install a new CubeBackup instance based on your existing backups.
Please follow the guide below to set up CubeBackup on the new server:
1. Stop the CubeBackup service on your old server.
sudo /opt/cubebackup/bin/cbsrv stop
Enter services.msc in the command line, then in the Services list that pops up, right-click the CubeBackup Service entry, and select Stop.
In Docker container:
sudo docker stop <container-name>
2. Install CubeBackup on the new server.
Download CubeBackup from https://www.cubebackup.com and install it on the new Server/VM.
Note: Please install the CubeBackup software without configuring it. On windows, you can close the configuration wizard that pops up after installation.
3. Copy configuration files from the old server to the new server.
Copy all files in “<cubebackup installation directory>/db” from the old server to the same location on the new server.
If the new server is a Linux server, you also need to change the owner of the “<cubebackup installation directory>/db” directory to cbuser. For example:
chown cbuser:cbuser /opt/cubebackup/db
4. Copy the data index to the new server.
Copy the entire “data index” directory from the old server to the same location on the new server.
Tip: For more information about the “data index”, please refer to What is the data indx.
If the new server is a Linux server, be sure to change the owner of the “data index” directory to cbuser. For example:
chown cbuser:cbuser /opt/cubebackup/index
5. Edit the storage.json file if needed.
Manually open the “<cubebackup installation directory>/db/storage.json” file on the new server in a text editor (e.g. VIM or Sublime Text) and check whether any values need to be modified and modify accordingly.
- In most cases, there is no need to modify the storage.json file, because the original values should be correct by default.
- Make sure that the IndexPath points to the “data index” directory you created in step 4.
- For detailed information about the storage.json file, please refer to Configuration Guide: storage.json.
6. Restart the CubeBackup service on the new server.
sudo /opt/cubebackup/bin/cbsrv restart
Enter services.msc in the command line, then in the Services list that pops up, right click the CubeBackup Service entry, and select Restart.
sudo docker restart <container-name>
Now go back and log into the new CubeBackup web console using the username and password from the old server. You should see all of your old backup data and backup histories on the new server. Subsequent backups will be incrementally processed based on the old backup data.