Eli Mesika has posted comments on this change.
Change subject: core: Unable to restore from 3.1 LogCollector...
......................................................................
Patch Set 7: (2 inline comments)
....................................................
File backend/manager/dbscripts/restore.sh
Line 37: restore_from_tar() {
Line 38: # Copy tar file to working dir
Line 39: name=$(basename $FILE)
Line 40: dir=$(dirname $FILE)/"${name}"_dir
Line 41: mkdir "${dir}"
Done
Line 42: chmod 777 "${dir}"
Line 43: cp "${FILE}" "${dir}"/"${name}"
Line 44: pushd "${dir}"
Line 45: # Restoring SELinux default settings
Line 49: if [ $? -ne 0 ]; then
Line 50: echo "Failed to extract TAR content to working directory
${dir}."
Line 51: exit 5
Line 52: fi
Line 53: chmod 777 *
I am changing it whether of not SELinux is in Enforcing , look for chcon
command in my next patch
Line 54: # dropping all statements we don't need on a clean DB from teh
restore.sql file
Line 55: sed -i -e '/^DROP /d' -e '/^CREATE SCHEMA/d' -e '/^ALTER TABLE
ONLY public\./d' -e '/^ALTER FUNCTION public\.uuid_/d' -e '/^CREATE PROCEDURAL
LANGUAGE plpgsql/d' -e '/^ALTER PROCEDURAL LANGUAGE plpgsql/d' -e 's/^CREATE
FUNCTION uuid_/CREATE OR REPLACE FUNCTION uuid_/g' -e 's?/tmp?'`pwd`'?' -e
's?\$\$PATH\$\$?'`pwd`'?' restore.sql
Line 56:
Line 57: psql -w -h ${SERVERNAME} -p ${PORT} -U ${USERNAME} -f restore.sql
${DATABASE}
--
To view, visit http://gerrit.ovirt.org/15068
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id17f718d5acf7a4df00092875d308f52e6dd7e3f
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches