Skip to content

Commit

Permalink
fixup! repozo: support incremental recover
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebatyne committed Oct 23, 2024
1 parent acadc7a commit d0adb00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/ZODB/scripts/repozo.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,8 @@ def do_recover(options):
else:
raise NoFiles('No files in repository')

if options.full or options.output is None or not os.path.exists(options.output):
if (options.full or options.output is None
or not os.path.exists(options.output)):
do_full_recover(options, repofiles)
else:
do_incremental_recover(options, repofiles)
Expand Down
4 changes: 3 additions & 1 deletion src/ZODB/scripts/tests/test_repozo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,9 @@ def test_w_incr_recover_from_incr_backup(self):
'/backup/2010-05-14-04-05-06.deltafs 3 6 2bb225f0ba9a58930757a868ed57d9a3\n' # noqa: E501 line too long
'/backup/2010-05-14-06-07-08.deltafs 6 9 defb99e69a9f1f6e06f15006b1f166ae\n' # noqa: E501 line too long
'/backup/2010-05-14-08-09-10.deltafs 9 12 45054f47ac3305a2a33e9bcceadff712\n') # noqa: E501 line too long
os.unlink(os.path.join(self._repository_directory, '2010-05-14-04-05-06.deltafs'))
os.unlink(
os.path.join(self._repository_directory,
'2010-05-14-04-05-06.deltafs'))
self._callFUT(options)
self.assertNotIn('falling back to a full recover.',
sys.stderr.getvalue())
Expand Down

0 comments on commit d0adb00

Please sign in to comment.