c0c0n3 / odoo.box

All of Martel's Odoo stack on just one NixOS machine.
MIT License
3 stars 0 forks source link

Automate restoring of backups #26

Closed c0c0n3 closed 2 months ago

c0c0n3 commented 2 months ago

This PR installs a convenience systemd service to restore backups. The service takes the backup DB dump and file store and turns them into the live Odoo DB and file store, respectively. Notice systemd will never start this service, the sysadmin is meant to start it manually when they want to restore a backup.

The reason for automating this step too is that there's some easily-missed subtleties in the process of restoring a backup. So running the restore commands manually could result in inconsistent live data if the sysadmin makes a small mistake. The restore service avoids potential human error.