diff --git a/README.org b/README.org index a082ab0..35e699b 100644 --- a/README.org +++ b/README.org @@ -235,14 +235,60 @@ 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 + + #+BEGIN_SRC sh -compose save odoo DBNAME OUTPUT_FILE +MYODOOSERVICENAME=odoo +DBNAME="$MYODOOSERVICENAME" +OUTPUTFILE=backup-odoo.zip +cd /opt/apps/myc-deploy && +compose save "$MYODOOSERVICENAME" "$DBNAME" "$OUTPUT_FILE" #+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. +- 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. + +#+BEGIN_SRC yaml +docker-cutoff 25 993 465 +#+END_SRC + +These are the normal loading instructions: + #+BEGIN_SRC sh -compose load odoo SOURCE_FILE DBNAME +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