Repository navigation
Command Line Options
Run DBRepair without any command line arguments to enter the interactive menu. Run it with one or more command names as arguments to use scripted (batch) mode — each argument is processed in order exactly as if it had been typed at the menu prompt, with no menu redisplayed between steps.
- Automatic (This runs Stop, Automatic (Check/Repair/Reindex as needed), Start, and Exit in sequence — useful for unattended maintenance via
cronor a scheduled task. If command-line EOF is reached before anexitorquitcommand is processed, DBRepair exits and keeps all temporary files rather than guessing your intent.)-
./DBRepair automatic exit(Linux/Mac) -
DBRepair.exe automatic exit(Windows)
-
Certain platforms don't provide for easy command line access. To support those products, DBRepair can be operated by adding command line arguments. If you want simple automatic maintenance, automatic exit is all that's needed.
To keep the menu simple, a few settings are command line options. Options go before any command words.
Example: ./DBRepair --nocommit automatic exit
-
--databases <path>- Directory which contains the Plex Media Server databases. Use it when the container / host cannot be identified. Give the path as seen from the context (namespace) DBRepair is running in. Main and blobs must both be present. DBRepair indicates it's in Manual configuration mode (see Manual configuration). Interactive and batch use both still work. DBRepair has its own statically-linked SQLite, so no separate "Plex SQLite" path is needed.
- If DBRepair can perfectly identify the version of your databases, you have full capabilities. If not, it looks for your Plex-generated databases and uses them as additional identification.
-
-c, --cache <MB>- SQLite cache size in MB. Must be less than free memory. Default is chosen from free memory (16 MB to 8 GB).
-
--cacheage <N>- Age limit in days for Prune (21) (PhotoTranscoder cache). Range 1-999. Default 30. Environment:
DBREPAIR_CACHEAGE
- Age limit in days for Prune (21) (PhotoTranscoder cache). Range 1-999. Default 30. Environment:
-
--downloaddir <path>- Directory for update downloads (Update (88)). Must already exist and be writable, otherwise an error. If not specified, DBRepair tries the
DBREPAIR_DOWNLOADDIRdirectory, then the first writable of yourHOME/Downloads,HOME/Download, then yourHOMEdirectory itself. If none of them are writable, DBRepair will not be able to download updates for you.
- Directory for update downloads (Update (88)). Must already exist and be writable, otherwise an error. If not specified, DBRepair tries the
-
--expungeage <N>(alias--expunge)- Age limit in days for Expunge (22). Range 1-3000. Default 180. Environment:
DBREPAIR_EXPUNGEAGE
- Age limit in days for Expunge (22). Range 1-3000. Default 180. Environment:
-
-f, --force- Continue on a damaged database where the command would refuse. Applies to
vacuum,reindex,expungeanddeflate.
- Continue on a damaged database where the command would refuse. Applies to
-
-i, --ignore- Ignore duplicate/constraint errors. Same as the Ignore (42) menu command.
-
-n, --nocommit- Do not make changes live. Changed databases are left in
dbtmp. Only one command can be invoked when --nocommit is specified.
- Do not make changes live. Changed databases are left in
-
--notrunning- Treat Plex Media Server as not running. For isolated runs on a host with a live Plex Media Server in another context (namespace).
-
--pms=<version>- Plex Media Server version the databases came from, e.g.
--pms=1.43.0.10162. Overrides version detection. A trailing build hash is ignored.
- Plex Media Server version the databases came from, e.g.
-
-v- Verbose output.
-
-V, --version- Show version and exit.
-
-h, --help- Show usage and exit.
Several of these can also be set with environment variables (see Environment variables). If an environment variable is already defined, its matching command line option will override the variable.
Documentation for DBRepair v26.10.00
DBRepair is proprietary software. Copyright: @ChuckPA 2022-2026 All Rights Reserved.
Use at own risk! This tool is not associated with Plex Inc.