Commit d406137a authored by Marco Mariani's avatar Marco Mariani

fixed backup path

parent 9ebe821e
......@@ -209,10 +209,9 @@ class ExportRecipe(GenericBaseRecipe):
ret = []
if not os.path.exists(pgdata):
wrapper = self.options['wrapper']
self.createBackupScript(wrapper)
ret.append(wrapper)
wrapper = self.options['wrapper']
self.createBackupScript(wrapper)
ret.append(wrapper)
return ret
......@@ -224,7 +223,10 @@ class ExportRecipe(GenericBaseRecipe):
content = textwrap.dedent("""\
#!/bin/sh
umask 077
%(bin)s/pg_dump -h %(pgdata-directory)s -f %(backup-directory)s/backup.sql %(dbname)s
%(bin)s/pg_dump \\
-h %(pgdata-directory)s \\
-f %(backup-directory)s/backup.sql \\
%(dbname)s
""" % self.options)
self.createExecutable(wrapper, content=content)
......
......@@ -177,7 +177,7 @@ dbname = db
ip = $${slap-network-information:local-ipv4}
# pgdata_directory is created by initdb, and should not exist beforehand.
pgdata-directory = $${rootdirectory:var}/data
backup-directory = $${basedirectory:backup}
backup-directory = $${basedirectory:backup}/postgres
services = $${basedirectory:services}
bin = $${rootdirectory:bin}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment