A 'crypto/rsa:decryption error' message popped up after I reinstalled CubeBackup. What's gone wrong?
You may run into a "… crypto/rsa: decryption error crypto/rsa: decryption error" in the configuration wizard after reinstalling CubeBackup. For example:
What does this error mean?
When CubeBackup is uninstalled, all backup files, data indexes, configuration files, as well as the encryption key remain untouched. When you reinstall CubeBackup on the same computer, to the same directory, CubeBackup will continue incremental backups where you left off using the same configuration and encryption key as before.
However, you may run into the "crypto/rsa: decryption error" if:
- You reinstalled CubeBackup on a different computer or to a different directory, while trying to point to the original backup data during the initial configuration.
- You manually removed the CubeBackup installation folder before reinstalling.
By default, your backup data was encrypted in CubeBackup. When you reinstall CubeBackup in a different place, a new encryption key pair is generated, which is different than the pair used to encrypt your data originally. Therefore, your old backups cannot be accessed and decrypted by the new installation. For more information about data encryption and the encryption key, please visit How is the backup encrypted in CubeBackup.
NOTE: We strongly recommend keeping the files in the original installation folder when uninstalling CubeBackup. You should be especially careful to keep a copy of the encryption file <installation directory>/db/keys.json and store it in a safe place. Should the keys.json encryption file be lost, all backup data will become unreadable!
Please use the original keys.json encryption key file left over from your first install:
Copy the original keys.json file to overwrite the keys.json file generated by the second install.
Tip: The original encryption key should be stored in the <CubeBackup first installation directory>/db folder if you did not manually remove this directory.
Restart the CubeBackup service.
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
Retry the configuration wizard by clicking the Next button.
If you cannot find the original keys.json file, all Google Workspace data which has been backed up by your first installation will be unreadable since it cannot be decrypted without the correct encryption key. You will, unfortunately, have to restart everything from scratch:
- Remove the backup data directory.
- Remove the data index directory.
- Retry the configuration wizard by clicking the Next button.