- Notifications
You must be signed in to change notification settings - Fork35
Abs backup path#108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Abs backup path#108
Changes fromall commits
fb0ee44
48195d1
4d3dd70
52fc537
7a341bf
071f108
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -43,7 +43,10 @@ class FSTestBackupDir(TestBackupDir): | ||
""" Backup directory. Usually created by running pg_probackup init -B <path>""" | ||
def __init__(self, *, rel_path, backup): | ||
backup_prefix = os.environ.get('PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Получение параметров окружения нужно делать в init_helpers.py, иначе будет дубликация кода - в s3_backup.py тоже нужно будет добавить. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Для S3 я планирую перенести присвоение self.path в базовый класс, чтобы сделать пути в S3 и не в S3 одинаковыми. Но это требует предварительной проверки и будет делаться в рамках отдельногно PR. | ||
if backup_prefix and not os.path.isabs(backup_prefix): | ||
raise Exception(f"PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX must be an absolute path, current value: {backup_prefix}") | ||
self.path = os.path.join(backup_prefix or init_params.tmp_path, rel_path, backup) | ||
self.pb_args = ('-B', self.path) | ||
def list_instance_backups(self, instance): | ||