3.2. Backing up an Embedded Database
Red Hat Satellite provides a specialized command-line utility to assist with embedded database management tasks. The
db-controlcommand provides features to create, verify, and restore backups, to obtain database status information and to restart the database when necessary. See the
db-controlmanual page (
man db-control) for a full listing of the features available.
The following sections are demonstrate how to create, verify, and restore Red Hat Satellite embedded and managed databases.
3.2.1. Performing Online Database Backups
Red Hat Satellite Server 5.6 introduces new functionality that enables online backups of your database, without the need to stop the Satellite Server. Additions to the existing
db-controlcommand make this functionality possible.
Three new options have been added to the
online-backup FILENAME:Performs an online backup of the Satellite database (embedded PostgreSQL only).
reset-password:Resets the user password and unlocks the account.
restore DIRECTORY | FILENAME:Restores the database from either:
- An offline backup taken by
db-controland saved in the DIRECTORY directory. The database must be stopped for both the
restoreoperations in order to run successfully.
- An online backup taken by
db-controland saved as FILENAME. The database itself must be running for both the
restoreoperations in order to run successfully, but all other Satellite services must be stopped.
126.96.36.199. Performing an Online Backup
To create an online backup of an embedded Red Hat Satellite 5.6 server database, change to the root user, and run the following command. Replace the
FILENAMEoption with the full path to the backup file that you want to create. This location needs to be writable by the PostgreSQL user:
There is no need to stop either the database or the Satellite services to perform an online backup.
188.8.131.52. Restoring a Database from an Online Backup
db-controlcommand to restore an embedded database from a backup created using the
db-controlcommand. Before you restore a database, you need to shut down all Satellite services except the database itself.
Procedure 3.1. To Restore a Database from an Online Backup:
- Change to the root user, and run the following command to stop all Satellite services except the database:
- Run the following command to restore the database. Replace the
FILENAMEoption with the full path to the backup file created with the
- After the restoration is complete, run the following command to restart the database and all related services: