-
Notifications
You must be signed in to change notification settings - Fork 79
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
Use pg_basebackup for database backups #302
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will allow us to backup all databases in the cluster as well as config files. https://bugzilla.redhat.com/show_bug.cgi?id=1495192
We can just call .unload_pglogical_extension directly from .restore_pg_compress
This commit allows us to support both the new, pg_basebackup method of backup as well as the old pg_dump method. The pg_basebackup output is just a tgz file of the contents of the data directory, so restore is just replacing the current data directory with the data in the archive. https://bugzilla.redhat.com/show_bug.cgi?id=1495192
Checked commits carbonin/manageiq-gems-pending@271febd~...42e8e30 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0 |
gtanzillo
approved these changes
Oct 25, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
jrafanie
added a commit
to jrafanie/manageiq
that referenced
this pull request
Oct 25, 2017
Starting with this PR: ManageIQ/manageiq-gems-pending#302 PostgresAdmin added file existence and file moves in the backup and restore code. We need to mock these for now until we find a cleaner way to test this.
NickLaMuro
added a commit
to NickLaMuro/manageiq-gems-pending
that referenced
this pull request
May 10, 2018
Removed as part of: ManageIQ#302 In commit 271febd ManageIQ@271febd3 Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here.
NickLaMuro
added a commit
to NickLaMuro/manageiq-appliance_console
that referenced
this pull request
Mar 5, 2021
Removed as part of: ManageIQ/manageiq-gems-pending#302 In commit 0502002e ManageIQ/manageiq-gems-pending@0502002e Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here. (transferred from ManageIQ/manageiq-gems-pending@9dcbe55)
NickLaMuro
added a commit
to NickLaMuro/manageiq-appliance_console
that referenced
this pull request
Mar 5, 2021
Removed as part of: ManageIQ/manageiq-gems-pending#302 In commit d07f2f69 ManageIQ/manageiq-gems-pending@d07f2f69 Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here. (transferred from ManageIQ/manageiq-gems-pending@9dcbe55)
NickLaMuro
added a commit
to NickLaMuro/manageiq-appliance_console
that referenced
this pull request
Mar 5, 2021
Removed as part of: ManageIQ/manageiq-gems-pending#302 In commit d07f2f69 ManageIQ/manageiq-gems-pending@d07f2f69 Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here. (transferred from ManageIQ/manageiq-gems-pending@9dcbe55)
NickLaMuro
added a commit
to NickLaMuro/manageiq-appliance_console
that referenced
this pull request
Mar 9, 2021
Removed as part of: ManageIQ/manageiq-gems-pending#302 In commit e10af7bb ManageIQ/manageiq-gems-pending@e10af7bb Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here. (transferred from ManageIQ/manageiq-gems-pending@9dcbe55)
NickLaMuro
added a commit
to NickLaMuro/manageiq-appliance_console
that referenced
this pull request
Mar 9, 2021
Removed as part of: ManageIQ/manageiq-gems-pending#302 In commit 69e001e8 ManageIQ/manageiq-gems-pending@69e001e8 Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here. (transferred from ManageIQ/manageiq-gems-pending@9dcbe55)
NickLaMuro
added a commit
to NickLaMuro/manageiq-appliance_console
that referenced
this pull request
Mar 9, 2021
Removed as part of: ManageIQ/manageiq-gems-pending#302 In commit 69e001e8 ManageIQ/manageiq-gems-pending@69e001e8 Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here. (transferred from ManageIQ/manageiq-gems-pending@9dcbe55)
NickLaMuro
added a commit
to NickLaMuro/manageiq-appliance_console
that referenced
this pull request
Mar 11, 2021
Removed as part of: ManageIQ/manageiq-gems-pending#302 In commit 69e001e8 ManageIQ/manageiq-gems-pending@69e001e8 Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here. (transferred from ManageIQ/manageiq-gems-pending@9dcbe55)
NickLaMuro
added a commit
to NickLaMuro/manageiq-appliance_console
that referenced
this pull request
Mar 16, 2021
Removed as part of: ManageIQ/manageiq-gems-pending#302 In commit 69e001e8 ManageIQ/manageiq-gems-pending@69e001e8 Also adds some tests for future confirmation that other additions and refactoring will not brake what is already here. (transferred from ManageIQ/manageiq-gems-pending@9dcbe55)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes the tool we use for database backups from pg_dump to pg_basebackup
This allows for a more comprehensive backup which includes all databases in the cluster as well as the current state of postgresql config files.
For restore we want to continue to support restoring databases which were backed-up using pg_dump so I added file type detection to switch between which restore method we use.
For pg_basebackup-created files we stop the database, replace the contents of the data directory with the contents of the archive, fix up permissions, and start the database back up.
pg_dump based restore remains unchanged
https://bugzilla.redhat.com/show_bug.cgi?id=1495192