Skip to content

copy_file() always ignore missing file #74

Closed
@gsmolk

Description

@gsmolk
Contributor

It is ok for backup, but in case of restore with --no-validate flag it could lead to restoring backup with missing non-data files. So I think missing_ok flag must be added to copy_file()

Activity

gsmolk

gsmolk commented on May 23, 2019

@gsmolk
ContributorAuthor

Test:

======================================================================
FAIL: test_lost_non_data_file (tests.restore.RestoreTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/restore.py", line 2335, in test_lost_non_data_file
    self.output, self.cmd))
AssertionError: Expecting Error because of non-data file dissapearance.
 Output: WARNING: Backup PRYGXB is used without validation.
INFO: Restore of backup PRYGXB completed.
added this to the 2.1.3 milestone on May 23, 2019
gsmolk

gsmolk commented on May 23, 2019

@gsmolk
ContributorAuthor

backup_data_file() has the same problem, which can potentially lead to file loss in merge, although it is highly unlikely, but better safe than sorry

gsmolk

gsmolk commented on May 27, 2019

@gsmolk
ContributorAuthor

PR: #75

added a commit that references this issue on May 27, 2019

Merge pull request #75 from postgrespro/issue_74

f217a14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gsmolk

        Issue actions

          copy_file() always ignore missing file · Issue #74 · postgrespro/pg_probackup