Skip to content

Commit 6b15b7b

Browse files
[create_archive_get] Function testgres_pg_probackup2 archive-get added (#112)
1 parent 1f7343d commit 6b15b7b

File tree

1 file changed

+11
-0
lines changed
  • testgres/plugins/pg_probackup2/pg_probackup2

1 file changed

+11
-0
lines changed

Diff for: testgres/plugins/pg_probackup2/pg_probackup2/app.py

+11
Original file line numberDiff line numberDiff line change
@@ -762,5 +762,16 @@ def archive_push(self, instance, node, wal_file_name, wal_file_path=None, option
762762
cmd = cmd + ['--wal-file-path={0}'.format(wal_file_path)]
763763
return self.run(cmd + options, expect_error=expect_error)
764764

765+
def archive_get(self, instance, wal_file_name, wal_file_path, options=None, expect_error=False):
766+
if options is None:
767+
options = []
768+
cmd = [
769+
'archive-get',
770+
'--instance={0}'.format(instance),
771+
'--wal-file-name={0}'.format(wal_file_name),
772+
'--wal-file-path={0}'.format(wal_file_path),
773+
]
774+
return self.run(cmd + options, expect_error=expect_error)
775+
765776
def build_backup_dir(self, backup='backup'):
766777
return fs_backup_class(rel_path=self.rel_path, backup=backup)

0 commit comments

Comments
 (0)