---
title: "tractor-dbctl"
canonical: "https://rmanwiki-25.pixar.com/space/TRA/22184286/tractor-dbctl"
format: markdown
---
This command line tool is used by the engine to automatically start and stop the back-end PostgreSQL relational database server. It can also be used by site admins to perform various database maintenance tasks.

 

Usage:tractor-dbctl [options]

**Options:**

| **Option** | **Description** |
| --- | --- |
| --start-for-engine | start the postgresql server and automaticallybuild/upgrade schema as configured in db.config (used by engine) |
| --stop-for-engine | stop the postgresql server as configured in db.config(used by engine) |
| --start | start the postgresql server |
| --stop | stop the postgresql server; this could be used to shut down postgresql if the engine wasn't able to do this automatically, or if the postgresql server was started manually; don't run this if the engine is running. |
| --status | check the status of the postgresql server |
| --init | initialize the postgresql data directory; server must not be running |
| --build | build the tractor database; server must be running |
| --destroy | remove the postgres database directory; server must not be running; this will remove *all* current and historical job and blade information. |
| --upgrade | update the database schema |
| --check-upgrade | check whether upgrades are required |
| --no-auto-upgrade | prevent automatic upgrading of the database schema |
| --purge-jobs | remove all jobs |
| --vacuum | rebuild tables of non-deleted jobs to save space |
| --reset-job-counter | reset the job id counter so that job ids (jids) start at 1; can only be used with --purge-jobs |
| --show-params | display configuration parameters stored in the database |
| --update-params | push certain configuration parameters as defined in the config files to the database |
| --logs-usage | report disk space used by postgresql log files |
| --purge-logs | remove postgresql log files |
| --backup=filename | write backup to specified file; the server must not be running. |
| --restore=filename | restore database from specified backup file; the server must not be running |
| --config-dir=path | path to tractor config directory |
| --quiet, --q | suppress all output, except for errors |
| --verbose, -v | adjust the level of verbosity |
| --debug, -d | print debug messages |
| --help, -h | this message |