The script can be used to dump and restore a PostgreSQL database.

This script can be used only for the PostgreSQL service. Don’t run this script on a remote database. Execute the script only when the database is up and running.


Run this script as follows:

./ --action=<action> --path=<destination directory>


Mandatory options:

Option Description
-a | --action Action to be performed. You can pass either dump or restore as an option.
-f | --path Path where the database backup file will be created. Must be a directory owned by the postgresql user (usually /var/lib/pgsql/11.1/). Can be a new directory.

Other options:

Option Description
-t | --type Specifies the type of database (ctf or reporting).
-h | --help Print this usage message and exit.