Sandro Bonazzola has posted comments on this change.

Change subject: packaging: Add backup and restore utility
......................................................................


Patch Set 11: I would prefer that you didn't submit this

(4 inline comments)

....................................................
File packaging/bin/engine-backup.sh
Line 98:        fi
Line 99: }
Line 100: 
Line 101: dobackup() {
Line 102:       # Create temporart folder
temporart -> temporary
Line 103:       local tardir="${TEMP_FOLDER}/tar"
Line 104:       mkdir "${tardir}" || die "Cannot create '${tardir}'"
Line 105:       mkdir "${tardir}/${FILES}" || die "Cannot create 
'${tardir}/files'"
Line 106:       mkdir "${tardir}/${DB}" || die "Cannot create '${tardir}/db'"


Line 106:       mkdir "${tardir}/${DB}" || die "Cannot create '${tardir}/db'"
Line 107: 
Line 108:       backupFiles "${BACKUP_FOLDERS}" "${tardir}/files"
Line 109:       backupDB "${tardir}/db/${DB_BACKUP_FILE_NAME}"
Line 110:       cp -a "${VERSION_FILE}" "${tardir}"
|| die
Line 111:       tar -C "${tardir}" -cjf "${FILE}" . || die "Cannot create 
'${FILE}'"
Line 112: }
Line 113: 
Line 114: backupFiles() {


Line 126:       PGPASSFILE="${MYPGPASS}" pg_dump \
Line 127:               -E "UTF8" \
Line 128:               --disable-dollar-quoting \
Line 129:               --disable-triggers \
Line 130:               --format=p \
why not t or c ?
Line 131:               -w \
Line 132:               -U "${ENGINE_DB_USER}" \
Line 133:               -h "${ENGINE_DB_HOST}" \
Line 134:               -p "${ENGINE_DB_PORT}" \


Line 153: 
Line 154: restoreDB() {
Line 155:       # TODO: Supress psql output
Line 156:       # TODO: Verify DB exists and empty
Line 157:       local backupfile="$1"
using format t or c you can use pg_restore.
Line 158:       PGPASSFILE="${MYPGPASS}" psql \
Line 159:               -w \
Line 160:               -q \
Line 161:               -U "${ENGINE_DB_USER}" \


-- 
To view, visit http://gerrit.ovirt.org/15276
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7f6c386a0f48ccd520978193639120999e00cf2a
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Ohad Basan <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to