|
@ -317,47 +317,17 @@ docker-ip |
|
|
**** Backups |
|
|
**** Backups |
|
|
***** Backuping odoo account (filestore and database) |
|
|
***** 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 |
|
|
#+BEGIN_SRC sh |
|
|
MYODOOSERVICENAME=odoo |
|
|
MYODOOSERVICENAME=odoo |
|
|
DBNAME="$MYODOOSERVICENAME" |
|
|
DBNAME="$MYODOOSERVICENAME" |
|
|
OUTPUTFILE=backup-odoo.zip |
|
|
OUTPUTFILE=backup-odoo.zip |
|
|
cd /opt/apps/myc-deploy && |
|
|
|
|
|
compose save "$MYODOOSERVICENAME" "$DBNAME" "$OUTPUTFILE" |
|
|
|
|
|
|
|
|
compose save "$MYODOOSERVICENAME" "$DBNAME" > "$OUTPUTFILE" |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
The backup file should be in the same directory. |
|
|
|
|
|
|
|
|
|
|
|
***** Restoring odoo account (filestore and database) |
|
|
***** 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 |
|
|
*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 |
|
|
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. |
|
|
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 |
|
|
MYODOOSERVICENAME=odoo |
|
|
DBNAME="$MYODOOSERVICENAME" |
|
|
DBNAME="$MYODOOSERVICENAME" |
|
|
SOURCEFILE=backup-odoo.zip |
|
|
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 |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
**** Update de modules |
|
|
**** Update de modules |
|
|