Restoring
Restoring an instance
prod-1# odoocli instance restore --instance acmeRestore configuration, like backup configuration, is per instance:
prod-1# odoocli instance restore-config show --instance acmeprod-1# odoocli instance restore-config set --instance acmeRestoring a database
prod-1# odoocli instance database restore --instance acmeThe safe pattern for production is to restore alongside rather than over: restore into a new database name, check it, then switch the instance's active database to it.
prod-1# odoocli instance database activate --instance acmeThat way the previous database is still there if the restored one turns out to be wrong.
Restore sources
You can restore from any target that is configured for the instance, and from a file you supply.
Without a Professional licence, cloud sources are simply not offered. Local and FTP sources still are, and a backup file you hand over directly always works. If your only copy is in S3 and your licence has lapsed, fetch the file with your own S3 client and restore it as a local file.
A disaster-recovery drill
A backup you have never restored is a hypothesis. Once a quarter is enough to turn it into a fact.
- Take a fresh instance backup and note the job id.
- Create a new instance on the same server, or a scratch server, with the same Odoo version and edition.
- Restore the backup into it.
- Initialise nothing. If the restore worked, the database is already there.
- Sign in to Odoo and check the data you would actually miss: recent invoices, recent attachments, the filestore.
- Remove the scratch instance.
Two things this catches that nothing else does: a backup that has been silently skipping its cloud target for months, and a filestore that is not in the backup you assumed covered it.
Rolling back a version upgrade
The master database schema upgrade is forward-only. An older binary refuses to start against a newer schema.
That means rolling Antelao itself back is not just reinstalling the old package: you must also restore the master database from before the upgrade. Plan the backup of the master database as part of the upgrade, not as part of the rollback.