Skip to content

MediaHub Settings: DB Manager

The DB Manager gives direct access to MediaHub's own database records. It is the same tool as the Studio DB Manager, pointed at the MediaHub collections, and it must be used with the same caution: what you change here is written straight to the database, with no undo.

Where to Find It

Open the user menu in the top-right corner of MediaHub, choose Admin Settings, then select DB Manager from the left-hand menu. The direct address is http://[serverIP]:5600/admin/dbmanager.

At the top of the page are two tabs, Database and Script.

Warning

Switching to the Script tab first asks Invalid syntax can corrupt the database, please ensure you have created a backup before proceeding?. Take that seriously: make a backup before you use it.

Database

The column on the left lists the MediaHub collections:

Collection Holds Columns shown
Assets One record per folder and per media item in the library. ID, Name, Path, Size
Jobs The background jobs - thumbnails, previews, media conversion and Publish To Remote. ID, Path, Status
Storage The files themselves, as they are stored. Filename, Size

Pick a collection to list its records. Underneath the list is a pager; use it to step through large collections.

Filtering

The small JSON editor above the table takes a MongoDB filter. Type the filter and click the button to apply it - for example:

1
    { "status": "FAILED" }

An empty or invalid filter lists everything.

Editing a record

Click a row to load the full record, as JSON, into the editor on the right. From there:

  • Update writes your edited JSON back. You are asked Are you sure you would like to update the document? first, and MediaHub reports Document was updated succesfully.
  • Delete removes the record, after asking Are you sure you would like to delete?.

When the Storage collection is selected, the pane under the JSON editor previews the selected file.

Warning

Be extremely careful when editing records. An asset record and its file in storage have to match - editing one without the other leaves the library inconsistent. Run Evaluate on the Maintenance page to find that kind of mismatch.

Script

The Script tab runs a script directly against the database. The editor is in the middle, the result is shown read-only underneath it, and the button runs the script.

Running a script requires an administrator account; for any other user the request is rejected.

Every script you run is kept in the History list on the left, so you can click an earlier script to load it again. The list is stored in your browser only. The icon in the History header clears it, after a confirmation.

Warning

Executing incorrect or invalid scripts in this section may irreversibly corrupt the database. Always create a backup before running any scripts.

Best Practices

  • Always create a backup before making any changes via DB Manager.
  • Prefer the ordinary MediaHub interface and the Maintenance page; use DB Manager only when nothing else can do the job.
  • Test a script on a development installation first if you can.