Flussonic Watcher documentation

Updating the Database Structure

Some Flussonic Watcher updates include structural changes to the database. In this case, you will see the following message:

Updating the Database Structure

The script /opt/flussonic/contrib/watcher_db_migrate.sh adds changes to the database structure.

Run this script on the server side manually.

Here is an example of the success log:

# /opt/flussonic/contrib/watcher_db_migrate.sh
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade dfd74e510414 -> 1822b8f25e20, agent:model, agent:camera
INFO  [alembic.runtime.migration] Running upgrade 1822b8f25e20 -> 1a71a9477bbb, streamer: cluster_key
INFO  [alembic.runtime.migration] Running upgrade 1a71a9477bbb -> 7a3ab2550cab, streamer_fkey cascade
Restarting Watcher

After the Flussonic Watcher restart, you will be able to use the Watcher GUI.

If while running watcher_db_migrate.sh will be similar error to:

alembic.util.exc.CommandError: Can't locate revision identified by 'ebdce5515b6d

Then install previous version (version before update/downgrade) and run:

cd /opt/flussonic/apps/vsaas
/opt/flussonic/bin/python -m manage db downgrade

Important! Backup your database before running watcher_db_migrate.sh script.

The database type and location is stored in the configuration file /etc/flussonic/flussonic.conf.

  • PostgreSQL:
vsaas {
  database postgresql://vsaas:vsaas_password@localhost/vsaas_production;
  • Make a reserve copy using the pg_dump utility:
pg_dump -h localhost -U vsaas -d vsaas_production > /path/to/backup/vsaas.sql

Answer: Password: enter password vsaas_password, that you specified for vsaas user