The ‘maintain’ Utility : ‘maintain’ Command Reference

‘maintain’ Command Reference
chpasswd
maintain chpasswd <user> <new-password>
Changes the password stored in the AccuRev repository for an existing principal-name (named AccuRev user). To remove a user’s password, use two consecutive double-quote characters as the <new-password> parameter:
maintain chpasswd derek ""
chslice
maintain chslice <slice-number> <new-location>
Changes the location of an existing slice in the repository. Use the show slices command to get a listing of slice numbers and their current locations.
Note: this command does not physically move the slice. See the chslice command in the AccuRev CLI User’s Guide for more information.
chuser
maintain chuser <user-ID> <new-username>
Changes the principal-name (AccuRev username) of an existing user. You specify the user by the unique numeric user-ID, which is immutable. This command is similar to the accurev chuser command.
concheck
maintain concheck [ site | diag ] [<db-admin>]
Tests AccuRev’s ability to connect to the database.
When site is specified, the command verifies the existence of the AccuRev database as well.
When diag is specified, the command performs a series of diagnostics (server initialization, database connection, query execution, and database creation) and displays timing information for each one.
Also see Specifying a Database Admin Username and Password on page 105.
dbcheck
maintain dbcheck [<depot-name>]
Performs certain checks on the whole AccuRev database or a specified depot-name:
For each active depot, checks access to the depot schema, the database-schema version, and the monotonicity of transaction numbers and element-IDs.
Note: stop the AccuRev Server before running this command.
dbupgrade
maintain dbupgrade [<db-admin>]
Upgrades an AccuRev 4.7.x or higher database to an AccuRev 5.x database. This process may take several minutes or several hours, depending upon the size of the database being upgraded.
The dbupgrade wizard will prompt you through the options and values that you need to provide, including database admin name and password, and whether or not to perform a “dry run” upgrade without writing to the database, to evaluate and address the results of a dbupgrade.
During the upgrade, checks and corrects (if necessary) the integrity of information in AccuRev depots. These integrity checks focus primarily on the trans (transactions), trans_entry (transaction-entries), ver (version), vvir (virtual-version), and anc (ancestry) tables. See “Using the ‘maintain dbupgrade’ Command” in the current Accurev Installation and Release Notes for the most up-to-date information about using dbupgrade.
Also see Specifying a Database Admin Username and Password on page 105.
mkdbuser
maintain mkdbuser <db-admin>
Makes a database user using the DB_USER and DB_PASS values from the acserver.cnf file in the AccuRev bin directory. The AccuRev Server uses this username to communicate with the database.
mksite
maintain mksite [<db-admin>]
This command creates an empty database for use with AccuRev 5.0 and higher.
Also see Specifying a Database Admin Username and Password on page 105.
restore
maintain restore <backup-file-spec> [<db-admin>]
Provides a facility for restoring AccuRev metadata from backup (see Backup/Restore of the AccuRev Repository on page 109).
The <backup-file-spec> can be either a file name (if the backup was saved to $BACKUP_LOC) or the full path and name of the backup file.
Also see Specifying a Database Admin Username and Password on page 105.
rmdepot
maintain rmdepot <depot-name>
Removes a depot from the AccuRev repository. All streams, snapshots, and workspace streams are also removed from the repository. (Workspace trees are not removed.) For details, see Removing a Depot from the AccuRev Repository on page 109.
rmsite
maintain rmsite <db-admin>
Removes the PostgreSQL database used by AccuRev 5.0 and higher.
Also see Specifying a Database Admin Username and Password on page 105.
setcnf
maintain setcnf <parameter> [<value>]
Writes the <parameter> and <value> specified to the acserver.cnf file in the AccuRev bin directory in the form PARAMETER=value. If the <parameter> is DB_PASS, this command encrypts the plain-text password given as well.
server_properties
maintain server_properties [ update ]
Displays the following server properties from both the acserver.cnf file and the AccuRev database: SITE_SLICE_LOC, MASTER_SERVER, and PORT. In addition, the values from each location are compared and the command displays whether or not they match.
When the update option is specified, the values that do not match are written from the acserver.cnf file into the database.
Important! Whenver you edit the values for SITE_SLICE_LOC, MASTER_SERVER, or PORT in the acserver.cnf file, you must also run the maintain server_properties update command before the new values will take effect.
show slices
maintain show slices [ all ]
For each AccuRev depot, displays the slice number (Slice#) and the full pathname to the directory within the repository that stores the data for that depot (Location). Use the all parameter to include deactivated (removed) slices in the listing. Use the chslice command to change the location of a slice.
su
maintain su [ { -a | -r } <accountname> ]
Add or remove a superuser account for working with element-level security (“EACL”s). If run with no arguments, maintain su displays a list of any superusers. See Element-Level Security (EACLs) on page 63 for details.
vercheck
maintain vercheck [{ -c | -q } [ -e <eid> ] <depot-name>
Checks the storage containers in the specified depot’s data directory tree, to verify that a storage container file (.sto) exists for each file version recorded in the depot database. It also reports occurrences of “crc mismatch” problems: the actual checksum (CRC) of a .sto file does not match the checksum recorded in the corresponding version record.
In addition, you can correct “crc mismatch” problems, using these options:
–q option: for each file with a “crc mismatch”, (step 1) compute the checksum of the .sto file, and (step 2) replace the “c:” value in the version record with this newly computed value.
–c option: like –q, start with this step for each file: (step 0) change the .sto file by removing all its CR characters — that is, all bytes with the value 0x0D.
You can restrict the processing to versions of a particular element with the –e option. vercheck fixes all the versions of the element that have a “crc mismatch” problem, leaving other versions as is.

AccuRev, Inc.
Phone: 781-861-8700
Fax: 781-861-8704
support@accurev.com