Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 26115c5660 | |||
| acef35ca8b | |||
| b531170bd7 |
@@ -197,16 +197,16 @@ version:
|
|||||||
loki: "3.7.1"
|
loki: "3.7.1"
|
||||||
grafana: "13.0.1"
|
grafana: "13.0.1"
|
||||||
## Postgresql
|
## Postgresql
|
||||||
postgresql: "18.2"
|
postgresql: "18.3"
|
||||||
# For immich - https://github.com/immich-app/base-images/blob/main/postgres/versions.yaml
|
# For immich - https://github.com/immich-app/base-images/blob/main/postgres/versions.yaml
|
||||||
# pgvector: "v0.8.1"
|
# pgvector: "v0.8.1"
|
||||||
vectorchord: "0.5.3"
|
vectorchord: "1.1.1"
|
||||||
# Auth
|
# Auth
|
||||||
authelia: "4.39.19"
|
authelia: "4.39.19"
|
||||||
# App
|
# App
|
||||||
vaultwarden: "1.35.8"
|
vaultwarden: "1.36.0"
|
||||||
gitea: "1.26.1"
|
gitea: "1.26.1"
|
||||||
redis: "8.6.1"
|
redis: "8.6.3"
|
||||||
immich: "v2.7.5"
|
immich: "v2.7.5"
|
||||||
actualbudget: "26.3.0"
|
actualbudget: "26.3.0"
|
||||||
paperless: "2.20.15"
|
paperless: "2.20.15"
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ podman exec -it -u postgres postgresql "psql -U postgres"
|
|||||||
> \l
|
> \l
|
||||||
> \q
|
> \q
|
||||||
|
|
||||||
# Restor database (manually)
|
# Restore database (manually)
|
||||||
podman exec -u postgres postgresql "psql -U postgres -f $POSTGRESQL_BACKUP_PATH_IN_CONTAINER/script.sql"
|
podman exec -u postgres postgresql "psql -U postgres -f $POSTGRESQL_BACKUP_PATH_IN_CONTAINER/script.sql"
|
||||||
|
|
||||||
# Backup service executes
|
# Backup service executes
|
||||||
systemctl --user start postgresql-cluster-backup.service
|
systemctl --user start postgresql-cluster-backup.service
|
||||||
|
|
||||||
# Stop and remove all data
|
# Stop and remove all data
|
||||||
systemctl --stop postgresql
|
systemctl --user stop postgresql
|
||||||
sudo find "/home/infra/data/containers/postgresql/data" -mindepth 1 -delete
|
sudo find "/home/infra/data/containers/postgresql/data" -mindepth 1 -delete
|
||||||
|
|
||||||
# Restore database
|
# Restore database
|
||||||
@@ -62,3 +62,39 @@ postgres=# SHOW shared_preload_libraries;
|
|||||||
vchord.so
|
vchord.so
|
||||||
(1 row)
|
(1 row)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Update and upgrade version
|
||||||
|
|
||||||
|
### Update version
|
||||||
|
|
||||||
|
#### Prerequisite
|
||||||
|
|
||||||
|
- Shutdown all related services on [infra, auth, app] vms.
|
||||||
|
- [service list](../../../ansible/roles/infra/tasks/services/set_postgresql.yaml)
|
||||||
|
- `systemctl --user stop $SERVICE`
|
||||||
|
|
||||||
|
- Run backup service unit on infra vm.
|
||||||
|
- `systemctl --user start postgresql-cluster-backup.service`
|
||||||
|
- `systemctl --user start postgresql-data-backup@$SERVICE.service`
|
||||||
|
|
||||||
|
- Modify postgresql and extension version and run ansible playbook
|
||||||
|
- [version info](../../../ansible/inventory/group_vars/all.yaml)
|
||||||
|
- `ansible-playbook playbooks/infra/site.yaml --tags "postgresql"`
|
||||||
|
|
||||||
|
- Check postgresql container and update extension
|
||||||
|
|
||||||
|
```postgresql
|
||||||
|
# immich example
|
||||||
|
# extension should be checked on each database which needs the extension
|
||||||
|
\c immich_db
|
||||||
|
\dx
|
||||||
|
# check the installed_version and default_version
|
||||||
|
ALTER EXTENSION vchord UPDATE;
|
||||||
|
REINDEX INDEX face_index;
|
||||||
|
REINDEX INDEX clip_index;
|
||||||
|
```
|
||||||
|
|
||||||
|
- Run playbook to start all services
|
||||||
|
- `ansible-playbook playbooks/[infra, auth, app]/site.yaml --tags "site"`
|
||||||
|
|
||||||
|
- Check all services
|
||||||
|
|||||||
Reference in New Issue
Block a user