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. 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 2. 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 3. Install CubeBackup on the new server.
Download CubeBackup for Google Workspace and install it on the new Server/VM.
Note: Please wait until you have completed Step 4 before starting the CubeBackup configuration in the setup wizard.
Step 4. Copy configuration files from the old server to the new server.
Copy configuration files from the old server to the same location on the new server:
- <installation directory>/db/license
- <installation directory>/db/storage.json
- <installation directory>/db/config.json
- <installation directory>/db/keys.json
- <installation directory>/db/jwt.json
- <installation directory>/etc/config.toml
Tips:
1. By default, the installation directory is C:\Program Files\CubeBackup4 on Windows, and /opt/cubebackup on Linux.
2. If the new target server is Linux, please also be sure to change the owner of the <installation directory>/db and *<installation directory>/etc directory to cbuser. For example:sudo chown -R cbuser:cbuser /opt/cubebackup/db sudo chown -R cbuser:cbuser /opt/cubebackup/etc
Step 5. Go through the setup wizard on the new server
Restart the CubeBackup service:
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
In Docker container:
sudo docker restart <container-name>
Open or refresh the CubeBackup web console and launch the initial setup wizard. Confirm that it points to your original backups, and modify the data index location if necessary.
Tips:
1. There is no need to copy the original data index from the old server. CubeBackup will generate a new data index on the new server.
2. For original backups stored on a local disk, please ensure that it is accessible to the new server in the same storage path as before.Click Next in the setup wizard. You do not need to upload the service account key file. Simply input the original domain name and domain administrator, then click Next all the way to the final step.
Before logging in to the CubeBackup web console for the first time on the new server, create a CubeBackup admin account.
Step 6. Check if CubeBackup is functioning well
Now go back and log in to the new CubeBackup web console. 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.