Created
March 30, 2022 14:28
-
-
Save shibafu528/e90d34a88b84eadcd1a973c129ee9034 to your computer and use it in GitHub Desktop.
ertona 2022-03-16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
953 cd mastodon/ | |
954 mkdir postgres14 | |
955 ll | |
956 sudo mount /dev/nvme3n1p1 postgres14 | |
957 df | |
958 docker-compose stop | |
960 vim docker-compose.yml | |
962 docker-compose up -d db | |
964 docker-compose logs -f --tail=10 | |
967 docker-compose stop | |
968 docker-compose ps | |
971 vim docker-compose.yml | |
972 docker run --rm -it -v $(pwd)/postgres:/var/lib/postgresql/9.6/data -v $(pwd)/postgres14:/var/lib/postgresql/14/data tianon/postgres-upgrade:9.6-to-14 --check | |
973 docker run --rm -it -v $(pwd)/postgres:/var/lib/postgresql/9.6/data -v $(pwd)/postgres14:/var/lib/postgresql/14/data tianon/postgres-upgrade:9.6-to-14 | |
977 docker-compose up -d db | |
979 docker-compose exec db vacuumdb -U postgres --all --analyze-in-stages | |
980 vim docker-compose.yml | |
981 docker-compose up -d web db sidekiq | |
982 vim docker-compose.yml | |
983 docker-compose up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
今回ertonaで行った作業 | |
- postgres/14-alpineを参照するようにdocker-compose.ymlを変更 | |
- pg14用のdataディレクトリを用意 | |
- tianon/postgres-upgrade:9.6-to-14 を使ってpg_upgrade | |
dumpで移行するにはEBSの残容量が微妙な感じだったので、pg14用にEBS新規作成してpg_upgradeを実施した。9.6のdataが格納されてるEBSはそのうち捨てる。 | |
https://ertona.net/@shibafu528/107963837110886524 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment