mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Make dest argument default value of backup() cross platform (#1324)
Fixes #1325
This commit is contained in:
committed by
Alexander Kukushkin
parent
08d6e5e50e
commit
919e9c54d2
@@ -258,7 +258,7 @@ class PatroniController(AbstractController):
|
||||
def backup_source(self):
|
||||
return 'postgres://{username}:{password}@{host}:{port}/{database}'.format(**self._replication)
|
||||
|
||||
def backup(self, dest='data/basebackup'):
|
||||
def backup(self, dest=os.path.join('data', 'basebackup')):
|
||||
subprocess.call([PatroniPoolController.BACKUP_SCRIPT, '--walmethod=none',
|
||||
'--datadir=' + os.path.join(self._work_directory, dest),
|
||||
'--dbname=' + self.backup_source])
|
||||
|
||||
Reference in New Issue
Block a user