From c7c53d8a38b3ca86bb35f2ccccd838de3ed76d0a Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 15 Aug 2023 08:59:29 +0200 Subject: [PATCH] Add script to dump local database --- bin/dump_local_database.sh | 2 ++ docs/clean-up-prod-db-for-import.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100755 bin/dump_local_database.sh diff --git a/bin/dump_local_database.sh b/bin/dump_local_database.sh new file mode 100755 index 00000000..0254aa50 --- /dev/null +++ b/bin/dump_local_database.sh @@ -0,0 +1,2 @@ +#!/bin/bash +pg_dump -Fc --no-acl --no-owner -h localhost -U skillbox skillbox_import > ../local.dump diff --git a/docs/clean-up-prod-db-for-import.md b/docs/clean-up-prod-db-for-import.md index c5166779..d7cebaf4 100644 --- a/docs/clean-up-prod-db-for-import.md +++ b/docs/clean-up-prod-db-for-import.md @@ -10,7 +10,7 @@ User.objects.filter(is_superuser=False).delete() Make local dump of database ``` -./scripts/dump_local_database.sh +./bin/dump_local_database.sh ``` Copy local dump to s3 bucket