Kiril Nesenko has posted comments on this change.

Change subject: [WORK-IN-PROGRESS] packaging: Add backup and restore utility
......................................................................


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

(5 inline comments)

....................................................
File packaging/bin/engine-backup.sh
Line 97:                                TARBALL=$1
Line 98:                 shift
Line 99:                        ;;
Line 100:                       --TARBALL=*)
Line 101:                               TARBALL="${v}"
I think that all these variables wont be available outside the function
Line 102:                       ;;
Line 103:               esac
Line 104:       done
Line 105: }


Line 120:     # Create temporart folder
Line 121:     TARBUILD_FOLDER=$(mktemp -d)
Line 122: 
Line 123:     # Iterate folders and copy them
Line 124:     for folder in "${BACKUP_FOLDERS}"; do
this should be without quotes if you want to iterate through the items
Line 125:         dirname=$(dirname "${folder}")
Line 126:         mkdir -p "${TARBALL}"/"${dirname}"
Line 127:         cp -R "${folder}" "${TARBUILD_FOLDER}"/"${dirname}"
Line 128:     done


Line 143:     --disable-triggers \
Line 144:     --format=p \ 
Line 145:     -U "${ENGINE_DB_USER}" \
Line 146:     -h "${ENGINE_DB_HOST}" \
Line 147:     -p "${ENGINE_DB_PORT}" \ 
remove white spaces
Line 148:     -f "${outfolder}"\engine.db
Line 149: }
Line 150: 
Line 151: doRestore() {


Line 144:     --format=p \ 
Line 145:     -U "${ENGINE_DB_USER}" \
Line 146:     -h "${ENGINE_DB_HOST}" \
Line 147:     -p "${ENGINE_DB_PORT}" \ 
Line 148:     -f "${outfolder}"\engine.db
enter
Line 149: }
Line 150: 
Line 151: doRestore() {
Line 152:     generatePgPass


Line 154:     restoreDB
Line 155: }
Line 156: 
Line 157: generatePgPass() {
Line 158:     if [ -e ${DBCONFIG} ]; then
use quotes
Line 159:         . "${DBCONFIG}"
Line 160:     else
Line 161:         echo "ERROR: ${DBCONFIG} doesn't exist"
Line 162:         exit 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: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Ohad Basan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to