Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
pg_dump --host localhost --port 5432 --username nuxeo --format custom --file "nuxeo-postgresql-db-20150916.bak" nuxeo

This command will ask for the password of the Nuxeo database, so please prepare that in advance.

...

Code Block
docker exec -it postgres pg_restore --dbname=postgresql://nuxeo:nuxeop@127.0.0.1:5432/nuxeo /backup/nuxeo-postgresql-db-20150916.bak

To backup the database from the container, you need to execute:

Code Block
docker exec -it postgres pg_dump --dbname=postgresql://nuxeo:nuxeop@127.0.0.1:5432/nuxeo -Fc --file "/backup/nuxeo-postgresql.bak"

There is also automatic backup script that is disabled by default, to enable it you need to execute the next command:

Code Block
docker exec -itti postgres chmod +xtouch /etc/services/backup/run_enabled

After script enabling it will start to make the backup copies of the nuxeo database to the backup folder every hour.

...

Code Block
docker exec -it postgres vim /etcscripts/services/backup/runpostgresql_backup_script.sh

To stop the automatic backups you just need to:

Code Block
docker exec -it postgres chmodrm -xf /etc/services/backup/run_enabled

Run DMS PostgreSQL container on Linux

...