Discussion:
[ovirt-users] Backup & Restore
s***@logicworks.pt
2018-02-28 12:10:59 UTC
Permalink
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?

Thanks
--
Jose Ferradeira
http://www.logicworks.pt
Yedidyah Bar David
2018-02-28 12:24:50 UTC
Permalink
Post by s***@logicworks.pt
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/
restore-permissions
- Unpacking file 'back_file'
- Files
- user 'engine', database 'engine'
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
# 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
s***@logicworks.pt
2018-02-28 12:45:04 UTC
Permalink
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" <***@redhat.com>
Para: ***@logicworks.pt
Cc: "ovirt users" <***@ovirt.org>
Enviadas: Quarta-feira, 28 De Fevereiro de 2018 12:24:50
Assunto: Re: [ovirt-users] Backup & Restore
Post by s***@logicworks.pt
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/
restore-permissions
- Unpacking file 'back_file'
- Files
- user 'engine', database 'engine'
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
# 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
s***@logicworks.pt
2018-02-28 14:44:39 UTC
Permalink
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
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;


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: ***@logicworks.pt
Para: "Yedidyah Bar David" <***@redhat.com>
Cc: "ovirt users" <***@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" <***@redhat.com>
Para: ***@logicworks.pt
Cc: "ovirt users" <***@ovirt.org>
Enviadas: Quarta-feira, 28 De Fevereiro de 2018 12:24:50
Assunto: Re: [ovirt-users] Backup & Restore
Post by s***@logicworks.pt
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/
restore-permissions
- Unpacking file 'back_file'
- Files
- user 'engine', database 'engine'
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
# 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
***@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
Yedidyah Bar David
2018-03-01 07:28:13 UTC
Permalink
Post by s***@logicworks.pt
If I run
# engine-backup --mode=restore --file=back_futur --log=log_futur
--provision-db --restore-permissions --provision-dwh-db --log=/root/rest-log
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 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
Post by s***@logicworks.pt
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.
Post by s***@logicworks.pt
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
________________________________
Enviadas: Quarta-feira, 28 De Fevereiro de 2018 12:45:04
Assunto: Re: [ovirt-users] Backup & Restore
# engine-backup --mode=restore --file=back_futur --log=log_futur
--provision-db --restore-permissions --provision-dwh-db
- Unpacking file 'back_futur'
- Files
- user 'engine', database 'engine'
- user 'ovirt_engine_history', database 'ovirt_engine_history'
- Engine database 'engine'
FATAL: Errors while restoring database engine
I did a engine-cleanup, try it again but still the same error.
________________________________
Enviadas: Quarta-feira, 28 De Fevereiro de 2018 12:24:50
Assunto: Re: [ovirt-users] Backup & Restore
Post by s***@logicworks.pt
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/
restore-permissions
- Unpacking file 'back_file'
- Files
- user 'engine', database 'engine'
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
# 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
http://lists.ovirt.org/mailman/listinfo/users
--
Didi
s***@logicworks.pt
2018-03-01 12:07:58 UTC
Permalink
Yes, it happens in a clean machine. I try it twice and restore always fails.


From: "Yedidyah Bar David" <***@redhat.com>
To: ***@logicworks.pt, "Eli Mesika" <***@redhat.com>
Cc: "ovirt users" <***@ovirt.org>
Sent: Thursday, March 1, 2018 7:28:13 AM
Subject: Re: [ovirt-users] Backup & Restore
Post by s***@logicworks.pt
If I run
# engine-backup --mode=restore --file=back_futur --log=log_futur
--provision-db --restore-permissions --provision-dwh-db --log=/root/rest-log
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 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
Post by s***@logicworks.pt
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.
Post by s***@logicworks.pt
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
________________________________
Enviadas: Quarta-feira, 28 De Fevereiro de 2018 12:45:04
Assunto: Re: [ovirt-users] Backup & Restore
# engine-backup --mode=restore --file=back_futur --log=log_futur
--provision-db --restore-permissions --provision-dwh-db
- Unpacking file 'back_futur'
- Files
- user 'engine', database 'engine'
- user 'ovirt_engine_history', database 'ovirt_engine_history'
- Engine database 'engine'
FATAL: Errors while restoring database engine
I did a engine-cleanup, try it again but still the same error.
________________________________
Enviadas: Quarta-feira, 28 De Fevereiro de 2018 12:24:50
Assunto: Re: [ovirt-users] Backup & Restore
Post by s***@logicworks.pt
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/
restore-permissions
- Unpacking file 'back_file'
- Files
- user 'engine', database 'engine'
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
# 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
http://lists.ovirt.org/mailman/listinfo/users
--
Didi
e***@obs-nancay.fr
2018-05-24 09:32:33 UTC
Permalink
hi,

I have the same error when I try to restore on a new hosted VM (ovirt 4.2.3)
Have you a solution ?

Emmanuel
_______________________________________________
Users mailing list -- ***@ovirt.org
To unsubscribe send an

Continue reading on narkive:
Loading...