Skip to content
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

Create an empty directory for pg_basebackup #331

Merged

Conversation

carbonin
Copy link
Member

This is needed for the --pgdata option.
Previously we were trying to use the directory of the path given
for the backup file name. This was failing because there is no
guarentee that the directory given is empty.

This commit creates a temp directory in the parent directory of
the given file. This ensures that we are writing the backup on the
same volume that the user intends the backup to be stored on so we are
much more likely to have space to write.

https://bugzilla.redhat.com/show_bug.cgi?id=1538584

This is needed for the --pgdata option.
Previously we were trying to use the directory of the path given
for the backup file name. This was failing because there is no
guarentee that the directory given is empty.

This commit creates a temp directory in the parent directory of
the given file. This ensures that we are writing the backup on the
same volume that the user intends the backup to be stored on so we are
much more likely to have space to write.

https://bugzilla.redhat.com/show_bug.cgi?id=1538584
@miq-bot
Copy link
Member

miq-bot commented Jan 25, 2018

Checked commit carbonin@da47c24 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@bdunne bdunne merged commit 7e14373 into ManageIQ:master Jan 25, 2018
@bdunne bdunne added this to the Sprint 78 Ending Jan 29, 2018 milestone Jan 25, 2018
@bdunne bdunne assigned bdunne and unassigned gtanzillo Jan 25, 2018
simaishi pushed a commit that referenced this pull request Jan 26, 2018
…rectory

Create an empty directory for pg_basebackup
(cherry picked from commit 7e14373)

https://bugzilla.redhat.com/show_bug.cgi?id=1539060
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 23d402ccd7dd662e10b674316e1b09ec5070c17b
Author: Brandon Dunne <[email protected]>
Date:   Thu Jan 25 17:22:11 2018 -0500

    Merge pull request #331 from carbonin/create_backups_in_empty_temp_directory
    
    Create an empty directory for pg_basebackup
    (cherry picked from commit 7e1437315160f82b0ad535fc85ee5dd3af2d3a89)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1539060

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants