How to set up a new CubeBackup for Microsoft 365 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. 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.
Please run this command.
sudo /opt/cubebackup365/bin/cbsrv stop
Open a Command Prompt as Administrator, and run this command.
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop
Open the Windows PowerShell as Administrator, and run this command.
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop
Please run this command to stop the container.
sudo docker stop <container-name>
Step 2. Install CubeBackup on the new server.
Download CubeBackup from our website 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 3. Copy configuration files from the old server to the new server.
Copy all files in <cubebackup installation directory>/data and <cubebackup installation directory>/etc from the old server to the same location on the new server.
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.
Tips:
1. By default, the installation directory is C:\Program Files\CubeBackup365 on Windows, and /opt/cubebackup365 on Linux.
2. If the new target server is Linux, please be sure to change the owner to cbuser. For example:sudo chown -R cbuser:cbuser /opt/cubebackup365/data sudo chown -R cbuser:cbuser /opt/cubebackup365/etc
Step 4. Edit the storage.json file if needed.
Manually open the <cubebackup installation directory>/data/storage.json file on the new server in a text editor and check whether any values need to be modified and modify accordingly. More information about fields in the storage.json file can be found here: CubeBackup for Microsoft 365 configuration guide: storage.json
Step 5. Create data index directory with proper permissions (This step is only necessary on a Linux server).
If the new server is a Windows machine, please skip directly to Step 6.
If the new server is a Linux server, you need to manually create a directory for the data index.
sudo mkdir -p /opt/cubebackup365/index
Note:
The original data index directory is defined in the /opt/cubebackup365/data/storage.json file. So, please ensure that the directory path you created is same as the value of IndexPath in the storage.json file.
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 generate a new data index in the correct location as long as the data index directory has the proper permissions.
Step 6. Restart the CubeBackup service on the new server.
Please run this command.
sudo /opt/cubebackup365/bin/cbsrv restart
Open a Command Prompt as Administrator, and run this command.
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" restart
Open the Windows PowerShell as Administrator, and run this command.
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" restart
Please run this command to restart the container.
sudo docker restart <container-name>
Step 7. 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.