Skip to content

Commit bd37658

Browse files
authored
Abs backup path (#108)
1 parent 70d2f27 commit bd37658

File tree

1 file changed

+4
-1
lines changed
  • testgres/plugins/pg_probackup2/pg_probackup2/storage

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ class FSTestBackupDir(TestBackupDir):
4343
""" Backup directory. Usually created by running pg_probackup init -B <path>"""
4444

4545
def __init__(self, *, rel_path, backup):
46-
self.path = os.path.join(init_params.tmp_path, rel_path, backup)
46+
backup_prefix = os.environ.get('PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX')
47+
if backup_prefix and not os.path.isabs(backup_prefix):
48+
raise Exception(f"PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX must be an absolute path, current value: {backup_prefix}")
49+
self.path = os.path.join(backup_prefix or init_params.tmp_path, rel_path, backup)
4750
self.pb_args = ('-B', self.path)
4851

4952
def list_instance_backups(self, instance):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy