Administration Guide : Command-line manual pages

DBMGR(8) manual page


dbmgr - program for managing the WebNative Venture database


dbmgr [ options ] [ actions ]
dbmgr [ options ] [ actions ] [ target ]


The dbmgr utility for WebNative Venture can be used to do general database maintenance as well as specific administrative tasks from the command line. Most of these operations are generally done automatically according to settings in the Database tabs of the WebNative nativeadmin GUI. The dbmgr utility also includes flags to remove duplicates, and orphans from the database, as well as no-longer-needed entries.


-d dblev
Turns on debugging at a certain level, represented by dblev (in hex).
Turns on full debugging.
Turns on verbose reporting mode.


Checks for and adds/rebuilds any missing/damaged essential standard indexes. It will not, however, touch the FileName column FullText index in the file table.
Adds the user "nativeadmin" to the MySQL database's user table (called during installation).
Adds "browse" to the permsetfield table. (This option can only be called from a browser.)
Merges together archivemedia table entries for media that have more than one entry.
Equivalent to -addindexes.
Parses the dbtables.sql file inside /usr/etc/venture/scripts to determine which tables are missing. Also see -fixmissingtables.
Runs mysqlcheck on the DataBase tables.
Makes sure the UNI_CONSTRAINT index on the file table is in place. The UNI_CONSTRAINT index is used to prevent duplicates in the file table.
-cleanbefore MM/DD/YYYY
Removes offline database file entries with a time earlier than MM/DD/YYYY. (The date must have this format.)
-ctindexdump path | file_id
Dump records in the content index.
Rebuilds the wnvcontent database FullText indexes.
Used to clean unnecessary or orphaned records in the database. Includes the following: -archivemerge, -fixpathdups path, -fixfiledups, -fixoffline path, -fixorphans, -pathclean, -removeorphans, -removearchiveorphans, -removedeadarchives. Each may be run on an individual basis.
-dbretrigger [ -onlyremove ]
Rebuilds the necessary WebNative Suite database Triggers. The -onlyremove flag doesn't recreate new Triggers after deletion.
Removes files from the file table that have both online and offline entries.
Repairs broken local.js changes from version 16.0.
Parses the dbtables.sql file inside /usr/etc/venture/scripts to determine which tables are missing, then runs the dbtables.sql create table command to recreate any missing table(s).
-fixoffline path
Updates online state for files and folders, as appropriate based on filesystem.
Removes files that do not have valid parent paths from the database.
-fixpathdups path
Remove paths with multiple file table entries.
Rebuilds the fileid column in the path table.
Adds MySQL database privilege rights.
Checks each individual FTI table split for version upgrades.
-fticreate data fields [ path ]
Creates a FullText index for the given keywords. Optionally, a path can be provided to limit the FullText index to that path.

Available fields include: file.filename, file.aicomment, annotations.* and any combination of keyword1 string fields. The keyword1 fields can be specified in two formats, by field number (keyword1.field123) or by field name (keyword1.ByLine). Use of keyword1.* includes all string fields plus annotations in the database. It can cause slowdowns when updating new information. Select, instead, the fields used for searching in user templates or use it with caution. A single asterisk may be used to index all data fields described above.

The data fields parameter should be enclosed in double quotes if it contains any spaces or special characters.

-ftidisable index name
Disables the named FullText index, e.g., ftindex1.
-ftidrop index name
Drops the named FullText index, e.g., ftindex1.
Drops all FullText indexes.
-ftienable index name
Enables the named FullText index, e.g., ftindex1.
Rebalances all existing indexes.
-ftiretrigger index name
Rebuilds Triggers for an index.
Rebuilds all Triggers for all existing indexes.
Resyncs all FTIs with the rest of the database.
Runs a full backup of database tables.
Fixes issues with composed/decomposed Unicode path duplication.
-mergetrailingspaces [path ]
Merges path table entries that are duplicated due to the existence of a trailing space in the foldername. In the past, when folders with trailing spaces were renamed, duplicate entries were made, one for each version of the path name. This command will fix that problem for live paths.
-optimize table
Runs the MySQL optimize command on the specified table. The action is "split table" aware, meaning that when run on bigwebdata, smallwebdata, or fpodata, a single invocation will optimize each subtable within the table specified. For example, dbmgr -optimize bigwebdata, will check each of the 256 bigwebdata subtables within the database.
-pass password -newpass newpassword
Changes the current MySQL database password (password) to a new password (newpassword).
-pathclean path
Removes paths that no longer exist from the database.
[ -progress ] -temp -path path
Moves the WebNative Venture temp directory to path. (This option can only be called from a browser. It displays a progress bar to the user.)
Deletes all events in event table.
Deletes backup events from event table.
-purgedeleted [ -countonly ] | -limited | -skiparch
Removes deleted (and unarachived) files from the database. (Using -countonly will return the number of files effected without actually removing the files, giving some idea of the usefulness of using the flag. The -limited flag deletes only up to 100k files; -skiparch skips archive flag update.) Also see -slowpurgedeleted.
-purgeemptykeys [ -countonly ]
Removes empty or NULL valued rows in metadata data table. Using -countonly will return the number of files effected without actually removing the files, giving some idea of the usefulness of using the flag.
Deletes expires events in event table.
-purgenullkeys [ -countonly ]
Removes NULL valued rows in metadata table (keyword1). Using -countonly will return the number of files effected without actually removing the files, giving some idea of the usefulness of the flag.
-purgeunusedevents | -cleanupevents
Removes all "read" and "setfileparms" events from the event table.
Run a quick backup of the database, which does a backup of all tables EXCEPT those that store previews.
Run a full backup of the database, which does a backup of all tables.
-remove [-offlineonly ]

-v|-p|-f|-u|-g|-t|-s|-k|-m objectname |
-remove [ -offlineonly ]
-vid|-pid|-fid|-uid|-gid|-tid|-sid|-kid|-mid object db id

(single letter removes an object by name,
letter plus "id" removes an object by id)

v = volume
p = path
f = file
u = user
g = group
t = template
s = permset
k = keyword
m = media
Removes the specified item from the database. This flag can be used to remove anything from a file to a volume. It is generally best to follow a remove with the dbmgr -dbclean command to truly purge the items and their related objects. You can use either the name of the object that you want to remove (i.e., /raid/path/temp) or the object ID as it exists in the database.


dbmgr -remove -v MyVolume
dbmgr -remove -vid 20

Removes all archive entries from the database including file, path, archive media and archive event entries.
Remove archive entries without file or path table entries.
-removearchives path
Removes archive entries for a particular file or path (does not purge media information).
Remove archive entries marked as dead in the path aliases defined in dblogd.conf.
Removes paths that do not correspond to an enabled volume (and their child files) from the database; removes previews for volumes that exist but no longer have previews enabled. Note: preview tables (bigwebdata, smallwebdata and fpodata) must be optimized using dbmgr -optimize in order to reclaim disk space.
-removeorphanversions path [ age ]
Removes Versions of files that may be left behind when a file is deleted. It will not touch Version files in directories that have been modified in less than age seconds. The default for age is 300. Use a value of zero to delete all Version orphans.
-removeversions path
Removes file versions.
-restart | -start |
Restarts or starts the mysqld daemon. (Note: this will also attempt to restart dblogd if it is not already running.)
Force the execution of date Triggers. Date Triggers will be executed if the current time is equal to or after the time in the date trigger table.
-setvar variable =value
Used by dbmgr when called as a CGI. (This can only be called from a browser.)
-setvarnorestart variable =value
Sets mysqld config variable without restarting mysqld.
Shutdown the mysqld daemon. (Note: this also stops dblogd, which cannot be running without mysqld.)
Does the same thing as -purgedeleted, but uses a slower method that is less intrusive so can safely be executed during normal operation.
Starts the mysqld daemon. Same as -restart.
-temp -path path
Sets mysqld temp directory path.
Fixes PDF file type values.
Updates tables to latest version, using dbtables.sql and dbtemplate.sql scripts in the Venture scripts directory. Optionally, you may append a version number (as in dbmgr -updatetables11), which will run the changes from that version (v11 in our example) rather than the current version. In other words, it allows dbmgr to force an "update" from a specific version and on upwards.
Updates user.conf files. Determines the user list on the WebNative server and makes sure that each entry has an entry in the database
Update the volume table with the latest volume information from KASPubVols. Old volumes that are no longer WEB-enabled will be deleted, and their contents removed.
Update the webnativeperm table with the contents of the webnativeperm file. Adding -force to -updatewnperms will override the modify-date check.
Adds columns to keyword1 for XMP fields defined in the keyword table. Only needed if those columns don't exist in keyword1 for some reason.
-useinnodb [ table ... ]
Convert a MyISAM venture database to use the InnoDB storage engine. By default, the file, path, keyword1 and event tables are converted. Other tables may be converted instead by supplying the table name(s) as arguments.
Convert all UserID columns in the database to INT instead of BIGINT.
-utf8namerebuild [ -onlynulls ]
Rebuilds the UTF8Name column in the file table. The -onlynulls option only updates UTF8Name entries that are empty.
Reports the version of MySQL and of the data tables. Also produces checksums for installed binaries.