-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recovery from logicalbackup/ Very poor documentation #1072
Comments
logical backup == pg_dump. It is a one time entire backup of your entire cluster at the point in time you make the backup. It is not a delta, it contains everything you need to restore not only the database but the cluster at the time you took the backup. For example you could restore with the following command from a logical backup with the following command.
You could also use pg_restore to restore from a logical backup or you could get fancy and use @vitobotta script. WAL is something different, it allows for point in time recovery. It is an incremental backup, each backup only contains the delta (the difference between the last backup and the current one). For example Unless you had made a logical backup at precisely 5:14PM (extremely unlikely) this option would not be available to you via the logical backup option. Which bit in the doc do you find confusing? https://postgres-operator.readthedocs.io/en/latest/user/#how-to-clone-an-existing-postgresql-cluster Bear in mind ^^ only supports WAL PITR. For logical backups you could use the method i provided above. |
This is much much better explanation than i was looking for. Thanks a lot @redscaresu . But how to trigger this basebackup and WAL backup? i believe these two go hand in hand. |
My pleasure @aditya1808!
Yes that is correct, this what I do to get wal files into S3. I include the following in the postgres-operator configmap.
However the spilo container which actually does the heavy lifting needs some additional information so I mount a configmap on the spilo containers that looks something like this.
Once you provide this information WAL-E/G will handle the rest. |
Hello,
After going through the documentation and issues, i understood that logicalbackup cron job is triggered by postgresoperator and the logicalbackup is compressed and stored in S3.
But my question is,
MY use case is to do periodical backup to minio (i guess its possible) and how to recover the database from it (both complete backup and also based on time stamp.)
https://postgres-operator.readthedocs.io/en/latest/reference/cluster_manifest/#parameters-defining-how-to-clone-the-cluster-from-another-one
In the above link its written ->
s3_wal_path the url to S3 bucket containing the WAL archive of the cluster to be cloned. Optional.
How did wal archive come into picture? does it means same as logical backup. why cant you use consistent naming to make it simpler for new users to understand.
If it actually means logical backup, does it mean that i can recover entier database from backup in S3??
If so then why did @Jan-M mention its not possible in this comment
#568 (comment)
And what is the point of logical backup if we cant recover from it???
The text was updated successfully, but these errors were encountered: