Cannot run occ Maintenance:repair --include-expensive because occ returns it is ambigous

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu Server 24.04.3 LTS x86_64
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.58
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • caddy latest ersion
  • PHP version (e.g, 8.3):
    • 8.3.6
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After update to 32.0.0
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

After updating to 32.0.0, if I run occ Maintenance:repair --include-expensive to fix Mime Type Migration warning message, occ says that the command occ Maintenance:repair is ambigous:

“Command “Maintenance:repair” is ambiguous.
Did you mean one of these?
maintenance:repair repair this installation
maintenance:repair-share-owner repair invalid share-owner entries in the database”

How can I fix this?

Steps to replicate it (hint: details matter!):

  1. Update to NC 32.0.0

  2. Go to admin settings

  3. System check

  4. You see the warning

  5. Go to the server and run sudo -u www-data /var/www/nextcloud/occ Maintenance:repair --include-expensive

  6. occ says the command is ambigous

Log entries

Nextcloud

No entries

Web Browser

Not related

Web server / Reverse Proxy

Not related

Configuration

Nextcloud

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "127.0.0.1",
            "localhost",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "32.0.0.13",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_phone_region": "IT",
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "maintenance_window_start": 1,
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpport": "465",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "updater.release.channel": "stable",
        "loglevel": 2,
        "updatedirectory": "\/var\/nextcloud-update",
        "app_install_overwrite": [
            "richdocuments",
            "impersonate"
        ]
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": "filesystem"
        },
        "app_api": {
            "enabled": "no",
            "installed_version": "32.0.0",
            "types": ""
        },
        "backgroundjob": {
            "lastjob": "23"
        },
        "bruteforcesettings": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": ""
        },
        "calendar": {
            "enabled": "yes",
            "installed_version": "5.5.4",
            "types": ""
        },
        "circles": {
            "enabled": "no",
            "installed_version": "31.0.0-dev.0",
            "loopback_tmp_scheme": "http",
            "maintenance_run": "0",
            "maintenance_update": "{\"3\":1741536602,\"2\":1741537502,\"1\":1741537802}",
            "migration_22": "1",
            "migration_run": "0",
            "types": "filesystem,dav"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.16.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.22.0",
            "types": "logging"
        },
        "contacts": {
            "enabled": "yes",
            "installed_version": "7.3.1",
            "types": "dav"
        },
        "contactsinteraction": {
            "enabled": "yes",
            "installed_version": "1.13.1",
            "types": "dav"
        },
        "core": {
            "backgroundjobs_mode": "cron",
            "emailTestSuccessful": "1",
            "installedat": "1726482706.8225",
            "lastcron": 1759232702,
            "lastupdateResult": "[]",
            "lastupdatedat": 1759229158,
            "metadataGenerationDone": true,
            "moveavatarsdone": "yes",
            "previewsCleanedUp": "1",
            "public_files": "files_sharing\/public.php",
            "updater.secret.created": 1729348513,
            "vendor": "nextcloud",
            "files_metadata": {
                "photos-original_date_time": {
                    "value": null,
                    "type": "int",
                    "etag": "",
                    "indexed": true,
                    "editPermission": 0
                },
                "photos-size": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-exif": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-ifd0": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "blurhash": {
                    "value": null,
                    "type": "string",
                    "etag": "6ecd60507b8ed85b0b560291e8cb0664",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-gps": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-place": {
                    "value": null,
                    "type": "string",
                    "etag": "",
                    "indexed": true,
                    "editPermission": 0
                }
            },
            "oc.integritycheck.checker": []
        },
        "dashboard": {
            "enabled": "yes",
            "installed_version": "7.12.0",
            "types": ""
        },
        "dav": {
            "buildCalendarReminderIndex": "yes",
            "buildCalendarSearchIndex": "yes",
            "builtSocialSearchIndex": "yes",
            "chunks_migrated": "1",
            "enabled": "yes",
            "installed_version": "1.34.2",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "types": "filesystem"
        },
        "documentserver_community": {
            "enabled": "no",
            "installed_version": "0.1.20",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.22.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.22.0",
            "types": "authentication"
        },
        "files": {
            "enabled": "yes",
            "installed_version": "2.4.0",
            "mimetype_version": "31.0.0.18",
            "types": "filesystem",
            "watermark_enabled": "no"
        },
        "files_downloadlimit": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": ""
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": ""
        },
        "files_reminders": {
            "enabled": "yes",
            "installed_version": "1.5.0",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.24.0",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.22.0",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.25.0",
            "types": "filesystem,dav"
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": ""
        },
        "impersonate": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "prevent_group_restriction"
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": "logging"
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "types": "authentication"
        },
        "mail": {
            "enabled": "yes",
            "installed_version": "5.5.0",
            "types": ""
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "4.0.0-dev.0",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "types": "logging"
        },
        "notes": {
            "enabled": "yes",
            "installed_version": "4.12.3",
            "types": ""
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "types": "authentication"
        },
        "onlyoffice": {
            "DocumentServerInternalUrl": "***REMOVED SENSITIVE VALUE***",
            "DocumentServerUrl": "***REMOVED SENSITIVE VALUE***",
            "StorageUrl": "",
            "advanced": "false",
            "cronChecker": "true",
            "customizationChat": "true",
            "customizationCompactHeader": "true",
            "customizationFeedback": "true",
            "customizationForcesave": "false",
            "customizationHelp": "true",
            "customizationReviewDisplay": "original",
            "customizationTheme": "theme-dark",
            "customizationToolbarNoTabs": "true",
            "customization_macros": "true",
            "customization_plugins": "true",
            "defFormats": "{\"doc\":\"true\",\"docm\":\"false\",\"docx\":\"true\",\"dot\":\"false\",\"dotm\":\"false\",\"dotx\":\"false\",\"epub\":\"false\",\"fb2\":\"false\",\"fodt\":\"false\",\"htm\":\"false\",\"html\":\"false\",\"mht\":\"false\",\"mhtml\":\"false\",\"odt\":\"true\",\"ott\":\"false\",\"rtf\":\"false\",\"stw\":\"false\",\"sxw\":\"false\",\"txt\":\"false\",\"wps\":\"false\",\"xml\":\"false\",\"csv\":\"false\",\"fods\":\"false\",\"ods\":\"true\",\"ots\":\"false\",\"sxc\":\"false\",\"xls\":\"true\",\"xlsb\":\"false\",\"xlsm\":\"false\",\"xlsx\":\"true\",\"xlt\":\"false\",\"xltm\":\"false\",\"xltx\":\"false\",\"fodp\":\"false\",\"odp\":\"true\",\"otp\":\"false\",\"pot\":\"false\",\"potm\":\"false\",\"potx\":\"false\",\"pps\":\"false\",\"ppsm\":\"false\",\"ppsx\":\"false\",\"ppt\":\"true\",\"pptm\":\"false\",\"pptx\":\"true\",\"sxi\":\"false\",\"pdf\":\"true\",\"djvu\":\"false\",\"docxf\":\"true\",\"oform\":\"true\",\"oxps\":\"false\",\"xps\":\"false\"}",
            "demo": "{\"available\":false,\"enabled\":false,\"start\":{\"date\":\"2024-09-17 15:35:22.969119\",\"timezone_type\":3,\"timezone\":\"UTC\"}}",
            "editFormats": "{\"epub\":\"false\",\"fb2\":\"false\",\"html\":\"false\",\"odt\":\"true\",\"ott\":\"false\",\"rtf\":\"true\",\"txt\":\"true\",\"csv\":\"true\",\"ods\":\"true\",\"ots\":\"false\",\"odp\":\"true\",\"otp\":\"false\"}",
            "enabled": "no",
            "groups": "[]",
            "installed_version": "9.7.0",
            "jwt_header": "",
            "jwt_secret": "***REMOVED SENSITIVE VALUE***",
            "preview": "true",
            "protection": "owner",
            "sameTab": "true",
            "settings_error": "Server error: `GET https:\/\/***REMOVED SENSITIVE VALUE***\/index.php\/apps\/documentserver_community\/healthcheck` resulted in a `500 Internal Server Error` response:\n<!DOCTYPE html>\n<html class=\"ng-csp\" data-placeholder-focus=\"false\" lang=\"en\" data-locale=\"en\" translate=\"no\" >\n\t<head\n  (truncated...)\n",
            "types": "prevent_group_restriction",
            "verify_peer_off": "false",
            "versionHistory": "true"
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "4.0.0-dev.0",
            "types": "authentication"
        },
        "photos": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.1",
            "lastPlaceMappedUser": "admin",
            "lastPlaceMappingDone": "true",
            "types": "dav,authentication"
        },
        "privacy": {
            "enabled": "yes",
            "installed_version": "4.0.0-dev.0",
            "types": ""
        },
        "profile": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.22.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": ""
        },
        "related_resources": {
            "enabled": "yes",
            "installed_version": "3.0.0-dev.0",
            "types": ""
        },
        "richdocuments": {
            "disable_certificate_verification": "",
            "doc_format": "ooxml",
            "enabled": "yes",
            "installed_version": "8.7.4",
            "public_wopi_url": "***REMOVED SENSITIVE VALUE***",
            "types": "filesystem,prevent_group_restriction",
            "wopi_allowlist": "",
            "wopi_url": "***REMOVED SENSITIVE VALUE***"
        },
        "richdocumentscode": {
            "enabled": "yes",
            "installed_version": "25.4.403",
            "types": ""
        },
        "serverinfo": {
            "cached_count_appdata_files": 123454,
            "cached_count_filecache": 162979,
            "cached_count_storages": 5,
            "enabled": "yes",
            "installed_version": "4.0.0-dev.0",
            "size_appdata_storage": -1,
            "types": ""
        },
        "settings": {
            "appstore-fetcher-lastFailure": "1759230085",
            "enabled": "yes",
            "installed_version": "1.15.1",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.22.0",
            "types": "filesystem"
        },
        "spreed": {
            "enabled": "no",
            "installed_version": "21.1.4",
            "project_access_invalidated": "1",
            "signaling_token_privkey_es256": "***REMOVED SENSITIVE VALUE***",
            "signaling_token_pubkey_es256": "***REMOVED SENSITIVE VALUE***",
            "types": "dav,prevent_group_restriction"
        },
        "support": {
            "SwitchUpdaterServerHasRun": "yes",
            "enabled": "yes",
            "installed_version": "4.0.0-dev.0",
            "types": "session"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "4.0.0-dev.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.22.0",
            "types": "logging"
        },
        "text": {
            "enabled": "yes",
            "installed_version": "6.0.0-dev.0",
            "types": "dav"
        },
        "theming": {
            "cachebuster": "3",
            "disable-user-theming": true,
            "enabled": "yes",
            "installed_version": "2.7.0",
            "name": "Nextcloud casa Accogli",
            "slogan": "***REMOVED SENSITIVE VALUE***",
            "types": "logging",
            "url": "***REMOVED SENSITIVE VALUE***"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.21.0",
            "types": ""
        },
        "twofactor_nextcloud_notification": {
            "enabled": "yes",
            "installed_version": "6.0.0-dev.0",
            "types": ""
        },
        "twofactor_totp": {
            "enabled": "yes",
            "installed_version": "14.0.0",
            "types": ""
        },
        "twothousandandfortyeight": {
            "enabled": "no",
            "installed_version": "1.0.2",
            "types": ""
        },
        "updatenotification": {
            "calendar": "5.5.5",
            "contacts": "7.3.2",
            "core": "32.0.0.13",
            "enabled": "yes",
            "impersonate": "1.17.1",
            "installed_version": "1.22.0",
            "mail": "5.5.5",
            "notes": "4.12.3",
            "onlyoffice": "9.7.0",
            "richdocuments": "8.7.5",
            "richdocumentscode": "25.4.504",
            "spreed": "20.1.4",
            "types": "",
            "update_check_errors": 0
        },
        "user_status": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": ""
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "5.0.0-dev.0",
            "types": ""
        },
        "weather_status": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": ""
        },
        "webhook_listeners": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "filesystem"
        },
        "whiteboard": {
            "enabled": "no",
            "installed_version": "1.0.1",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.14.0",
            "types": "filesystem"
        }
    }
}

Use lowercase for Maintenance

sudo -u www-data /var/www/nextcloud/occ maintenance:repair --include-expensive

Thank you! Why didn’t I think before posting? :sweat_smile:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.