Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
asavchkov merged 6 commits intomasterfromabs-backup-path
Feb 12, 2024
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Test if backup_prefix is set
  • Loading branch information
@asavchkov
asavchkov committedFeb 4, 2024
commit7a341bfec20098f98fcbd8bee87a9e89ffe1edff
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,7 @@ class FSTestBackupDir(TestBackupDir):

def __init__(self, *, rel_path, backup):
backup_prefix = os.environ.get('PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX')
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Получение параметров окружения нужно делать в init_helpers.py, иначе будет дубликация кода - в s3_backup.py тоже нужно будет добавить.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Для S3 я планирую перенести присвоение self.path в базовый класс, чтобы сделать пути в S3 и не в S3 одинаковыми. Но это требует предварительной проверки и будет делаться в рамках отдельногно PR.

if not os.path.isabs(backup_prefix):
ifbackup_prefix andnot 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)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp