[ovirt-users] Failure Backing up oVirt Manager 3.6.5
Julián Tete
danteconrad14 at gmail.com
Tue May 24 20:50:59 UTC 2016
Thanks (SOLVED)
You nailed it
But I don't see the "--provision-dwh-db --provision-reports-db" in
http://www.ovirt.org/develop/release-management/features/engine/engine-backup/
2016-05-24 1:16 GMT-05:00 Yedidyah Bar David <didi at redhat.com>:
> On Mon, May 23, 2016 at 9:48 PM, Julián Tete <danteconrad14 at gmail.com>
> wrote:
> > oVirt version = 3.6.5 on CentOS 7.2
> >
> > I have Data Warehouse and Reports database
> >
> > Method 1:
> >
> > In the Manager machine:
> >
> > engine-backup --mode=backup --file=/home/cnscadmin/engine-3.6.bck
> > --log=/home/cnscadmin/backup.log
> >
> > less /home/cnscadmin/backup.log
> >
> > 2016-05-23 11:43:30 3585: Start of engine-backup mode backup scope all
> file
> > /home/cnscadmin/engine-3.6.bck
> > 2016-05-23 11:43:30 3585: OUTPUT: Backing up:
> > 2016-05-23 11:43:30 3585: Generating pgpass
> > 2016-05-23 11:43:30 3585: OUTPUT: Notifying engine
> > 2016-05-23 11:43:30 3585: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c SELECT LogEngineBackupEvent('files', now(), 0,
> 'Started',
> > 'ovirt1.cnsc.net', '/home/cnscadmin/backup.log');
> >
> >
> > 2016-05-23 11:43:30 3585: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c SELECT LogEngineBackupEvent('db', now(), 0, 'Started',
> > 'ovirt1.cnsc.net', '/home/cnscadmin/backup.log');
> >
> >
> > 2016-05-23 11:43:30 3585: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c SELECT LogEngineBackupEvent('dwhdb', now(), 0,
> 'Started',
> > 'ovirt1.cnsc.net', '/home/cnscadmin/backup.log');
> >
> >
> > 2016-05-23 11:43:30 3585: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c SELECT LogEngineBackupEvent('reportsdb', now(), 0,
> > 'Started', 'ovirt1.cnsc.net', '/home/cnscadmin/backup.log');
> >
> >
> > 2016-05-23 11:43:30 3585: Creating temp folder
> > /tmp/engine-backup.UwsBOUPMGT/tar
> > 2016-05-23 11:43:30 3585: OUTPUT: - Files
> > 2016-05-23 11:43:30 3585: Backing up files to
> > /tmp/engine-backup.UwsBOUPMGT/tar/files
> > 2016-05-23 11:43:30 3585: OUTPUT: - Engine database 'engine'
> > 2016-05-23 11:43:30 3585: Backing up database to
> > /tmp/engine-backup.UwsBOUPMGT/tar/db/engine_backup.db
> > 2016-05-23 11:43:30 3585: pg_cmd running: pg_dump -w -U engine -h
> localhost
> > -p 5432 engine -E UTF8 --disable-dollar-quoting --disable-triggers
> > --format=custom
> > 2016-05-23 11:43:31 3585: OUTPUT: - DWH database 'ovirt_engine_history'
> > 2016-05-23 11:43:31 3585: Backing up dwh database to
> > /tmp/engine-backup.UwsBOUPMGT/tar/db/dwh_backup.db
> > 2016-05-23 11:43:31 3585: pg_cmd running: pg_dump -w -U
> ovirt_engine_history
> > -h localhost -p 5432 ovirt_engine_history -E UTF8
> --disable-dollar-quoting
> > --disable-triggers --format=custom
> > 2016-05-23 11:43:32 3585: OUTPUT: - Reports database
> 'ovirt_engine_reports'
> > 2016-05-23 11:43:32 3585: Backing up reports database to
> > /tmp/engine-backup.UwsBOUPMGT/tar/db/reports_backup.db
> > 2016-05-23 11:43:32 3585: pg_cmd running: pg_dump -w -U
> ovirt_engine_reports
> > -h localhost -p 5432 ovirt_engine_reports -E UTF8
> --disable-dollar-quoting
> > --disable-triggers --format=custom
> > 2016-05-23 11:43:33 3585: Creating md5sum at
> > /tmp/engine-backup.UwsBOUPMGT/tar/md5sum
> > 2016-05-23 11:43:33 3585: OUTPUT: Packing into file
> > '/home/cnscadmin/engine-3.6.bck'
> > 2016-05-23 11:43:33 3585: Creating tarball /home/cnscadmin/engine-3.6.bck
> > 2016-05-23 11:43:33 3585: OUTPUT: Notifying engine
> > 2016-05-23 11:43:33 3585: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c SELECT LogEngineBackupEvent('files', now(), 1,
> > 'Finished', 'ovirt1.cnsc.net', '/home/cnscadmin/backup.log');
> >
> >
> > 2016-05-23 11:43:33 3585: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c SELECT LogEngineBackupEvent('db', now(), 1,
> 'Finished',
> > 'ovirt1.cnsc.net', '/home/cnscadmin/backup.log');
> >
> >
> > 2016-05-23 11:43:33 3585: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c SELECT LogEngineBackupEvent('dwhdb', now(), 1,
> > 'Finished', 'ovirt1.cnsc.net', '/home/cnscadmin/backup.log');
> >
> >
> > 2016-05-23 11:43:33 3585: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c SELECT LogEngineBackupEvent('reportsdb', now(), 1,
> > 'Finished', 'ovirt1.cnsc.net', '/home/cnscadmin/backup.log');
> >
> >
> > 2016-05-23 11:43:33 3585: OUTPUT: Done.
> >
> > In the Restore Machine:
> >
> > yum -y install postgresql postgresql-server postgresql-contrib
> >
> > postgresql-setup initdb
> >
> > systemctl enable postgresql.service
> >
> > systemctl start postgresql.service
> >
> > less /var/lib/pgsql/data/pg_hba.conf
> >
> >
> > host engine engine 0.0.0.0/0 md5
> > host ovirt_engine_reports ovirt_engine_reports
> > 0.0.0.0/0 md5
> > host ovirt_engine_history ovirt_engine_history
> > 0.0.0.0/0 md5
> >
> >
> > host engine engine ::0/0 md5
> > host ovirt_engine_reports ovirt_engine_reports ::0/0
> > md5
> > host ovirt_engine_history ovirt_engine_history ::0/0
> > md5
> >
> > less /var/lib/pgsql/data/postgresql.conf
> >
> > listen_addresses = '*' # what IP address(es) to listen
> on;
> >
> >
> > firewall-cmd --permanent --add-service=postgresql
> >
> > firewall-cmd --reload
> >
>
> All of the above is not needed (but should be harmless) if you use
> --provision* .
>
> > engine-backup --mode=restore --file=/home/cnscadmin/engine-3.6.bck
> > --log=/home/cnscadmin/restore.log --provision-db --no-restore-permissions
>
> For dwh and reports, please pass also: --provision-dwh-db
> --provision-reports-db
>
> >
> > less /home/cnscadmin/restore.log
> >
> > 2016-05-23 11:49:08 2970: Start of engine-backup mode restore scope all
> file
> > /home/cnscadmin/engine-3.6.bck
> > 2016-05-23 11:49:08 2970: OUTPUT: Preparing to restore:
> > 2016-05-23 11:49:08 2970: OUTPUT: - Unpacking file
> > '/home/cnscadmin/engine-3.6.bck'
> > 2016-05-23 11:49:08 2970: Opening tarball /home/cnscadmin/engine-3.6.bck
> to
> > /tmp/engine-backup.gUyOwLF4yI
> > 2016-05-23 11:49:08 2970: Verifying md5
> > 2016-05-23 11:49:08 2970: Verifying version
> > 2016-05-23 11:49:08 2970: Reading config
> > 2016-05-23 11:49:08 2970: OUTPUT: Restoring:
> > 2016-05-23 11:49:08 2970: OUTPUT: - Files
> > 2016-05-23 11:49:08 2970: Restoring files
> > 2016-05-23 11:49:08 2970: Reloading configuration
> > 2016-05-23 11:49:08 2970: OUTPUT: Provisioning PostgreSQL
> users/databases:
> > 2016-05-23 11:49:08 2970: provisionDB: user engine host localhost port
> 5432
> > database engine secured False secured_host_validation False
> > 2016-05-23 11:49:08 2970: OUTPUT: - user 'engine', database 'engine'
> > [ INFO ] Stage: Initializing
> > [ INFO ] Stage: Environment setup
> > Configuration files:
> > ['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf',
> > '/etc/ovirt-engine-setup.conf.d/10-packaging-reports-jboss.conf',
> > '/etc/ovirt-engine-setup.conf.d/10-packaging.conf',
> > '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf',
> > '/tmp/engine-backup.gUyOwLF4yI/pg-provision-answer-file']
> > Log file:
> >
> /var/log/ovirt-engine/setup/ovirt-engine-provisiondb-20160523114908-ane5uv.log
> > Version: otopi-1.4.1 (otopi-1.4.1-1.el7.centos)
> > [ INFO ] Stage: Environment packages setup
> > [ INFO ] Stage: Programs detection
> > [ INFO ] Stage: Environment customization
> > [ INFO ] Stage: Setup validation
> > [ INFO ] Stage: Transaction setup
> > [ INFO ] Stage: Misc configuration
> > [ INFO ] Stage: Package installation
> > [ INFO ] Stage: Misc configuration
> > [ INFO ] Creating PostgreSQL 'engine' database
> > [ INFO ] Configuring PostgreSQL
> > [ INFO ] Stage: Transaction commit
> > [ INFO ] Stage: Closing up
> > [ INFO ] Stage: Clean up
> > Log file is located at
> >
> /var/log/ovirt-engine/setup/ovirt-engine-provisiondb-20160523114908-ane5uv.log
> > [ INFO ] Stage: Pre-termination
> > [ INFO ] Stage: Termination
> > [ INFO ] Execution of provisiondb completed successfully
> > 2016-05-23 11:49:12 2970: OUTPUT: Restoring:
> > 2016-05-23 11:49:12 2970: Generating pgpass
> > 2016-05-23 11:49:12 2970: Verifying connection
> > 2016-05-23 11:49:12 2970: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -c select 1
> > ?column?
> > ----------
> > 1
> > (1 row)
> >
> > 2016-05-23 11:49:12 2970: pg_cmd running: psql -w -U engine -h localhost
> -p
> > 5432 engine -t -c show lc_messages
> > 2016-05-23 11:49:12 2970: pg_cmd running: pg_dump -w -U engine -h
> localhost
> > -p 5432 engine -s
> > 2016-05-23 11:49:12 2970: pg_cmd running: psql -w -U
> ovirt_engine_history -h
> > localhost -p 5432 ovirt_engine_history -c select 1
> > psql: FATAL: Ident authentication failed for user "ovirt_engine_history"
> > 2016-05-23 11:49:12 2970: FATAL: Can't connect to database
> > 'ovirt_engine_history'. Please see '/bin/engine-backup --help'.
> >
> > Method 2:
> >
> > In the Manager machine:
> >
> > engine-backup --mode=backup --scope=all
> > --file=/home/cnscadmin/engine-3.6.tar.bz2
> --log=/home/cnscadmin/backup.log
> >
> > In The Restore Machine
> >
> > engine-backup --mode=restore --file=/home/cnscadmin/engine-3.6.tar.bz2
> > --log=/home/cnscadmin/restore.log --change-db-credentials
> > --db-host=192.168.x.y --db-name=engine --db-user=engine
> > --db-password=MyPassword
> >
> > Output:
> >
> > Preparing to restore:
> > - Setting credentials for Engine database 'engine'
> > FATAL: Can't connect to database 'engine'. Please see '/bin/engine-backup
> > --help'.
>
> Did you change the password in the db too?
>
> >
> > less /home/cnscadmin/restore.log :
> >
> > 2016-05-23 13:47:36 2973: Start of engine-backup mode restore scope all
> file
> > /home/cnscadmin/engine-3.6.tar.bz2
> > 2016-05-23 13:47:36 2973: OUTPUT: Preparing to restore:
> > 2016-05-23 13:47:36 2973: OUTPUT: - Setting credentials for Engine
> database
> > 'engine'
> > 2016-05-23 13:47:36 2973: pg_cmd running: psql -w -U engine -h
> 192.168.x.y
> > -p 5432 engine -c select 1
>
> Basically, that's the command you should run to debug. Once you make it
> work, pass the password you use as --db-password.
>
> Of course, --provision-* is easier.
>
> Best,
>
> > psql: FATAL: password authentication failed for user "engine"
> > password retrieved from file "/tmp/engine-backup.dWpTSHqQxq/.pgpass"
> > 2016-05-23 13:47:36 2973: FATAL: Can't connect to database 'engine'.
> Please
> > see '/bin/engine-backup --help'.
> >
> >
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> >
>
>
>
> --
> Didi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160524/bcbc89ef/attachment-0001.html>
More information about the Users
mailing list