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:

Step 1. Confirm the current storage path for the data index and backup data.

Your new CubeBackup instance will need to be able to access the original data index and backup data paths. Be sure to note the location of the original data index and backup data before you shut down the original CubeBackup web console. You can find the Storage status section at the bottom right on the OVERVIEW page of your original CubeBackup console.

Step 2. Merge the data index cache to backup storage using the command.

cbackup syncDataIndex

NOTE: This command requires special priviledges.

On Windows: Open the Command Prompt or Windows PowerShell and run this command as Administrator

"C:\Program Files\CubeBackup4\bin\cbackup.exe" syncDataIndex

On Linux: this command must be run by cbuser.

sudo -u cbuser /opt/cubebackup/bin/cbackup syncDataIndex

Step 3. Stop the CubeBackup service on your old server.

On Linux:

 sudo /opt/cubebackup/bin/cbsrv stop

On Windows: Open the Command Prompt or Windows PowerShell and run this command as Administrator

"C:\Program Files\CubeBackup4\bin\cbsrv.exe" stop 

In Docker container:

 sudo docker stop <container-name>

Step 4. 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.

Step 5. 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:

sudo chown -R cbuser:cbuser /opt/cubebackup/db

Step 6. Confirm the original storage path is available to the new CubeBackup instance.

There is no need to copy the original data index from the old server; CubeBackup will generate a new data index in the same location as long as the data index directory has the proper permissions.

For an on-premises backup on Linux, please ensure that cbuser has read, write and execute permissions for the original repository.

Step 7. Restart the CubeBackup service on the new server.

On Linux:

sudo /opt/cubebackup/bin/cbsrv restart

On Windows: Open the Command Prompt or Windows PowerShell and run this command as Administrator

"C:\Program Files\CubeBackup4\bin\cbsrv.exe" restart

On Docker:

sudo docker restart <container-name>

Step 8. Check if CubeBackup is functioning well

Now go back and log in to the new CubeBackup web console using the username and password from the old server.

All of your old backup data and backup histories should be displayed on the new server. If necessary, please try restoring a file or message to confirm. Subsequent backups will be incrementally processed based on the old backup data.