Yedidyah Bar David has uploaded a new change for review. Change subject: packaging: engine-backup: Do not dump/restore owner ......................................................................
packaging: engine-backup: Do not dump/restore owner Thus no need to handle errors during restore with different owner etc. Change-Id: I78fa18fe0d964ca410b1c9e7e41ac8b64d8661bc Bug-Url: https://bugzilla.redhat.com/1212752 Signed-off-by: Yedidyah Bar David <[email protected]> --- M packaging/bin/engine-backup.sh 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/40090/1 diff --git a/packaging/bin/engine-backup.sh b/packaging/bin/engine-backup.sh index 38c5867..ac45ef0 100755 --- a/packaging/bin/engine-backup.sh +++ b/packaging/bin/engine-backup.sh @@ -680,6 +680,7 @@ --disable-dollar-quoting \ --disable-triggers \ --format="${format}" \ + --no-owner \ 2> "${pgdump_log}" \ | "${compressor}" > "${file}" \ || logdie "${compressor} failed compressing the backup of database ${database}" @@ -689,6 +690,7 @@ --disable-dollar-quoting \ --disable-triggers \ --format="${format}" \ + --no-owner \ 2> "${pgdump_log}" \ > "${file}" \ || logdie "Database ${database} backup failed" @@ -872,11 +874,11 @@ fi elif [ "${format}" = "custom" ]; then if [ -z "${compressor}" ]; then - PGPASSFILE="${MYPGPASS}" pg_cmd pg_restore -j "${jobsnum}" "${backupfile}" > "${pgrestorelog}" 2>&1 + PGPASSFILE="${MYPGPASS}" pg_cmd pg_restore --no-owner -j "${jobsnum}" "${backupfile}" > "${pgrestorelog}" 2>&1 else # Requires the compressor to support '-d'. All our current ones do. "${compressor}" -d < "${backupfile}" | \ - PGPASSFILE="${MYPGPASS}" pg_cmd pg_restore > "${pgrestorelog}" 2>&1 + PGPASSFILE="${MYPGPASS}" pg_cmd pg_restore --no-owner > "${pgrestorelog}" 2>&1 fi else logdie "Unsupported format ${format}" @@ -903,8 +905,6 @@ function public.uuid_ns_oid\(\) does not exist function public.uuid_ns_url\(\) does not exist function public.uuid_ns_x500\(\) does not exist -# Ignore error when trying to set owner to changed user -role "$orig_user" does not exist __EOF ) local numerrors=$(grep 'ERROR: ' "${pgrestorelog}" | grep -Ev "${IGNORED_ERRORS}" | wc -l) -- To view, visit https://gerrit.ovirt.org/40090 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78fa18fe0d964ca410b1c9e7e41ac8b64d8661bc Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
