From 7f2a4c6fac70817cd28ac4f8853988995e7ec58d Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 9 Apr 2021 13:07:49 -0700 Subject: sql: notes on sql restore --- sql/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sql') diff --git a/sql/README.md b/sql/README.md index e34feec..1d53d6d 100644 --- a/sql/README.md +++ b/sql/README.md @@ -149,3 +149,12 @@ Run a dump in compressed, postgres custom format: As of 2021-04-07, this process runs for about 4 hours and the compressed snapshot is 88 GBytes (compared with 551.34G database disk consumption). + +To restore a dump (which will delete local database content, if any): + + sudo su postgres + createuser --no-login web_anon + createuser -s sandcrawler + time pg_restore --jobs=4 --verbose --clean --if-exists --create --exit-on-error -d postgres sandcrawler_full_dbdump_2021-04-08.003952.pgdump + +Took about 2.5 hours. -- cgit v1.2.3