aboutsummaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-02-23 09:35:41 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-02-23 09:35:41 -0800
commit45464ab2a9ccc18b5440a531dc2e4fdf6508a342 (patch)
treee84bc29f2f04ab9eab5cffa085757984fd4048d7 /extra
parenta94b3cc03f3ba59191d6fa5343759ff01d594b93 (diff)
downloadfatcat-45464ab2a9ccc18b5440a531dc2e4fdf6508a342.tar.gz
fatcat-45464ab2a9ccc18b5440a531dc2e4fdf6508a342.zip
sql dumps: use 'custom' mode instead of 'tar'
Diffstat (limited to 'extra')
-rw-r--r--extra/sql_dumps/README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/extra/sql_dumps/README.md b/extra/sql_dumps/README.md
index 7ce59754..2c73fd20 100644
--- a/extra/sql_dumps/README.md
+++ b/extra/sql_dumps/README.md
@@ -96,9 +96,13 @@ This dump will contain all tables in the backend schema, except for "private"
authentication tables. For local or non-production machines, might need to
replace the `fatcat_prod` database name.
+Note that prior to 2022, public dumps were in `--format=tar`, but this results
+in many temporary files being written to disk, which causes unnecessarly load
+on the server.
+
# TODO: for production, probably want consistent serialization mode
export DATESLUG="`date +%Y-%m-%d.%H%M%S`"
- sudo -u postgres pg_dump --verbose --format=tar --exclude-table-data=auth_oidc fatcat_prod | pigz > /srv/fatcat/snapshots/fatcat_public_dbdump_${DATESLUG}.tar.gz
+ sudo -u postgres pg_dump --verbose --format=custom --exclude-table-data=auth_oidc fatcat_prod > /srv/fatcat/snapshots/fatcat_public_dbdump_${DATESLUG}.pgdump
Can also run using the remote/SSH options above.