------=_Part_20566966_39555052.1519906078677
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Yes, it happens in a clean machine. I try it twice and restore always fails.
From: "Yedidyah Bar David" <didi(a)redhat.com>
To: suporte(a)logicworks.pt, "Eli Mesika" <emesika(a)redhat.com>
Cc: "ovirt users" <users(a)ovirt.org>
Sent: Thursday, March 1, 2018 7:28:13 AM
Subject: Re: [ovirt-users] Backup & Restore
On Wed, Feb 28, 2018 at 4:44 PM, <suporte(a)logicworks.pt> wrote:
If I run
# engine-backup --mode=restore --file=back_futur --log=log_futur
--provision-db --restore-permissions --provision-dwh-db --log=/root/rest-log
to create a log, I found these errors:
2018-02-28 14:36:31 6339: pg_cmd running: psql -w -U ovirt_engine_history -h
localhost -p 5432 ovirt_engine_history -t -c show lc_messages
2018-02-28 14:36:31 6339: pg_cmd running: pg_dump -w -U ovirt_engine_history
-h localhost -p 5432 ovirt_engine_history -s
2018-02-28 14:36:31 6339: OUTPUT: - Engine database 'engine'
2018-02-28 14:36:31 6339: Restoring engine database backup at
/tmp/engine-backup.VVkcNuYAkV/db/engine_backup.db
2018-02-28 14:36:31 6339: restoreDB: backupfile
/tmp/engine-backup.VVkcNuYAkV/db/engine_backup.db user engine host localhost
port 5432 database engine orig_user compressor format custom jobsnum 2
2018-02-28 14:36:31 6339: pg_cmd running: pg_restore -w -U engine -h
localhost -p 5432 -d engine -j 2
/tmp/engine-backup.VVkcNuYAkV/db/engine_backup.db
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 7314; 0 0 COMMENT EXTENSION
plpgsql
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of
extension plpgsql
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
pg_restore: [archiver (db)] Error from TOC entry 693; 1255 211334 FUNCTION
uuid_generate_v1() engine
pg_restore: [archiver (db)] could not execute query: ERROR: function
"uuid_generate_v1" already exists with same argument types
This is the error that fails you. I have a pending patch to make this more
visible in the log [1], need to find time to verify it...
Does this happen on a clean machine? Perhaps 'engine-cleanup' after such
a failed restore is not enough. Please try reinstalling the OS and trying
again.
If it's not an important machine (test/dev/etc), this will probably be
enough, as a faster replacement for a full OS reinstall:
engine-cleanup
systemctl stop postgresql
systemctl stop rh-postgresql95-postgresql
rm -rf /var/lib/pgsql/data /var/opt/rh/rh-postgresql95/lib/pgsql/data
Then try restore again.
[1]
https://gerrit.ovirt.org/86395
Command was: CREATE FUNCTION uuid_generate_v1() RETURNS uuid
LANGUAGE plpgsql STABLE
AS '
DECLARE
v_val BIGINT;
v_4_1_par...
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of
function uuid_generate_v1
Command was: ALTER FUNCTION public.uuid_generate_v1() OWNER TO engine;
Adding also Eli. Eli - perhaps we need to patch engine-backup to ignore
also this error? I think the minimal flow to reproduce is:
engine-setup
engine-backup --mode=backup --file=f1 --log=l1
engine-cleanup
engine-backup --mode=restore --file=f1 --provision-db
--provision-dwh-db --log=l2
Didn't try this myself.
pg_restore: WARNING: column "user_role_title" has type "unknown"
DETAIL: Proceeding with relation creation anyway.
pg_restore: WARNING: no privileges could be revoked for "public"
pg_restore: WARNING: no privileges could be revoked for "public"
pg_restore: WARNING: no privileges were granted for "public"
pg_restore: WARNING: no privileges were granted for "public"
WARNING: errors ignored on restore: 3
2018-02-28 14:37:23 6339: FATAL: Errors while restoring database engine
________________________________
De: suporte(a)logicworks.pt
Para: "Yedidyah Bar David" <didi(a)redhat.com>
Cc: "ovirt users" <users(a)ovirt.org>
Enviadas: Quarta-feira, 28 De Fevereiro de 2018 12:45:04
Assunto: Re: [ovirt-users] Backup & Restore
Still no luck:
# engine-backup --mode=restore --file=back_futur --log=log_futur
--provision-db --restore-permissions --provision-dwh-db
Preparing to restore:
- Unpacking file 'back_futur'
Restoring:
- Files
Provisioning PostgreSQL users/databases:
- user 'engine', database 'engine'
- user 'ovirt_engine_history', database 'ovirt_engine_history'
Restoring:
- Engine database 'engine'
FATAL: Errors while restoring database engine
I did a engine-cleanup, try it again but still the same error.
________________________________
De: "Yedidyah Bar David" <didi(a)redhat.com>
Para: suporte(a)logicworks.pt
Cc: "ovirt users" <users(a)ovirt.org>
Enviadas: Quarta-feira, 28 De Fevereiro de 2018 12:24:50
Assunto: Re: [ovirt-users] Backup & Restore
On Wed, Feb 28, 2018 at 2:10 PM, <suporte(a)logicworks.pt> wrote:
> Hi,
>
> I'm testing backup & restore on Ovirt 4.2.
> I follow this doc
>
>
https://www.ovirt.org/documentation/admin-guide/chap-Backups_and_Migration/
> Try to restore to a fresh installation but always get this error message:
>
> restore-permissions
> Preparing to restore:
> - Unpacking file 'back_file'
> Restoring:
> - Files
> Provisioning PostgreSQL users/databases:
> - user 'engine', database 'engine'
> Restoring:
> FATAL: Can't connect to database 'ovirt_engine_history'. Please see
> '/usr/bin/engine-backup --help'.
>
> On the live engine I run # engine-backup --scope=all --mode=backup
> --file=file_name --log=log_file_name
>
> And try to restore on a fresh installation:
> # engine-backup --mode=restore --file=file_name --log=log_file_name
> --provision-db --restore-permissions
>
> Any Idea?
Please try adding to restore command '--providion-dwh-db'. Thanks.
--
Didi
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
--
Didi
------=_Part_20566966_39555052.1519906078677
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"font-family: trebuchet ms,sans-serif;
font-size: =
12pt; color: #000000"><div>Yes, it happens in a clean machine. I try it
twi=
ce and restore always fails.</div><div><br></div><hr
id=3D"zwchr" data-mark=
er=3D"__DIVIDER__"><div
data-marker=3D"__HEADERS__"><b>From: </b>"Yedidyah =
Bar David" &lt;didi(a)redhat.com&gt;<br><b>To:
</b>suporte(a)logicworks.pt, "El=
i Mesika" &lt;emesika(a)redhat.com&gt;<br><b>Cc:
</b>"ovirt users" <users@=
ovirt.org><br><b>Sent: </b>Thursday, March 1, 2018 7:28:13
AM<br><b>Subj=
ect: </b>Re: [ovirt-users] Backup &
Restore<br></div><div><br></div><di=
v data-marker=3D"__QUOTED_TEXT__">On Wed, Feb 28, 2018 at 4:44 PM,
&l=
t;suporte(a)logicworks.pt&gt; wrote:<br>> If I
run<br>><br>> # engin=
e-backup --mode=3Drestore --file=3Dback_futur --log=3Dlog_futur<br>> --p=
rovision-db --restore-permissions --provision-dwh-db --log=3D/root/rest-log=
<br>><br>> to create a log, I found these
errors:<br>><br>> 201=
8-02-28 14:36:31 6339: pg_cmd running: psql -w -U ovirt_engine_history -h<b=
r>> localhost -p 5432 ovirt_engine_history -t -c show
lc_messages<br>>=
; 2018-02-28 14:36:31 6339: pg_cmd running: pg_dump -w -U ovirt_engine_hist=
ory<br>> -h localhost -p 5432 ovirt_engine_history -s<br>>
2018-02-28=
14:36:31 6339: OUTPUT: - Engine database 'engine'<br>> 2018-02-28
14:36=
:31 6339: Restoring engine database backup at<br>> /tmp/engine-backup.VV=
kcNuYAkV/db/engine_backup.db<br>> 2018-02-28 14:36:31 6339: restoreDB: b=
ackupfile<br>> /tmp/engine-backup.VVkcNuYAkV/db/engine_backup.db user en=
gine host localhost<br>> port 5432 database engine orig_user compressor =
format custom jobsnum 2<br>> 2018-02-28 14:36:31 6339: pg_cmd running: p=
g_restore -w -U engine -h<br>> localhost -p 5432 -d engine -j
2<br>> =
/tmp/engine-backup.VVkcNuYAkV/db/engine_backup.db<br>> pg_restore: [arch=
iver (db)] Error while PROCESSING TOC:<br>> pg_restore: [archiver (db)] =
Error from TOC entry 7314; 0 0 COMMENT EXTENSION<br>>
plpgsql<br>> pg=
_restore: [archiver (db)] could not execute query: ERROR: must be owner of<=
br>> extension plpgsql<br>> Command was: COMMENT ON EXTENSION
plpgsql=
IS 'PL/pgSQL procedural
language';<br>><br>><br>><br>>
pg_rest=
ore: [archiver (db)] Error from TOC entry 693; 1255 211334 FUNCTION<br>>=
uuid_generate_v1() engine<br>> pg_restore: [archiver (db)] could not ex=
ecute query: ERROR: function<br>> "uuid_generate_v1" already exists
with=
same argument types<br><br>This is the error that fails you. I have a pend=
ing patch to make this more<br>visible in the log [1], need to find time to=
verify it...<br><br>Does this happen on a clean machine? Perhaps
'engine-c=
leanup' after such<br>a failed restore is not enough. Please try reinstalli=
ng the OS and trying<br>again.<br><br>If it's not an important
machine (tes=
t/dev/etc), this will probably be<br>enough, as a faster replacement for a =
full OS reinstall:<br><br>engine-cleanup<br>systemctl stop
postgresql<br>sy=
stemctl stop rh-postgresql95-postgresql<br>rm -rf /var/lib/pgsql/data /var/=
opt/rh/rh-postgresql95/lib/pgsql/data<br><br>Then try restore
again.<br><br=
N uuid_generate_v1() RETURNS uuid<br>> LANGUAGE
plpgsql STABLE<br>> A=
S '<br>> DECLARE<br>> v_val BIGINT;<br>>
v_4_1_par...<br>> pg_r=
estore: [archiver (db)] could not execute query: ERROR: must be owner of<br=
> function uuid_generate_v1<br>> Command was:
ALTER FUNCTION public.=
uuid_generate_v1() OWNER TO
engine;<br><br>Adding also Eli. Eli - perhaps w=
e need to patch engine-backup to ignore<br>also this error? I think the min=
imal flow to reproduce is:<br><br>engine-setup<br>engine-backup
--mode=3Dba=
ckup --file=3Df1 --log=3Dl1<br>engine-cleanup<br>engine-backup --mode=3Dres=
tore --file=3Df1 --provision-db<br>--provision-dwh-db
--log=3Dl2<br><br>Did=
n't try this myself.<br><br>><br>><br>>
pg_restore: WARNING: colum=
n "user_role_title" has type "unknown"<br>> DETAIL:
Proceeding with rela=
tion creation anyway.<br>> pg_restore: WARNING: no privileges could be r=
evoked for "public"<br>> pg_restore: WARNING: no privileges could
be rev=
oked for "public"<br>> pg_restore: WARNING: no privileges were
granted f=
or "public"<br>> pg_restore: WARNING: no privileges were granted
for "pu=
blic"<br>> WARNING: errors ignored on restore: 3<br>>
2018-02-28 14:3=
7:23 6339: FATAL: Errors while restoring database
engine<br>><br>> __=
______________________________<br>> De:
suporte(a)logicworks.pt<br>&gt; Pa=
ra: "Yedidyah Bar David" &lt;didi(a)redhat.com&gt;<br>&gt; Cc:
"ovirt users" =
&lt;users(a)ovirt.org&gt;<br>&gt; Enviadas: Quarta-feira, 28 De Fevereiro
de =
2018 12:45:04<br>><br>> Assunto: Re: [ovirt-users] Backup
& Resto=
re<br>><br>> Still no luck:<br>><br>>
# engine-backup --mode=3D=
restore --file=3Dback_futur --log=3Dlog_futur<br>> --provision-db --rest=
ore-permissions --provision-dwh-db<br>> Preparing to
restore:<br>> - =
Unpacking file 'back_futur'<br>> Restoring:<br>> -
Files<br>> Prov=
isioning PostgreSQL users/databases:<br>> - user 'engine', database
'eng=
ine'<br>> - user 'ovirt_engine_history', database
'ovirt_engine_history'=
<br>> Restoring:<br>> - Engine database
'engine'<br>> FATAL: Error=
s while restoring database engine<br>><br>> I did a
engine-cleanup, t=
ry it again but still the same error.<br>><br>>
_____________________=
___________<br>> De: "Yedidyah Bar David"
&lt;didi(a)redhat.com&gt;<br>&gt=
; Para: suporte(a)logicworks.pt<br>&gt; Cc: "ovirt users"
&lt;users(a)ovirt.org=
><br>> Enviadas: Quarta-feira, 28 De Fevereiro de 2018
12:24:50<br>&g=
t; Assunto: Re: [ovirt-users] Backup & Restore<br>><br>>
On Wed, =
Feb 28, 2018 at 2:10 PM, &nbsp;&lt;suporte(a)logicworks.pt&gt;
wrote:<br>>=
> Hi,<br>>><br>>> I'm testing backup
& restore on Ovirt =
4.2.<br>>> I follow this
doc<br>>><br>>>
https://www.ovir=
t.org/documentation/admin-guide/chap-Backups_and_Migration/<br>>>
Try=
to restore to a fresh installation but always get this error message:<br>&=
gt;><br>>> restore-permissions<br>>>
Preparing to restore:<b=
r>>> - Unpacking file 'back_file'<br>>>
Restoring:<br>>> =
- Files<br>>> Provisioning PostgreSQL
users/databases:<br>>> - =
user 'engine', database 'engine'<br>>>
Restoring:<br>>> FATAL: =
Can't connect to database 'ovirt_engine_history'. Please
see<br>>> '/=
usr/bin/engine-backup --help'.<br>>><br>>> On
the live engine I=
run # engine-backup --scope=3Dall --mode=3Dbackup<br>>>
--file=3Dfil=
e_name --log=3Dlog_file_name<br>>><br>>> And try
to restore on =
a fresh installation:<br>>> # engine-backup --mode=3Drestore --file=
=3Dfile_name --log=3Dlog_file_name<br>>> --provision-db
--restore-per=
missions<br>>><br>>> Any
Idea?<br>><br>> Please try addin=
g to restore command '--providion-dwh-db'. Thanks.<br>>
--<br>> Didi<=
br>><br>>
_______________________________________________<br>> Use=
rs mailing list<br>> Users(a)ovirt.org<br>&gt;
http://lists.ovirt.org/mail=
man/listinfo/users<br><br><br><br>--
<br>Didi<br></div></div></body></html>
------=_Part_20566966_39555052.1519906078677--