[ADD] migrate prod to test database
This commit is contained in:
parent
203ca82685
commit
a3cc183e25
2 changed files with 10 additions and 1 deletions
|
|
@ -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
8
script/migrate_prod_to_test.sh
Executable 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 $@
|
||||
Loading…
Reference in a new issue