Sandro Bonazzola has posted comments on this change.

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


Patch Set 24: Code-Review+1

(2 comments)

2 minor comments inline. Code looks good to me.

....................................................
File packaging/bin/engine-backup.sh
Line 121:       fi
Line 122: 
Line 123:       log "Backing up database to ${tardir}/db/${DB_BACKUP_FILE_NAME}"
Line 124:       backupDB "${tardir}/db/${DB_BACKUP_FILE_NAME}"
Line 125:       echo "${PACKAGE_VERSION}" > "${tardir}/version" || die "Can't 
create ${tardir}/version"
Not sure, but wouldn't be logdie better here?
Line 126:       log "Creating md5sum at ${tardir}/md5sum"
Line 127:       createmd5 "${tardir}" "${tardir}/md5sum"
Line 128:       log "Creating tarball ${FILE}"
Line 129:       createtar "${tardir}" "${FILE}"


Line 245:       touch "${MYPGPASS}" || logdie "Can't touch ${MYPGPASS}"
Line 246:       chmod 0600 "${MYPGPASS}" || logdie "Can't chmod ${MYPGPASS}"
Line 247:       cat > "${MYPGPASS}" << __EOF__
Line 248: 
${ENGINE_DB_HOST}:${ENGINE_DB_PORT}:${ENGINE_DB_DATABASE}:${ENGINE_DB_USER}:${ENGINE_DB_PASSWORD}
Line 249: __EOF__
I suppose there will always be enough space on disk, but also cat can fail, if 
disk is full for example. Maybe a || logdie could be added here.
Line 250: }
Line 251: 
Line 252: log() {
Line 253:       local m="$1"


-- 
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: 24
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ofer Schreiber <oschr...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Kiril Nesenko <knese...@redhat.com>
Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com>
Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com>
Gerrit-Reviewer: Ohad Basan <oba...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to