{"id":3908,"date":"2021-02-23T13:58:05","date_gmt":"2021-02-23T19:58:05","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3908"},"modified":"2021-02-23T14:05:08","modified_gmt":"2021-02-23T20:05:08","slug":"backup-matrix-postgresql-database","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/backup-matrix-postgresql-database\/","title":{"rendered":"Backup Matrix Synapse  PostgreSQL Database"},"content":{"rendered":"\n<p>This is part of a series of posts on backing up and restoring a backup for Matrix Synapse server.  Synapse was installed using the <a href=\"https:\/\/github.com\/spantaleev\/matrix-docker-ansible-deploy\">matrix-docker-ansible<\/a> deployment which while a little complicated can greatly ease management later on down the road.  All the main components are in docker containers so we need to use docker to access.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/spantaleev\/matrix-docker-ansible-deploy\/blob\/master\/docs\/maintenance-postgres.md#backing-up-postgresql\">https:\/\/github.com\/spantaleev\/matrix-docker-ansible-deploy\/blob\/master\/docs\/maintenance-postgres.md#backing-up-postgresql<\/a><\/p>\n\n\n\n<p>As the root user run<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">docker exec --env-file=\/matrix\/postgres\/env-postgres-psql matrix-postgres pg_dumpall -h matrix-postgres | gzip -c &gt; \/matrix\/postgres.sql.gz<\/pre>\n\n\n\n<p>This will dump the Postgres database in \/matrix\/postgres.sql.gz<br>We can use this later to restore to a new server or keep as a backup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is part of a series of posts on backing up and restoring a backup for Matrix Synapse server. Synapse was installed using the matrix-docker-ansible deployment which while a little complicated can greatly ease management later on down the road. &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/backup-matrix-postgresql-database\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1185],"tags":[75,246,1186,1188,1189,1187],"class_list":["post-3908","post","type-post","status-publish","format-standard","hentry","category-linux","category-matrix","tag-backup","tag-docker","tag-matrix","tag-postgres","tag-psql","tag-synapse"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3908"}],"version-history":[{"count":3,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3908\/revisions"}],"predecessor-version":[{"id":3911,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3908\/revisions\/3911"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}