Skip to content

Watcher Database Management Tool

This section describes the tool for performing certain actions on the Watcher database and shows usage examples.

Use --help to get the list of commands:

/opt/flussonic/contrib/watcher --help

Use the command name and --help to get help on the usage of this command:

/opt/flussonic/contrib/watcher db --help

Actions that you can perform

With the tool /opt/flussonic/contrib/watcher you can:

  • migrate the database
/opt/flussonic/contrib/watcher db --help
  • back up and restore the database
/opt/flussonic/contrib/watcher backup --help
  • restart Watcher
/opt/flussonic/contrib/watcher restart --help
  • add and modify users
/opt/flussonic/contrib/watcher adduser --help
  • change the password for a user
/opt/flussonic/contrib/watcher reset_pass --help
  • get database revision
/opt/flussonic/contrib/watcher check --help

See usage examples later on this page.

Backing up the Watcher database


If you are experiencing some errors trying to back up or restore the database with Watcher tool, try using native PostgreSQL tools as described here.

Creating a backup copy of the Watcher database

To create a backup copy of the Watcher database:

/opt/flussonic/contrib/watcher backup create; 

This command creates a file with the name similar to this one: /var/lib/flussonic/watcher-backups/20190418154218-5fa9cb92a00d-WatcherBackup.gz

Prior to version 19.07.1, backup files were located in a different directory — /opt/flussonic/apps/vsaas/backups/.

You can specify your own directory for storing backup files. To do this, use the Linux command export:

export BACKUP_PATH=/your/path/to/backups

Replace /your/path/to/backups with the path to the directory where you want to store backups.

Viewing the list of created backup files

To check if there are created backup files:

/opt/flussonic/contrib/watcher backup history

Restoring the database from a backup file

To restore the data from a specified backup file:

/opt/flussonic/contrib/watcher backup restore -d 20190418154218

By default, if no backup file was specified, the tool restores the last created backup:

/opt/flussonic/contrib/watcher backup restore

Adding a user

/opt/flussonic/contrib/watcher adduser USER_NAME -a 1 -e 1 -p PASSWORD


  • USER_NAME — user login
  • -a — whether the user is administrator (1) or not (0)
  • -e — whether the user is enabled (1) or not (0)
  • -p — the user's password.