Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

[create_archive_push] archive_push_command in testgres_pg_probackup added #111

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Changes from all commits
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
14 changes: 14 additions & 0 deletions testgres/plugins/pg_probackup2/pg_probackup2/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,5 +748,19 @@ def load_backup_class(fs_type):

return getattr(module, class_name)

def archive_push(self, instance, node, wal_file_name, wal_file_path=None, options=None, expect_error=False):
if options is None:
options = []
cmd = [
'archive-push',
'--instance={0}'.format(instance),
'--wal-file-name={0}'.format(wal_file_name),
]
if wal_file_path is None:
cmd = cmd + ['--wal-file-path={0}'.format(os.path.join(node.data_dir, 'pg_wal'))]
else:
cmd = cmd + ['--wal-file-path={0}'.format(wal_file_path)]
return self.run(cmd + options, expect_error=expect_error)

def build_backup_dir(self, backup='backup'):
return fs_backup_class(rel_path=self.rel_path, backup=backup)