stolon
stolon copied to clipboard
Can`t restore a backup
https://talk.stolon.io/t/can-t-restore-cluster-with-backup-pg-basebackup/255
Good day, need some help
Made a backup with the help of pg_basebackup
pg_basebackup --format=tar --verbose --write-recovery-conf --wal-method=stream
--gzip --compress=5 --host=$BACKUP_POSTGRES_HOST --port=$BACKUP_POSTGRES_PORT --username=$BACKUP_POSTGRES_USER \
-D $outputfile
Could restore in in docker postgres but can`t restore in stolon clsuter in kubernetes
stolonctl version 0.17.0
The backup is located in /tmp/backup/, wal archive too
I tried different variants of stolonctl init, but they doesn`t work
stolonctl init '{ "initMode": "pitr", "pitrConfig": { "dataRestoreCommand": "tar -xzvf /tmp/backup/base.tar.gz -C %d" , "archiveRecoverySettings": { "restoreCommand": "cp /tmp/backup/pg_wal/%f %p" }, "recoveryTargetSettings": {"recoveryTarget": "immediate", "recoveryTargetAction":"promote"} } }' --cluster-name=stolon-dev --store-backend=kubernetes --kube-resource-kind=configmap
sentinel says
waiting for db to converge {"db": "5d855218", "keeper": "keeper0"}
proxy says
no db object available, closing connections to master {"db": ""}
keeper says
archive recovery complete
cp: cannot stat '/tmp/backup/pg_wal/00000001.history': No such file or directory
database system is ready to accept connections
after that postgres doesn`t respond
what did i do wrong?
Found out that if i delete recovery.signal file everything is okay and restoration is done.
Why so? I even gave “recoveryTargetAction” parameter in init command