Description of problem: See original story at https://bugzilla.redhat.com/show_bug.cgi?id=976337#c6 Wrong escaping or usage of double quotes. ... 2) Drop existing from root user by : su - postgres -c "psql -d template1 -c "drop database <db>;"" ... -%- # su - postgres -c "psql -d template1 -c "drop database engine;"" ERROR: syntax error at end of input LINE 1: drop ^ -bash: : command not found -%- Either escape nested double quotes or use single quotes inside double quotes. Same issue with following example from --help. 3) Create a new blank db with the same name by: su - postgres -c "psql -d template1 -c "create database <db> owner engine;"". Why not to replace <db> to engine? If anybody wants to "clone" to different DB name, he would probably know how to do it... Version-Release number of selected component (if applicable): is22 How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
ovirt 3.4.0 alpha has been released
Verified in 3.4.0-0.7.beta2.el6. [root@pb-rh34 ~]# /usr/share/ovirt-engine/dbscripts/restore.sh -h Usage: restore.sh [-h] [-s SERVERNAME] [-p PORT] -u USERNAME -d DATABASE -f FILE [-o] This script must run with a DB engine user credentials. -s SERVERNAME - The database servername for the database (def. localhost). -p PORT - The database port for the database (def. 5432). -u USERNAME - The username for the database (def. engine). -d DATABASE - The database name, this must match the db name recorded in the backup file. -f File - Backup file name to restore from . -o - Omit upgrade step. -h - This help text. for more options please run pg_restore --help The recommended way for restoring your database is. 1) Backup current database with backup.sh. 2) Drop existing from root user by : su - postgres -c "psql -d template1 -c 'drop database engine;'" 3) Create a new blank db with the same name by: su - postgres -c "psql -d template1 -c 'create database engine owner engine;'" 4) Run restore.sh and give new database instance name as the target.
Closing as part of 3.4.0