Yedidyah Bar David has posted comments on this change.
Change subject: packaging: Allow restore to different db location
......................................................................
Patch Set 4:
(6 comments)
....................................................
File packaging/bin/engine-backup.sh
Line 86
Line 87
Line 88
Line 89
Line 90
Done
Line 120: ;;
Line 121: --db-name=*)
Line 122: ENGINE_DB_NAME="${v}"
Line 123: ;;
Line 124: --db-secured=*)
OK, Done. Added two options for each, if none passed the existing value is used.
Line 125: ENGINE_DB_SECURED="${v}"
Line 126: case "${ENGINE_DB_SECURED}" in
Line 127: True|False) ;;
Line 128: *) die "invalid 'sec' value
'${ENGINE_DB_SECURED}' for --db-secured"
Line 303: cp -a "${backup}" "${dirname}" || logdie
"Cannot copy '${backup}' to '${dirname}'"
Line 304: selinuxenabled && restorecon -R "${path}"
Line 305: fi
Line 306: done || logdie "Cannot read ${paths}"
Line 307: changeDBConf
Done
Line 308: }
Line 309:
Line 310: changeDBConf() {
Line 311: local
conf="/etc/ovirt-engine/engine.conf.d/10-setup-database.conf"
Line 307: changeDBConf
Line 308: }
Line 309:
Line 310: changeDBConf() {
Line 311: local
conf="/etc/ovirt-engine/engine.conf.d/10-setup-database.conf"
Done
Line 312: [ -f "${conf}" ] || return
Line 313:
Line 314: local enabled=0
Line 315: local backup="${conf}.$(date +"%Y%m%d%H%M%S")"
Line 308: }
Line 309:
Line 310: changeDBConf() {
Line 311: local
conf="/etc/ovirt-engine/engine.conf.d/10-setup-database.conf"
Line 312: [ -f "${conf}" ] || return
Done
Line 313:
Line 314: local enabled=0
Line 315: local backup="${conf}.$(date +"%Y%m%d%H%M%S")"
Line 316:
Line 313:
Line 314: local enabled=0
Line 315: local backup="${conf}.$(date +"%Y%m%d%H%M%S")"
Line 316:
Line 317: while read var; do
Done
Line 318: eval "value=\${$var}"
Line 319: if [ -n "${value}" ]; then
Line 320: if [ "${enabled}" = "0" ]; then
Line 321: log "Backing up ${conf} to ${backup}"
--
To view, visit http://gerrit.ovirt.org/20258
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie2c84111808c638a1c589cf3c14c271184a0a7c2
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches