Hi,
Does anyone have a method worked out for transferring and upgrading the version of Postgres used by a Zabbix system that is within a container?
I have the following containers within a Pod
docker.io/zabbix/zabbix-agent2:alpine-6.4-latest zabbix-agent
docker.io/library/postgres:14-alpine zabbix-db
docker.io/zabbix/zabbix-server-pgsql:alpine-6.4-latest zabbix-server
docker.io/zabbix/zabbix-web-nginx-pgsql:alpine-6.4-latest zabbix-web
I can stop the whole Pod and alter the quadlets for the zabbix images to be 7.4 for example then restart the Pod and its all fine.
However for postgres , when I
Have only the Postgres container running
Take a pgdump with custom format of the zabbix database within the postgres container
Transfer the resultant dump file to a new host with new containers [even with same version of image file]
Stop new Pod and start only the Db container
Do a pgrestore from transferred dump file
It always complains of pre-existing items when trying to create the new database - even if I use --clean and --create on the pgrestore command
I'm aware of the Postgres path changes in version 18 that effect the bound volume in Postgres container , but this is even going to the same version (14) in a pre-upgrade test.
Im wondering if I actually need to delete the pg data directory so it doesn't think there is an already initialised db present.
Anyway, I've tried various combinations of those 5 basic steps above and always find errors upon the restore bit - even with a psql run , or pgdumpall/pgrestoreall but pgdump/pgrestore with specific db seems to get further
Sorry for the lack of specific commands and verbatim output - there was a lot of it and I thought I would ask the simple question first - does anyone have a tried method for moving from one container hosting server to another and subsequently an upgrade.
Thanks for taking time to read.
-Stephen.
Does anyone have a method worked out for transferring and upgrading the version of Postgres used by a Zabbix system that is within a container?
I have the following containers within a Pod
docker.io/zabbix/zabbix-agent2:alpine-6.4-latest zabbix-agent
docker.io/library/postgres:14-alpine zabbix-db
docker.io/zabbix/zabbix-server-pgsql:alpine-6.4-latest zabbix-server
docker.io/zabbix/zabbix-web-nginx-pgsql:alpine-6.4-latest zabbix-web
I can stop the whole Pod and alter the quadlets for the zabbix images to be 7.4 for example then restart the Pod and its all fine.
However for postgres , when I
Have only the Postgres container running
Take a pgdump with custom format of the zabbix database within the postgres container
Transfer the resultant dump file to a new host with new containers [even with same version of image file]
Stop new Pod and start only the Db container
Do a pgrestore from transferred dump file
It always complains of pre-existing items when trying to create the new database - even if I use --clean and --create on the pgrestore command
I'm aware of the Postgres path changes in version 18 that effect the bound volume in Postgres container , but this is even going to the same version (14) in a pre-upgrade test.
Im wondering if I actually need to delete the pg data directory so it doesn't think there is an already initialised db present.
Anyway, I've tried various combinations of those 5 basic steps above and always find errors upon the restore bit - even with a psql run , or pgdumpall/pgrestoreall but pgdump/pgrestore with specific db seems to get further
Sorry for the lack of specific commands and verbatim output - there was a lot of it and I thought I would ask the simple question first - does anyone have a tried method for moving from one container hosting server to another and subsequently an upgrade.
Thanks for taking time to read.
-Stephen.