projects
/
matthijs
/
upstream
/
backupninja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tar: Support running on multiple backends.
[matthijs/upstream/backupninja.git]
/
handlers
/
pgsql.in
diff --git
a/handlers/pgsql.in
b/handlers/pgsql.in
index a7e3ec2b17338a92c1d8fdfed2987fec7cde5914..77a73fee98ed7f4f7d90ceff53bb56743b0501f0 100644
(file)
--- a/
handlers/pgsql.in
+++ b/
handlers/pgsql.in
@@
-75,15
+75,15
@@
chmod 700 $vroot$backupdir
if [ "$databases" == "all" ]; then
if [ $usevserver = yes ]; then
if [ "$compress" == "yes" ]; then
if [ "$databases" == "all" ]; then
if [ $usevserver = yes ]; then
if [ "$compress" == "yes" ]; then
- execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"
$PGSQLDUMPALL | $GZIP --rsyncable > $backupdir/${vsname}.sql.gz
\""
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"
set -o pipefail ; $PGSQLDUMPALL | $GZIP --rsyncable > '$backupdir/${vsname}.sql.gz'
\""
else
else
- execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMPALL >
$backupdir/${vsname}.sql
\""
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMPALL >
'$backupdir/${vsname}.sql'
\""
fi
else
if [ "$compress" == "yes" ]; then
fi
else
if [ "$compress" == "yes" ]; then
- execstr="su - $PGSQLUSER -c \"
$PGSQLDUMPALL | $GZIP --rsyncable > $backupdir/${localhost}-all.sql.gz
\""
+ execstr="su - $PGSQLUSER -c \"
set -o pipefail ; $PGSQLDUMPALL | $GZIP --rsyncable > '$backupdir/${localhost}-all.sql.gz'
\""
else
else
- execstr="su - $PGSQLUSER -c \"$PGSQLDUMPALL >
$backupdir/${localhost}-all.sql
\""
+ execstr="su - $PGSQLUSER -c \"$PGSQLDUMPALL >
'$backupdir/${localhost}-all.sql'
\""
fi
fi
debug "$execstr"
fi
fi
debug "$execstr"
@@
-104,15
+104,15
@@
else
for db in $databases; do
if [ $usevserver = yes ]; then
if [ "$compress" == "yes" ]; then
for db in $databases; do
if [ $usevserver = yes ]; then
if [ "$compress" == "yes" ]; then
- execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"
$PGSQLDUMP $db | $GZIP --rsyncable > $backupdir/${db}.sql.gz
\""
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"
set -o pipefail ; $PGSQLDUMP $db | $GZIP --rsyncable > '$backupdir/${db}.sql.gz'
\""
else
else
- execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMP $db | >
$backupdir/${db}.sql
\""
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMP $db | >
'$backupdir/${db}.sql'
\""
fi
else
if [ "$compress" == "yes" ]; then
fi
else
if [ "$compress" == "yes" ]; then
- execstr="su - $PGSQLUSER -c \"
$PGSQLDUMP $db | $GZIP --rsyncable > $backupdir/${db}.sql.gz
\""
+ execstr="su - $PGSQLUSER -c \"
set -o pipefail ; $PGSQLDUMP $db | $GZIP --rsyncable > '$backupdir/${db}.sql.gz'
\""
else
else
- execstr="su - $PGSQLUSER -c \"$PGSQLDUMP $db >
$backupdir/${db}.sql
\""
+ execstr="su - $PGSQLUSER -c \"$PGSQLDUMP $db >
'$backupdir/${db}.sql'
\""
fi
fi
debug "$execstr"
fi
fi
debug "$execstr"