[ADD] migrate prod to test database

This commit is contained in:
Mathieu Benoit 2021-05-13 01:03:09 -04:00
parent 203ca82685
commit a3cc183e25
2 changed files with 10 additions and 1 deletions

View file

@ -62,9 +62,10 @@ cd /[EL_USER]/erplibre
## Move prod database to dev
When moving prod database to your dev environment, you want to remove email servers and install user test to test the database.
Warning, this is not safe for production, you expose all data.
Run:
```bash
./run.sh --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
./script/migrate_prod_to_test.sh DATABASE
```
## Update production

8
script/migrate_prod_to_test.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [ $# -lt 1 ]; then
# TODO: print usage
echo "Missing database name"
exit 1
fi
source ./.venv/bin/activate
python3 ./odoo/odoo-bin -c ./config.conf --limit-time-real 99999 --limit-time-cpu 99999 --stop-after-init -i user_test,disable_mail_server,disable_auto_backup --dev all -d $@