How to set up a new CubeBackup for Microsoft 365 server and connect it to the backups made by an old server.
Switching to a new CubeBackup instance on a new server is sometimes necessary, particularly if you've upgraded your server and want to continue using the backups from your previous installation. This process allows you to seamlessly resume backup and restoration tasks without starting over.
To set up CubeBackup for Microsoft 365 on your new server, please follow the detailed instructions appropriate for your operating system.
Important: Access to your original installation directory is required to complete the setup. If your old server is no longer accessible, please refer to our guide for disaster recovery: Disaster recovery of a CubeBackup instance.
Step 1. Stop the CubeBackup service on your old server.
Please ensure that there are no ongoing backup tasks in the CubeBackup web console. If there are any, please stop it or wait for it to complete before proceeding to the next step.
Stop the CubeBackup service using the following command:
sudo /opt/cubebackup365/bin/cbsrv stop
Step 2. Install CubeBackup on the new server.
Install CubeBackup for Microsoft 365 on a new server or VM.
Notes:
1. Please DO NOT start the CubeBackup configuration in the setup wizard and follow the next steps in this document.
2. Ensure the old and new servers are running the same version of CubeBackup. If necessary, perform an in-place upgrade on the old server and run a few backups before the subsequent steps, or install the same old version on the new server.
Step 3. Stop the CubeBackup service on your new server.
Stop the CubeBackup service using the following command:
sudo /opt/cubebackup365/bin/cbsrv stop
Step 4. Copy configuration files to the new server.
Copy the following configuration directories from the old server to the same location on the new server:
<installation directory>/data/<installation directory>/etc/
Tips:
1. By default, the installation directory is C:\Program Files\CubeBackup365 on Windows and /opt/cubebackup365 on Linux.
2. If you're switching between a Windows and Linux version, please remove the files <installation directory>/data/update.json and <installation directory>/data/update.zip before continuing.
3. 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 tocbuser. For example:sudo chown -R cbuser:cbuser /opt/cubebackup365/data sudo chown -R cbuser:cbuser /opt/cubebackup365/etc
Step 5. Update the backup storage location if necessary.
If your backup storage location has changed on the new server - for instance, an updated the IP address of your network storage or a modified data index path due to different OS, it's essential to update the configuration file. Please locate the <installation_directory>/data/storage.json file on the new server, open it in a text editor and adjust the values to match the new storage settings.
For an encrypted storage.json file, you cannot edit them directly. Instead, please create a new configuration file and replace the original one by following the instructions outlined here: CubeBackup for Microsoft 365 configuration guide: storage.json.
Step 6. Create the data index directory with proper permissions
Manually create a directory for the data index path. For example, if your data index was stored at /opt/cubebackup365/index on the old server,
sudo mkdir -p /opt/cubebackup365/index
After the data index directory has been created, you also need to change its owner to cbuser:
sudo chown -R cbuser:cbuser /opt/cubebackup365/index
Note:
There is no need to copy the original data index from the old server to the new server. CubeBackup will automatically generate a new data index in the correct location as long as the data index directory has the proper permissions.
Step 7. Run a data integrity check.
Before resuming backups on the new server, please run a data integrity check to verify the consistency of all existing backups on your new server.
sudo /opt/cubebackup365/bin/cbackup checkRefs
Note:
Depending on the total size of your backups, the integrity check may take several hours to complete. If the process is interrupted unexpectedly, you can safely rerun the command.
Step 8. Start the CubeBackup service on your new server.
Start the CubeBackup service using the following command:
sudo /opt/cubebackup365/bin/cbsrv start
Step 9. Check if CubeBackup is functioning well
Now, please log in to the new CubeBackup web console.
- Verify that all of your old backup data and backup histories is now displayed correctly.
- Additionally, please try restoring a file or message to confirm that the new instance is functioning as expected.
- Subsequent backups will be processed incrementally based on the existing backup data.
Step 1. Stop the CubeBackup service on your old server.
Please ensure that there are no ongoing backup tasks in the CubeBackup web console. If there are any, please stop it or wait for it to complete before proceeding to the next step.
Open a Command Prompt or Windows Powershell as Administrator and run the following command:
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop # in Command Prompt
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop # in Windows Powershell
Step 2. Install CubeBackup on the new server.
Install CubeBackup for Microsoft 365 on a new server or VM.
Notes:
1. Please DO NOT start the CubeBackup configuration in the setup wizard and follow the next steps in this document.
2. Ensure the old and new servers are running the same version of CubeBackup. If necessary, perform an in-place upgrade on the old server and run a few backups before the subsequent steps, or install the same old version on the new server.
Step 3. Stop the CubeBackup service on your new server.
Open a Command Prompt or Windows Powershell as Administrator and run the following command:
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop # in Command Prompt
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop # in Windows Powershell
Step 4. Copy configuration files to the new server.
Copy the following configuration directories from the old server to the same location on the new server:
<installation directory>/data/<installation directory>/etc/
Tips:
1. By default, the installation directory is C:\Program Files\CubeBackup365 on Windows and /opt/cubebackup365 on Linux.
2. If you're switching between a Windows and Linux version, please remove the files <installation directory>/data/update.json and <installation directory>/data/update.zip before continuing.
Step 5. Update the backup storage location if necessary.
If your backup storage location has changed on the new server - for instance, an updated the IP address of your network storage or a modified data index path due to different OS, it's essential to update the configuration file. Please locate the <installation_directory>/data/storage.json file on the new server, open it in a text editor and adjust the values to match the new storage settings.
For an encrypted storage.json file, you cannot edit them directly. Instead, please create a new configuration file and replace the original one by following the instructions outlined here: CubeBackup for Microsoft 365 configuration guide: storage.json.
Step 6. Run a data integrity check.
Before resuming backups on the new server, please run a data integrity check to verify the consistency of all existing backups on your new server.
Open Command Prompt or Windows Powershell as Administrator and run the following command:
"C:\Program Files\CubeBackup365\bin\cbackup.exe" checkRefs # in Command Prompt
& "C:\Program Files\CubeBackup365\bin\cbackup.exe" checkRefs # in Windows Powershell
Note:
Depending on the total size of your backups, the integrity check may take several hours to complete. If the process is interrupted unexpectedly, you can safely rerun the command.
Step 7. Start the CubeBackup service on your new server.
Once completed the integrity check, you can start the CubeBackup service using the following command:
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" start # in Command Prompt
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" start # in Windows Powershell
Step 8. Check if CubeBackup is functioning well
Now, please log in to the new CubeBackup web console.
- Verify that all of your old backup data and backup histories is now displayed correctly.
- Additionally, please try restoring a file or message to confirm that the new instance is functioning as expected.
- Subsequent backups will be processed incrementally based on the existing backup data.