Browse Source

chg: doc: update instruction to save and load odoo data

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
rc1
Valentin Lab 2 years ago
parent
commit
38b5d68276
  1. 53
      README.org

53
README.org

@ -317,47 +317,17 @@ docker-ip
**** Backups
***** Backuping odoo account (filestore and database)
There are still some quirks, so be sure:
- to change your current directory to =/opt/apps/myc-deploy=
- your odoo instance should be already up.
- to have =admin-password= defined in your =compose.yml=, in your
=odoo= service's =options=.
#+BEGIN_SRC yaml
odoo:
options:
admin-password: XXXXXX
#+END_SRC
Be sure that your odoo instance should be already up.
#+BEGIN_SRC sh
MYODOOSERVICENAME=odoo
DBNAME="$MYODOOSERVICENAME"
OUTPUTFILE=backup-odoo.zip
cd /opt/apps/myc-deploy &&
compose save "$MYODOOSERVICENAME" "$DBNAME" "$OUTPUTFILE"
compose save "$MYODOOSERVICENAME" "$DBNAME" > "$OUTPUTFILE"
#+END_SRC
The backup file should be in the same directory.
***** Restoring odoo account (filestore and database)
There are still some quirks, so be sure:
- to change your current directory to =/opt/apps/myc-deploy=
and put your backup file in the same directory
- your odoo instance should be already up.
- an odoo base should not exist with the same name prior to restoring
if it is the case, =ODOOBASE=odoo && pgm rm "$ODOOBASE" -f && rm -rf
- to have =admin-password= defined in your =compose.yml=, in your
=odoo= service's =options=.
#+BEGIN_SRC yaml
odoo:
options:
admin-password: XXXXXX
#+END_SRC
*IMPORTANT* you might want to consider the usage of =docker-cutoff= if
you are restoring a production odoo onto a dev or staging odoo that you
don't want to allow to go mess around with sending mails or fetching mails.
@ -372,24 +342,7 @@ These are the normal loading instructions:
MYODOOSERVICENAME=odoo
DBNAME="$MYODOOSERVICENAME"
SOURCEFILE=backup-odoo.zip
cd /opt/apps/myc-deploy &&
compose load "$MYODOOSERVICENAME" "$SOURCEFIE" "$DBNAME"
#+END_SRC
***** charger un dump SQL dans odoo
Supporte *.dump ou sql (non compressé), *.gz ou *.bz2:
#+BEGIN_SRC sh
compose load-db odoo MONFICHIER.dump.bz2
#+END_SRC
***** sauvegarder dump db de odoo
Pour l'instant on passe par pgm
#+BEGIN_SRC sh
compose save-db odoo MONFICHIER.dump.bz2
compose load "$MYODOOSERVICENAME" "$DBNAME" < "$SOURCEFILE"
#+END_SRC
**** Update de modules

Loading…
Cancel
Save