From 46171ed3a86e90d8c519a8ce94f379309936fbeb Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 28 Jan 2020 19:09:54 -0800 Subject: sql howto: database dumps --- sql/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sql/README.md b/sql/README.md index 38052fd..d3e838c 100644 --- a/sql/README.md +++ b/sql/README.md @@ -171,3 +171,10 @@ Can also do some quick lookups for a specific domain and protocol like: WHERE terminal_url LIKE 'https://insights.ovid.com/%' LIMIT 10; +## Full Database Dumps + +Run a dump in compressed, postgres custom format: + + export DATESLUG="`date +%Y-%m-%d.%H%M%S`" + time sudo -u postgres pg_dump --verbose --format=custom sandcrawler > /sandcrawler-db/snapshots/sandcrawler_full_dbdump_${DATESLUG}.pgdump + -- cgit v1.2.3