Changes for page PostgreSQL

Last modified by Sebastian Marsching on 2023/03/22 23:25

From version 3.1
edited by Sebastian Marsching
on 2023/03/22 23:22
Change comment: There is no comment for this version
To version 5.1
edited by Sebastian Marsching
on 2023/03/22 23:23
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -22,7 +22,7 @@
22 22  
23 23  ```sh
24 24  docker volume create postgresql-data-old
25 -docker run --rm -it -v postgresql-data:/data -v postgresql-data-old:/data-old alpine mv "/data/*" /data-old/
25 +docker run --rm -it -v postgresql-data:/data -v postgresql-data-old:/data-old alpine sh -c "mv /data/* /data-old/"
26 26  ```
27 27  
28 28  Now, we replace the PostgreSQL container with a new container using the image for the new PostgreSQL version. How this is done strongly depends on the setup (e.g. when using Salt, this might be as easy as changing the version number in the SLS and applying it).
... ... @@ -30,7 +30,7 @@
30 30  Once this has been done, the container is running again, but now with the new version and an empty database. We can now start a second container with the old data in order to dump and restore it:
31 31  
32 32  ```sh
33 -docker container run --rm -it -v postgresql-data-old:/var/lib/postgresql-data --name postgresql-old postgresql:x.x-alpine
33 +docker container run --rm -it -v postgresql-data-old:/var/lib/postgresql/data --name postgresql-old postgresql:x.x-alpine
34 34  ```
35 35  
36 36  In this example, `x.x` has to be replaced by the version number of the old PostgreSQL version.