Show Table of Contents
9.2. Restoring Subscription Asset Manager
Warning
Restoring Subscription Asset Manager overwrites all existing data for the Subscription Asset Manager instance.
Be certain to restore the proper Subscription Asset Manager instance.
Important
This procedure assumes that the Subscription Asset Manager server is being restored on the same machine where it was previously installed and backed up.
If the Subscription Asset Manager instance is being restored on a different host, then that system must have the same configuration as the original system, including the same hostname and IP address.
All restore operations must be performed as
root.
- Create a configuration file with the same options as the original instance using the file from the configuration backup, then run the
katello-configurescript.[root@server ~]# katello-configure --answer-file=/etc/katello/katello-configure.conf
- Open the directory containing the backup files. For example:
[root@server ~]# cd backup/
- Check the database names. The default database names are
katelloschemaandcandlepin. If the Subscription Asset Manager instance is not using the default names, then the custom values will be in thedb_nameparameters in thekatello-configure.conffile.[root@server backup]# grep db_name /etc/katello/katello-configure.conf
- Stop all services prior to restoring the databases:
[root@server backup]# katello-service stop
- Restore the system files by extracting the archived files and directories. For example:
[root@server backup]# tar --selinux -xzvf config_files.tar.gz -C / [root@server backup]# tar --selinux -xzvf elastic_data.tar.gz -C /
- Drop the existing Subscription Asset Manager PostgreSQL databases if any exist:
[root@server backup]# service postgresql start [root@server backup]# su postgres -c "dropdb katelloschema" [root@server backup]# su postgres -c "dropdb candlepin"
If all the processes are not stopped first, then the database drop operation can return this error:database xxx is being accessed by other users
- As the
postgresuser, run thepg_restorecommand to restore the databases.[root@server backup]# su postgres -c "pg_restore -C -d postgres /backup/katello.dump" [root@server backup]# su postgres -c "pg_restore -C -d postgres /backup/candlepin.dump"
For more info about PostgreSQL restore operations, see thepg_dumpman page or the PostgreSQL documentation. - Restart all Subscription Asset Manager processes:
[root@server backup]# katello-service restart
- Verify that all services are responding properly by checking the
/var/log/katello/production.loglog file for errors and the/var/log/candlepin/audit.logfile for denials.Attempt to ping the Subscription Asset Manager instance:[root@server backup]# katello -u admin -p admin ping -------------------------------------------------------------------------------- Katello Status Status Service Result Duration Message -------------------------------------------------------------------------------- OK candlepin OK 74ms candlepin_auth OK 38ms elasticsearch OK 37ms katello_jobs OK 39ms

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.