Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb0ee44

Browse files
committed
Accept an absolute backup path
1 parent 0edc937 commit fb0ee44

File tree

1 file changed

+5
-2
lines changed
  • testgres/plugins/pg_probackup2/pg_probackup2/storage

1 file changed

+5
-2
lines changed

testgres/plugins/pg_probackup2/pg_probackup2/storage/fs_backup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ class FSTestBackupDir(TestBackupDir):
4242

4343
""" Backup directory. Usually created by running pg_probackup init -B <path>"""
4444

45-
def __init__(self, *, rel_path, backup):
46-
self.path = os.path.join(init_params.tmp_path, rel_path, backup)
45+
def __init__(self, *, path, backup):
46+
if os.path.isabs(path):
47+
self.path = os.path.join(path, backup)
48+
else:
49+
self.path = os.path.join(init_params.tmp_path, path, backup)
4750
self.pb_args = ('-B', self.path)
4851

4952
def list_instance_backups(self, instance):

0 commit comments

Comments
 (0)