Restore from Backup fails with error: unable to load Private Key
Issue
- Restoring from backup fails with following:
/Stage[main]/Certs/Privkey[/etc/pki/katello/private/katello-default-ca.key]: Could not evaluate: Execution of '/usr/bin/openssl rsa -in /root/ssl-build/katello-default-ca.key -out /root/ssl-build/katello-default-ca.key.tmp -passin file:/etc/pki/katello/private/katello-default-ca.pwd' returned 1: unable to load Private Key
/Stage[main]/Gutterball::Database/Postgresql::Server::Db[gutterball]/Postgresql::Server::Database[gutterball]/Exec[/usr/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'utf8' --locale=en_US.utf8 'gutterball']: Failed to call refresh: /usr/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'utf8' --locale=en_US.utf8 'gutterball' returned 1 instead of one of [0]
/Stage[main]/Gutterball::Database/Postgresql::Server::Db[gutterball]/Postgresql::Server::Database[gutterball]/Exec[/usr/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'utf8' --locale=en_US.utf8 'gutterball']: /usr/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'utf8' --locale=en_US.utf8 'gutterball' returned 1 instead of one of [0]
This issue can be reproduced in two ways:
1) Using katello-backup
1) yum -y install katello
2) katello-installer
3) cd /mnt/backup1
4) katello-backup .
5) cd ~
6) katello-remove
7) yum -y install katello
8) katello-installer
9) cd /mnt/backup1
10) katello-restore .
11) Above error is produced.
Or 2) Using the following script:
Which does the following from:
CONFIGS=[
'/etc/candlepin',
'/etc/foreman',
'/etc/foreman-proxy',
'/etc/gutterball',
'/etc/hammer',
'/etc/httpd',
'/etc/katello',
'/etc/katello-installer',
'/etc/pki/content',
'/etc/pki/katello',
'/etc/pki/katello-certs-tools',
'/etc/pki/pulp',
'/etc/pki/tls/certs/katello-node.crt',
'/etc/pki/tls/certs/pulp_consumers_ca.crt',
'/etc/pki/tls/certs/pulp_ssl_cert.crt',
'/etc/pki/tls/private/katello-node.key',
'/etc/pulp',
'/etc/puppet',
'/etc/qpid',
'/etc/qpid-dispatch',
'/etc/sysconfig/tomcat*',
'/etc/tomcat*',
'/root/ssl-build',
'/var/lib/foreman',
'/var/lib/katello',
'/var/lib/candlepin',
'/var/www/html/pub',
'/var/lib/puppet/foreman_cache_data',
'/var/lib/puppet/ssl'
]
puts "Backing up config files... "
`tar --selinux -czf config_files.tar.gz #{CONFIGS.join(' ')}`
Environment
- Red Hat Satellite 6.1.7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
