Defaulted container "postgres" out of: postgres, backup-restore-sidecar, backup-restore-sidecar-provider (init)
{"level":"info","timestamp":"2023-08-23T05:39:37Z","caller":"cmd/main.go:290","msg":"read config file","config-file":"/etc/backup-restore-sidecar/config.yaml"}
{"level":"info","timestamp":"2023-08-23T05:39:37Z","caller":"cmd/main.go:359","msg":"initialized database adapter","type":"postgres"}
{"level":"info","timestamp":"2023-08-23T05:39:37Z","logger":"wait","caller":"wait/wait.go:25","msg":"waiting until initializer completes","interval":"3s"}
{"level":"info","timestamp":"2023-08-23T05:39:40Z","logger":"wait","caller":"wait/wait.go:40","msg":"initializer succeeded, database can be started","message":"done"}
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: error: directory "/data/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/data/postgres" or run initdb
with an argument other than "/data/postgres".
This is because the backup-restore-sidecar initializer will allways first copy over the postgres binaries:
github-runner@integration-0:~/actions-runner/_work/releases/releases/mini-lab$ kubectl -n metal-control-plane logs ipam-db-0 -c backup-restore-sidecar
{"level":"info","timestamp":"2023-08-23T05:23:20Z","caller":"cmd/main.go:290","msg":"read config file","config-file":"/etc/backup-restore-sidecar/config.yaml"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","caller":"cmd/main.go:359","msg":"initialized database adapter","type":"postgres"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","caller":"cmd/main.go:405","msg":"initialized backup provider","type":"local"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","caller":"cmd/main.go:118","msg":"starting backup-restore-sidecar","version":"v0.7.0 (0cdb888d), tags/v0.7.0-0-g0cdb888, go1.21.0","bind-addr":"127.0.0.1:8000"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"initializer","caller":"initializer/initializer.go:70","msg":"start initializer server","address":"127.0.0.1:8000"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"initializer","caller":"initializer/initializer.go:107","msg":"start running initializer"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"initializer","caller":"initializer/initializer.go:109","msg":"ensuring backup bucket"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"backup","caller":"local/local.go:65","msg":"ensuring backup bucket called for provider local"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"initializer","caller":"initializer/initializer.go:116","msg":"checking database"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"postgres","caller":"postgres/postgres.go:55","msg":"data directory is empty"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"initializer","caller":"initializer/initializer.go:130","msg":"database potentially needs to be restored, looking for backup"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"backup","caller":"local/local.go:115","msg":"listing backups called for provider local"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"initializer","caller":"initializer/initializer.go:139","msg":"there are no backups available, it's a fresh database. allow database to start"}
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"postgres","caller":"postgres/upgrade.go:284","msg":"copying postgres binaries for later upgrades","from":"/usr/local/bin","to":"/data/postgres/pg-bin-v12"}
'/usr/local/bin/tini' -> '/data/postgres/pg-bin-v12/tini'
'/usr/local/bin/backup-restore-sidecar' -> '/data/postgres/pg-bin-v12/backup-restore-sidecar'
'/usr/local/bin/docker-entrypoint.sh' -> '/data/postgres/pg-bin-v12/docker-entrypoint.sh'
'/usr/local/bin/pg_restore' -> '/data/postgres/pg-bin-v12/pg_restore'
'/usr/local/bin/ecpg' -> '/data/postgres/pg-bin-v12/ecpg'
'/usr/local/bin/pgbench' -> '/data/postgres/pg-bin-v12/pgbench'
'/usr/local/bin/pg_receivewal' -> '/data/postgres/pg-bin-v12/pg_receivewal'
'/usr/local/bin/pg_upgrade' -> '/data/postgres/pg-bin-v12/pg_upgrade'
'/usr/local/bin/clusterdb' -> '/data/postgres/pg-bin-v12/clusterdb'
'/usr/local/bin/initdb' -> '/data/postgres/pg-bin-v12/initdb'
'/usr/local/bin/pg_dumpall' -> '/data/postgres/pg-bin-v12/pg_dumpall'
'/usr/local/bin/pg_standby' -> '/data/postgres/pg-bin-v12/pg_standby'
'/usr/local/bin/createdb' -> '/data/postgres/pg-bin-v12/createdb'
'/usr/local/bin/pg_basebackup' -> '/data/postgres/pg-bin-v12/pg_basebackup'
'/usr/local/bin/vacuumdb' -> '/data/postgres/pg-bin-v12/vacuumdb'
'/usr/local/bin/pg_resetwal' -> '/data/postgres/pg-bin-v12/pg_resetwal'
'/usr/local/bin/pg_test_timing' -> '/data/postgres/pg-bin-v12/pg_test_timing'
'/usr/local/bin/pg_recvlogical' -> '/data/postgres/pg-bin-v12/pg_recvlogical'
'/usr/local/bin/pg_ctl' -> '/data/postgres/pg-bin-v12/pg_ctl'
'/usr/local/bin/pg_dump' -> '/data/postgres/pg-bin-v12/pg_dump'
'/usr/local/bin/pg_controldata' -> '/data/postgres/pg-bin-v12/pg_controldata'
'/usr/local/bin/dropuser' -> '/data/postgres/pg-bin-v12/dropuser'
'/usr/local/bin/psql' -> '/data/postgres/pg-bin-v12/psql'
'/usr/local/bin/pg_rewind' -> '/data/postgres/pg-bin-v12/pg_rewind'
'/usr/local/bin/pg_archivecleanup' -> '/data/postgres/pg-bin-v12/pg_archivecleanup'
'/usr/local/bin/postgres' -> '/data/postgres/pg-bin-v12/postgres'
'/usr/local/bin/dropdb' -> '/data/postgres/pg-bin-v12/dropdb'
'/usr/local/bin/createuser' -> '/data/postgres/pg-bin-v12/createuser'
'/usr/local/bin/vacuumlo' -> '/data/postgres/pg-bin-v12/vacuumlo'
'/usr/local/bin/pg_waldump' -> '/data/postgres/pg-bin-v12/pg_waldump'
'/usr/local/bin/oid2name' -> '/data/postgres/pg-bin-v12/oid2name'
'/usr/local/bin/pg_isready' -> '/data/postgres/pg-bin-v12/pg_isready'
'/usr/local/bin/pg_config' -> '/data/postgres/pg-bin-v12/pg_config'
'/usr/local/bin/pg_test_fsync' -> '/data/postgres/pg-bin-v12/pg_test_fsync'
'/usr/local/bin/postmaster' -> '/data/postgres/pg-bin-v12/postmaster'
'/usr/local/bin/reindexdb' -> '/data/postgres/pg-bin-v12/reindexdb'
'/usr/local/bin/pg_checksums' -> '/data/postgres/pg-bin-v12/pg_checksums'
'/usr/local/bin' -> '/data/postgres/pg-bin-v12'
{"level":"info","timestamp":"2023-08-23T05:23:20Z","logger":"postgres","caller":"postgres/upgrade.go:46","msg":"\"/data/postgres/PG_VERSION\" is not present, no upgrade required"}