Skip to content

Commit

Permalink
update local setup upgrade stash instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielburnworth committed Aug 23, 2024
1 parent 5f93727 commit 3569baf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.vscode
*.log
*.pem
dump.sql
*.sql
passenger.*.pid
*.tsbuildinfo
*.pid.lock
Expand Down
7 changes: 5 additions & 2 deletions local_setup_instructions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ sudo docker compose up
# Create a database backup (this will overwrite dump.sql!)
# If you do not do this before `git pull`, you will need to `git reset` first.
sudo docker compose exec db pg_dumpall -U postgres > dump.sql
# Create a backup of the dump.sql file
# Create a backup of the dump.sql file. This will be gitignored
# or stashed in the next step to not interfere with the git pull later.
cp -vi dump.sql dump_$(date +%Y%m%d%H%M%S).sql
# Stage and stash to avoid conflicts with the `git pull`. Stage:
git add .
git stash save "dump.sql backup"
# And stash. Any output from this command is fine.
git stash save "pre-upgrade"
# Shut down the server again to stop the database service
sudo docker compose down
# Stop and remove containers
Expand Down

0 comments on commit 3569baf

Please sign in to comment.