Files amount after moving of data directory is wrong (much bigger)

I have successfully did what you wrote about, with only difference: my MariaDB do not want to execute your command and give me a syntax error, so I login into DB and run it from then nextcloud table:

DELETE FROM nextcloud.oc_storages WHERE numeric_id = '1';
DELETE FROM nextcloud.oc_storages WHERE numeric_id = '10';
DELETE FROM nextcloud.oc_storages WHERE numeric_id = '15';

Then I check with command mysql -e 'select * from nextcloud.oc_storages' that wrong storage’s are gone and perform cleanup by command sudo -u www-data php occ maintenance:repair.

The output of repair

sudo -u www-data php occ maintenance:repair

  • Repair MySQL collation
    • All tables already have the correct collation -> nothing to do
  • Repair mime types
  • Clean tags and favorites
    • 0 tags of deleted users have been removed.
    • 0 tags for delete files have been removed.
    • 0 tag entries for deleted tags have been removed.
    • 0 tags with no entries have been removed.
  • Repair invalid shares
  • Remove shares of a users root folder
  • Move .step file of updater to backup location
  • Fix potential broken mount points
    • No mounts updated
  • Repair invalid paths in file cache
  • Add log rotate job
  • Clear frontend caches
    • Image cache cleared
    • SCSS cache cleared
    • JS cache cleared
  • Clear every generated avatar on major updates
  • Add preview background cleanup job
  • Queue a one-time job to cleanup old backups of the updater
  • Repair pending cron jobs
    • No need to repair pending cron jobs.
  • Extract the vcard uid and store it in the db
  • Remove potentially over exposing share links
    • No need to remove link shares.
  • Fix component of birthday calendars
    • 2 birthday calendars updated.
  • Fix broken values of calendar objects
    0 [>---------------------------]
  • Registering building of calendar search index as background job
    • Repair step already executed
  • Registering background jobs to update cache for webcal calendars
    • Added 0 background jobs to update webcal calendars
  • Clean up orphan event and contact data
    • 0 events without a calendar have been cleaned up
    • 0 properties without an events have been cleaned up
    • 0 changes without a calendar 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
  • Delete orphaned ACL rules
  • Fix the share type of guest shares when migrating from ownCloud
  • Copy the share password into the dedicated column
  • Purify and migrate collected mail addresses
    0 [>---------------------------]
    1 [============================]
  • Update OAuth token expiration times
  • Add background job to check for backup codes

It is still reported about 1M of files and 24 Storages (what is less then before). I will run files:scan --all and files:cleanup to rescan the system and cleanup the cache, but this will take a while.

P.S. Seems it works somehow, during the rescan I can see that files count goes slowly down:

1 Like