Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Codeblock
languagebash
themeMidnight
titleRestore bei PostgreSQL auf HostBackup auspacken und filestore umbenennen
$ cp odoo-backup.zip /var/lib/postgresql
$ chown postgres: /var/lib/postgresql/odoo-backup.zip
$ su postgres
$ psql
postgres=# ALTER DATABASE test_odoo RENAME TO bak_test_test;
postgres=# CREATE DATABASE test_odoo OWNER test_pg TEMPLATE template1;
\q

$ cd /var/lib/postgresql
$ unzip odoo-backup.zip
$ psql -U test_pg -f odoo_test/dump.sql -d test_odoo -h localhost -p 5432
 docker exec -i muster-db psql -U myodoo -d postgres -c "drop database muster;"
# Im Postgres-Container Template Datenbank erzeugen
$ docker exec -i muster-db psql -U myodoo -d postgres -c "CREATE DATABASE muster OWNER myodoo TEMPLATE template1;"

# Backup auspacken und filestore umbenennen
$ unzip muster_dockerbackup_yyyy-mm-dd_hh-mm-ss.zip
$ cd muster/
$ mv filestore/ muster/


Codeblock
languagebash
themeMidnight
titleIm Postgres-Container Datenbank-Backup einspielen
$ cat dump.sql | docker exec -i muster-db psql -U myodoo -d "muster"
$ rm dump.sql


Codeblock
languagebash
themeMidnight
titleRestore Filestore
$ rm -rf /opt/myodoo/muster
$ mkdir -p /opt/myodoo/muster/data/filestore
$ mv muster /opt/myodoo/muster/data/filestore

...

Codeblock
languagebash
themeMidnight
titleMyOdoo Container starten
$ docker start muster-myodoo


Codeblock
languagebash
themeMidnight
titlePostgres Container
$ cp odoo-backup.zip /var/lib/postgresql
$ chown postgres: /var/lib/postgresql/odoo-backup.zip
$ su postgres
$ psql
postgres=# ALTER DATABASE test_odoo RENAME TO bak_test_test;
postgres=# CREATE DATABASE test_odoo OWNER test_pg TEMPLATE template1;
\q

$ cd /var/lib/postgresql
$ unzip odoo-backup.zip
$ psql -U test_pg -f odoo_test/dump.sql -d test_odoo -h localhost -p 5432

Nach Stichwort filtern (Inhalt nach Stichwort)
showLabelsfalse
max5
spacesMD
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "docker" , "shell" , "bash" ) and type = "page" and space = "MD"
labelsDocker Bash Shell

...