Database CLI Tool

The smdba tool allows you to manage the installed PostgreSQL database. It allows you to backup and restore the database, as well as administration tasks like creating, verifying, and restarting the database. The tool works on local databases only.

To access a shell inside the Server container, run mgrctl term on the container host. From there, one can run the CLI tools as usual.

The smdba tool replaces the older db-control tool. The db-control tool is now unsupported.

After you stop or restart the database, you need to restart the Uyuni services.

Table 1. Database Options
Option Description

backup-hot

Enable continuous archiving backup

backup-restore

Restore the database from backup.

backup-status

Show backup status.

db-start

Start the database.

db-status

Show database status.

db-stop

Stop the database.

space-overview

Show database space report.

space-reclaim

Free disk space from unused objects in tables and indexes.

space-tables

Show space report for each table.

system-check

Perform a back-end health check.

help

Show help message and exit.

Each option has additional help available. See the help using this syntax:

smdba <OPTION> --help