Skip to content

Commit eb04762

Browse files
authored
Add options to pg_basebackup (#121)
1 parent 8e06f91 commit eb04762

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testgres/backup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def __init__(self,
3333
node,
3434
base_dir=None,
3535
username=None,
36-
xlog_method=XLogMethod.fetch):
36+
xlog_method=XLogMethod.fetch,
37+
options=None):
3738
"""
3839
Create a new backup.
3940
@@ -43,6 +44,8 @@ def __init__(self,
4344
username: database user name.
4445
xlog_method: none | fetch | stream (see docs)
4546
"""
47+
if not options:
48+
options = []
4649
self.os_ops = node.os_ops
4750
if not node.status():
4851
raise BackupException('Node must be running')
@@ -77,6 +80,7 @@ def __init__(self,
7780
"-D", data_dir,
7881
"-X", xlog_method.value
7982
] # yapf: disable
83+
_params += options
8084
execute_utility(_params, self.log_file)
8185

8286
def __enter__(self):

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