12. OmniDB Config Tool¶
Every installation of OmniDB also comes with a small CLI utility called OmniDB Config. It will have a different file name, depending on the way you installed OmniDB:
- If you are using a tarball or zip package, it is called omnidb-config, for both server and app versions;
- If you used an installer (like the .deb file) of server version, it is called omnidb-config-server;
- If you used an installer of app version, it is called omnidb-config-app.
Despite having different names, the utility does exactly the same. If you used
an installer, it will be put in your
user@machine:~$ omnidb-config-app --help Usage: omnidb-config-app [options] Options: --version show program\'s version number and exit -h, --help show this help message and exit -d HOMEDIR, --homedir=HOMEDIR home directory containing local databases config and log files -c username password, --createsuperuser=username password create super user: -c username password -a, --vacuum databases maintenance -r, --resetdatabase reset user and session databases -t, --deletetemp delete temporary files
Set home directory¶
-d allows you to set the path to the OmniDB folder that contains the
config and database files where you want to execute other options, like creating
a new super user (
Create super user¶
-c allows you to create a new super user, without needing to open
user@machine:~$ omnidb-config-app -c william password Creating superuser... Superuser created.
OmniDB has two databases:
omnidb.db: Stores all users and connections, and other OmniDB related stuff;
- Sessions database: Stores Django user sessions.
Both databases are SQLite, so it can be useful to vacuum them sometimes to
reduce file size. This can be done with the
user@machine:~$ omnidb-config-app -a Vacuuming OmniDB database... Done. Vacuuming Sessions database... Done.
If you wish to wipe out all OmniDB information and get a clean database as it
was just installed, you can use the
-r option. Use it with caution!
user@machine:~$ omnidb-config-app -r *** ATENTION *** ALL USERS DATA WILL BE LOST Would you like to continue? (y/n) y Cleaning users... Done. Cleaning sessions... Vacuuming OmniDB database... Done. Vacuuming Sessions database... Done.
Delete temporary files¶
If you desire to remove temporary files that OmniDB creates along its execution,
like exported queries in CSV/XLSX format, you can use the
user@machine:~$ omnidb-config-app -t Cleaning temp folder... Done.