If you have access to the inventory of the odoo instance you want to restore, you can use the restore playbook of odoo-provisioning. For more details, visit restore playbook of backups-role.
Note that the restore-to-controller
task list is intended to install restic and download it in the same machine where you execute ansible, i.e., the controller. If you want to restore it to the source server, you can use the restore-to-host
task file to create a simple playbook
restic version
export RESTIC_REPOSITORY='b2:BUCKET_NAME:REPO_PATH'
export RESTIC_PASSWORD='p4ssw0rD'
export B2_ACCOUNT_ID='MY_APPLICATION_KEY_ID'
export B2_ACCOUNT_KEY='MY_SECRET_ACCOUNT_KEY'
restic snapshots
and select which snapshot you want to restore.restic restore $SNAPSHOT_ID -t .
WARNING, a better procedure must be studied, one that only deletes current db once the restore is checked. However, it involves database name and must be tested
https://my_odo.org/web/database/manager
After duplicating the database, you must deactivate (archive) both inbound and outbound email servers if is a test environment or not need the mail configurations.
See Deactivate Mail Servers And Cron Jobs
The -l option gives the file size
restic ls -l <snapshot>
View the files inside the backup with then name
restic ls -l <snapshot> <file>
restic restore <snapshot> --target <backup destination folder> --include <file to download>