aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-04-09 13:07:49 -0700
committerBryan Newbold <bnewbold@archive.org>2021-04-09 13:07:49 -0700
commit7f2a4c6fac70817cd28ac4f8853988995e7ec58d (patch)
tree1bee5c792164adbbfc77b48a4583513dd30452ad
parentaa1b437a629701db62a968a38b9d9764e7f912c2 (diff)
downloadsandcrawler-7f2a4c6fac70817cd28ac4f8853988995e7ec58d.tar.gz
sandcrawler-7f2a4c6fac70817cd28ac4f8853988995e7ec58d.zip
sql: notes on sql restore
-rw-r--r--sql/README.md9
1 files changed, 9 insertions, 0 deletions
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.