Skip to content

Nextcloud auto-removed itself during upgrade #842

@zyphlar

Description

@zyphlar

Similar to #801 I then tried the repair step with yunohost app shell nextcloud; php occ maintenance:repair but got the below. See yunopaste logs of the failed upgrade and successful(?!??) removal(?!?!!!!!!) of nextcloud. Note I never asked to remove Nextcloud, I just clicked the upgrade button and awoke to a broken server.

Failed upgrade: https://paste.yunohost.org/raw/ucelenaqat
Successful remove: https://paste.yunohost.org/raw/meqexiwode

root # yunohost app shell nextcloud
nextcloud $ php occ maintenance:repair
An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nex
tcloud.oc_storages' doesn't exist
{"reqId":"G87YbI2dkN1zGaflVSjC","level":1,"time":"2025-12-04T16:06:02+00:00","remoteAddr":"","user":"--","app
":"admin_audit","method":"","url":"--","message":"Console command executed: maintenance:repair","userAgent":"
--","version":"30.0.6.2","data":{"app":"admin_audit"}}                                                        - Repair MySQL collation
     - All tables already have the correct collation -> nothing to do
 - Clean tags and favorites
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_vcategory' doesn't exist
 - Repair invalid shares
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_share' doesn't exist
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Migrate oauth2_clients table to nextcloud schema
     - oauth2_clients table does not exist.
 - Repair language codes
 - Add log rotate job
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Clear frontend caches
     - Image cache cleared
     - WARNING: Unable to clear the frontend cache
 - Clear every generated avatar
 - Add preview background cleanup job
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Queue a one-time job to cleanup old backups of the updater
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Cleanup invalid photocache files for carddav
 - Add background job to cleanup login flow v2 tokens
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist                                                                   - Remove potentially over exposing share links
     - No need to remove link shares.
 - Clear access cache of projects
 - Reset generated avatar flag
 - Keep legacy encryption enabled
 - Check encryption key format
 - Remove old dashboard app config data
 - Add job to cleanup the bruteforce entries
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Queue a one-time job to check for user uploaded certificates
 - Repair DAV shares
 - Add background job to set the lookup server share state for users
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Add token cleanup job
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Clean up abandoned apps
 - Add possibly missing system config
 - Add AI tasks cleanup jobs
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Queue a job to generate metadata
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - migrate lazy config values
 - Cache logo dimension to fix size in emails on Outlook
     - Theming is not used to provide a logo
 - Remove legacy ".ocdata" file
 - Add cleanup-deleted-users background job
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_jobs' doesn't exist
 - AppAPI Daemons configuration GPU params update
     - Daemons configuration GPU params updated: 0
 - Upgrading Circles App
 - Fix component of birthday calendars
     - 4 birthday calendars updated.
 - Regenerating birthday calendars to use new icons and fix old birthday events without year
     - Repair step already executed
 - Fix broken values of calendar objects
    0 [->--------------------------]
 - Registering building of calendar search index as background job
     - Repair step already executed
 - Register building of social profile search index as background job
     - Repair step already executed
 - Registering background jobs to update cache for webcal calendars
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Registering building of calendar reminder index as background job
     - Repair step already executed
 - Clean up orphan event and contact data
     - 0 events without a calendar have been cleaned up
     - 11 properties without an events have been cleaned up
     - 0 changes without a calendar have been cleaned up
     - 0 cached events without a calendar subscription have been cleaned up
     - 0 changes without a calendar subscription have been cleaned up
     - 0 contacts without an addressbook have been cleaned up
     - 0 properties without a contact have been cleaned up
     - 0 changes without an addressbook have been cleaned up
 - Remove activity entries of private events
     - Removed 0 activity entries
 - Clean up old calendar subscriptions from deleted users that were not cleaned-up
 0/4 [>---------------------------]   0%     - ERROR: An exception occurred while executing a query: SQLSTATE
[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_users' doesn't exist
 - Remove invalid object properties
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_properties' doesn't exist
 - duplicatefinder: Repair FileInfo objects
     - Recalculating Path Hashes
    0 [------->--------------------]
     - Clearing duplicated records
212317/212317 [============================] 100%
 - Fix the share type of guest shares when migrating from ownCloud
 - Copy the share password into the dedicated column
 - Set existing shares as accepted                                                                            - Delete old binaries
Scanning AppData for files
                                                                                                             
In ExceptionConverter.php line 49:
An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table
'nextcloud.oc_storages' doesn't exist

In Exception.php line 24:
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_storages' doesn't exist            

In Statement.php line 130:                                                                                   
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_storages' doesn't exist

files:scan-app-data [--output [OUTPUT]] [--] [<folder>]
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_storages' doesn't exist
 - Resynchronize database sequences
 - Restore default tags that are missing
     - Looking up default tags
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_mail_accounts' doesn't exist
 - Add a generated message-id to all Mail messages that have none
     - Looking up messages without a message-id
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_mail_messages' doesn't exist
 - Purify and migrate collected mail addresses
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_mail_coll_addresses' doesn't exist
 - Insert background jobs for all accounts
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_mail_accounts' doesn't exist
 - Make Mail itinerary extractor executable
 - Create or update provisioned Mail accounts
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_mail_provisionings' doesn't exist
 - Repair Broken Threads for all mail accounts
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_mail_messages' doesn't exist
 - Queue a job to delete duplicated cached messages
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Register Maps MIME types
     - Registering the mimetype...
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_mimetypes' doesn't exist
 - Repair steps for Memories
     - External table schema seem up to date
     - Recreated filecache trigger with: Doctrine\DBAL\Platforms\MariaDb1010Platform
     - exiftool binary is configured: /var/www/nextcloud/apps/memories/bin-ext/exiftool-amd64-glibc
     - go-vod binary is configured: /var/www/nextcloud/apps/memories/bin-ext/go-vod-amd64
     - ffmpeg binary is configured: /usr/bin/ffmpeg
 - Clean up meta table
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_notes_meta' doesn't exist
 - Show a hint about the new editor to existing users
 - Set binary permissions
 - Update OAuth token expiration times
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_oauth2_access_tokens' doesn't exist
 - init metadata
 - Install recognize dependencies
     - WARNING: Failed to automatically install dependencies for recognize. Check the recognize admin panel f
or potential problems.
 - Switches from default updater server to the customer one if a valid subscription is available
     - Repair step already executed
 - Send an admin notification if monthly report is disabled
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1
146 Table 'nextcloud.oc_jobs' doesn't exist
 - Force-reset all Text document sessions
 - Initialize migration of background images from dashboard to theming app
     - ERROR: include(/var/www/nextcloud/apps/theming/composer/composer/../../lib/Jobs/MigrateBackgroundImages.php): Failed to open stream: No such file or directory
 - Add background job to check for backup codes
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_jobs' doesn't exist
 - Insert UUIDFix background job for user and group in batches
 - Remove deprecated refresh time markers for LDAP user records
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appconfig' doesn't exist
 - Populating added database structures for workflows
     - ERROR: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_flow_operations' doesn't exist

In Config.php line 262:

  touch(): Unable to create file /var/www/nextcloud/config/config.php because No such file or directory


maintenance:repair [--include-expensive]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions