diff --git a/modules/admin_manual/pages/configuration/server/occ_command.adoc b/modules/admin_manual/pages/configuration/server/occ_command.adoc index fb7212c6c5..b0e4b1cd0a 100644 --- a/modules/admin_manual/pages/configuration/server/occ_command.adoc +++ b/modules/admin_manual/pages/configuration/server/occ_command.adoc @@ -1859,20 +1859,95 @@ that one or more files were modified. After the command completes, users will be prompted to resolve any conflicts between newer and older file versions. -The `maintenance:repair` command runs automatically during upgrades to -clean up the database, so while you can run it manually there usually -isn't a need to. +==== Installation Repair Commands +The `maintenance:repair` command helps administrators repair an installation. +The command runs automatically during upgrades to clean up the database. +So, while you can run it manually, there usually isn't a need to. + +NOTE: Your ownCloud installation needs to be in maintenance mode to use the `maintenance:repair` command. + +===== Repair Command Options + +The `maintenance:repair` command supports the following options: + +[cols="25%,75%",options="header"] +|=== +|Option +|Description +a|`--ansi` +|Force ANSI output. +a|`--include-expensive` +|Use this option when you want to include resource and load expensive tasks. +a|`--list` +|Lists all possible repair steps +a|`--no-ansi` +|Disable ANSI output. +a|`-n` `--no-interaction` +|Do not ask any interactive question. +a|`--no-warnings` +|Skip global warnings, show command output only. +a|`-q` `--quiet` +|Do not output any message. +a|`-s` `--single=SINGLE` +|Run just one repair step given its class name. +a|`-V` `--version` +|Display this application version. +a|`-v\|vv\|vvv` `--verbose` +a|Increase the verbosity of messages: + +* 1 for normal output +* 2 for more verbose output and 3 for debug +|=== + +Here is an example of running the command: + +[source,console] .... sudo -u www-data php occ maintenance:repair .... -`maintenance:mimetype:update-db` updates the ownCloud database and file -cache with changed mimetypes found in `config/mimetypemapping.json`. Run -this command after modifying `config/mimetypemapping.json`. If you -change a mimetype, run -`maintenance:mimetype:update-db --repair-filecache` to apply the change -to existing files. +To list all off the possible repair steps, use the `--list` option. +It should output the following list to the console: + +.... +Found 16 repair steps + +OC\Repair\RepairMimeTypes -> Repair mime types +OC\Repair\RepairMismatchFileCachePath -> Detect file cache entries with path that does not match parent-child relationships +OC\Repair\FillETags -> Generate ETags for file where no ETag is present. +OC\Repair\CleanTags -> Clean tags and favorites +OC\Repair\DropOldTables -> Drop old database tables +OC\Repair\DropOldJobs -> Drop old background jobs +OC\Repair\RemoveGetETagEntries -> Remove getetag entries in properties table +OC\Repair\RepairInvalidShares -> Repair invalid shares +OC\Repair\RepairSubShares -> Repair sub shares +OC\Repair\SharePropagation -> Remove old share propagation app entries +OC\Repair\MoveAvatarOutsideHome -> Move user avatars outside the homes to the new location +OC\Repair\RemoveRootShares -> Remove shares of a users root folder +OC\Repair\RepairUnmergedShares -> Repair unmerged shares +OC\Repair\DisableExtraThemes -> Disable extra themes +OC\Repair\OldGroupMembershipShares -> Remove shares of old group memberships +OCA\DAV\Repair\RemoveInvalidShares -> Remove invalid calendar and addressbook shares +.... + +===== Running a Single Repair Step + +To run a single repair step, use either the `-s` or `--single` options, as in the following example. + +[source,console] +.... +sudo -u www-data php occ maintenance:repair --single="OCA\DAV\Repair\RemoveInvalidShares" +.... + +TIP: The step's name must be quoted, otherwise you will see the following warning message appear, and the command will fail: +"_Repair step not found. Use --list to show available steps._" + +=== Mimetype Update Commands + +`maintenance:mimetype:update-db` updates the ownCloud database and file cache with changed mimetypes found in `config/mimetypemapping.json`. +Run this command after modifying `config/mimetypemapping.json`. +If you change a mimetype, run `maintenance:mimetype:update-db --repair-filecache` to apply the change to existing files. [[config-reports]] === Config Reports