ZTP Restore XOA From Backup
I'm working on a provisioning template to rebuild my XOA server without any sort of user interaction. A few questions:
- Assume XOA and all plugins are installed. When restoring from backup, is it ONLY necessary to restore the "XO config" in order to bring XOA back into service 100%?
- If not, what else needs to be backed up and restored?
- Using the xo-cli to restore the config from backup, may I presume the following command is correct and the data.json file is the config file I want to restore?
xo-cli xo.importConfig @=/tmp/config_backup/xo-config-backups/2f26913f-81a5-4fbd-af86-ce83f90e525b/20220331T070000Z/data.json
Just to be clear, I'm not talking about restoring any XCP-NG hosts. I'm specifically talking about restoring XOA on a new VM.
- When you deploy a fresh XOA, it's not registered. But if you import your backup config into it, this should do everything needed to be ready to go for updates
- So after importing the configuration, you need to run the updater multiple times.
Thanks, @olivierlambert . It looks like the restore mostly worked. There was one main issue:
After I restored the configuration, all of the plugins I had had to manually configure when I first installed XOA (auth-ldap, transport-email, and usage-report) were all disabled. When I tried to re-enable them, they failed with the "plugin not configured" error. However, when I expanded their configuration, it was still present thanks to the restore. What I had to do was manually change an arbitrary field in each plugin so that I could click the "Save Configuration" button. Then I was able to re-enable the plugin. Probably a bug I should report?
Hi @bnerickson, indeed, the configurations are correctly imported but plugins aren't automatically "configured" when you import a config. We'll improve that, thanks for the report
on my side importing backup config in a new XO installation worked (Using Webinterface). (i build from sources). Only thing wich bugs are backup jobs - i had to open and resubmit every backup job to get them work...