Repository navigation
Changing the S3 storage (used for backups) on a running cluster? #3071
Unanswered
johanneskastl
asked this question in
Q&A
Replies: 1 comment 2 replies
|
Yeah, changing the S3 URL and credentials in the secret should work, but the operator won't automatically trigger a new backup — it'll pick up the new config on the next scheduled backup. You can trigger a manual backup by creating a custom script or just force it via the spilo container: kubectl exec -it <postgres-pod> -c postgres -- envdir /run/etc/wal-e.d/env /scripts/postgres_backup.sh <pgdata-path>The old backups won't be in the new S3 location though — you'd need to copy them manually if you want to keep the backup history. The WAL archive will also start fresh on the new storage, meaning you won't be able to do PITR across the storage change. If you need continuity, I'd suggest: copy the existing backup files to the new S3 bucket first, then update the credentials/URL. That way the next incremental backup can build on the existing base backup. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Dear all,
is it possible to change the S3 storage on a running postgresql cluster? I need to move the S3 storage to a new machine, hence I though I would just change the URL and credentials in the secret. But this far no backup files are visible in the new S3 storage.
Do I need to wait for the next backup interval? Can I trigger the backup manually (deleting the pod did not suffice)? Or do I need to prepare the new storage, e.g. copy over the files or similar?
Kind Regards,
Johannes
All reactions