Bug 1384021 - Backup/restore fails to run on an appliance after inplace uprgade
Summary: Backup/restore fails to run on an appliance after inplace uprgade
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: cfme-future
Assignee: Yuri Rudman
QA Contact: luke couzens
URL:
Whiteboard: black:upgrade:migration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-12 11:34 UTC by luke couzens
Modified: 2016-11-03 20:52 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 20:52:53 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)

Description luke couzens 2016-10-12 11:34:35 UTC
Description of problem:after upgrading 5.6 appliance to 5.7.0.4 I can create pg_dump (backups) but can not restore to them using appliance_console


Version-Release number of selected component (if applicable):5.7.0.4


How reproducible:100%


Steps to Reproduce:
1.provision 5.6 appliance
2.add latest 5.7 repos
3.run yum update
4.log out and in to reload new ruby
5.run 'rake db:migrate'
6.run 'rake evm:automate:reset'
7.start evm
8.check ui login and add provider
9.create backup using 'pg_dump'
10.stop evm
11. use appliance_console option '7' to restore db from backup

Actual results:'Failed to restore backup'


Expected results: Restore should complete successfully


Additional info:
appliance_console.log:http://pastebin.test.redhat.com/420181

If I run pg_restore manually it seems to complete with the exception of 'WARNING: errors ignored on restore: 1' however starting evm again and checking the ui it all seems to be working.

Comment 3 luke couzens 2016-10-12 16:48:19 UTC
Heres a pastbin of the error in manual pg_restore

unrecognized configuration parameter "row_security"

http://pastebin.test.redhat.com/420360

Comment 4 Gregg Tanzillo 2016-10-21 12:12:36 UTC
Yuri, please investigate. Thanks!

Comment 5 Yuri Rudman 2016-10-31 18:01:38 UTC
'row_security' configuration setting is new in 9.5, and that error indicates that 'pg_dump' used to create dump is version 9.5 but database dump restore into is still older one and need to be upgraded ( https://github.com/ManageIQ/manageiq-appliance/blob/master/LINK/usr/bin/miq_postgres_upgrade.sh)

Comment 7 luke couzens 2016-11-03 13:42:11 UTC
Hi Yuri, 
so the issue I was having was after migrating to latest build I was no longer able to restore to new backups I created from said build. I can retest this with running the postgres upgrade script before creating and restoring backups if you suspect this is the issue here? 

At the point of testing this we didnt have the upgrade script in place. I was of the assumption that it would continue to use postgres94 until I run the upgrade script, but perhaps this is wrong.

Comment 8 Yuri Rudman 2016-11-03 14:30:25 UTC
Hi Luke, 
Yes, you need to run postgres upgrade script after upgrading appliance and  before using pg_dump/restore.

Comment 9 luke couzens 2016-11-03 20:23:44 UTC
Hi Yuri,

Just tested this on 5.7.0.9 and you are correct it works correctly after running the postgres upgrade, feel free to close this bz.

Thanks,
Luke

Comment 10 Yuri Rudman 2016-11-03 20:52:53 UTC
Thank you Luke for update !


Note You need to log in before you can comment on or make changes to this bug.