brioche & docker pg upgrade
This commit is contained in:
parent
bfbe6024bb
commit
b8afdeaf14
2 changed files with 76 additions and 0 deletions
24
content/geek/docker/postgresql.md
Normal file
24
content/geek/docker/postgresql.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
+++
|
||||
title = 'Postgresql'
|
||||
date = 2025-03-28T21:43:20+01:00
|
||||
+++
|
||||
|
||||
|
||||
# Docker upgrade
|
||||
|
||||
First, create the new volume to new version
|
||||
|
||||
```
|
||||
docker volume create postgres-XX
|
||||
```
|
||||
|
||||
In `docker-compose` add in volume the section with the new volume.
|
||||
In service duplicate the postgres section, append version
|
||||
|
||||
start the new empty database, import new data like:
|
||||
|
||||
```
|
||||
docker-compose exec --user postgres -i postgres16 pg_dumpall | docker-compose exec --user postgres -T postgres psql
|
||||
```
|
||||
|
||||
Then remove old DB in __docker-compose.yml__, clean volume etc.
|
||||
Loading…
Add table
Add a link
Reference in a new issue