From 3d987300979d4a0ea5bc5be5ead10df1183cc87e Mon Sep 17 00:00:00 2001 From: Brian Lee Date: Tue, 18 Jul 2023 17:41:58 -0700 Subject: [PATCH] Add restore example. --- docs/examples/postgres-backup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/examples/postgres-backup.sh b/docs/examples/postgres-backup.sh index e7c937f..e3cde47 100755 --- a/docs/examples/postgres-backup.sh +++ b/docs/examples/postgres-backup.sh @@ -12,3 +12,8 @@ ssh root@${TARGET} "doas -u postgres /usr/bin/pg_dump -Fc nextcloud | /usr/bin/b mkdir -p $HOME/archive/${TARGET}/postgresql/ rsync -tav ${TARGET}:${DUMP_FILE} $HOME/archive/${TARGET}/postgresql/ ssh root@${TARGET} rm -v ${DUMP_FILE} + +# restore +#su - postgres +# dropdb nextcloud; createdb nextcloud +#bzcat nextcloud_*.dump.bz2 | pg_restore -d nextcloud \ No newline at end of file