Nextcloud version (eg, 20.0.5): 25.0.4
Operating system and version (eg, Ubuntu 20.04): Docker image
Apache or nginx version (eg, Apache 2.4.25): from Docker image
PHP version (eg, 7.4): from Docker image
The issue you are facing:
We heavily use Group Folders.
- I migrated a larger Nextcloud instance from a server to a Docker environment.
- I copied the database and rsynced the files
- I tested it, all appeared to be good.
- I copied the database again and rsysnced the files again.
I missed to set the option to delete files on the target that were deleted on the source system.
Now we have some duplicated and re-appearing files.
But the really bad thing is we have many broken shares.
When I add the same share again, I see that the item_source
and file_source
values in oc_shares
are different.
When patching the new values into the old share, then the share works again.
An example:
oc_share:
id, item_source,file_source,file_target
1070,479574,479574,/Landesgeschäftsstelle
1071,479574,479574,/Landesgeschäftsstelle
1073,479574,479574,/Landesgeschäftsstelle
1687,479574,479574,/Landesgeschäftsstelle
1802,479574,479574,/Landesgeschäftsstelle
2384,479574,479574,/Landesgeschäftsstelle
I see duplicate entries in oc_filecache
:
oc_filecache
fileid,path, parent,name, size, mtime, storage_mtime
479574,__groupfolders/6/Landesgeschäftsstelle,461976,Landesgeschäftsstelle,29486833,1678215601,1678211116
764851,__groupfolders/6/Landesgeschäftsstelle,764554,Landesgeschäftsstelle,29486833,1678211116,1678211116
I believe the file store was re-indexed, and these are the old and new IDs.
When I change the old for the new value for item_source
and file_source
in oc_share
, then the link works again.
Is there way how I can fix this systematically?
Is this the first time you’ve seen this error? (Y):
The output of your Nextcloud log in Admin > Logging:
[no app in context] Warnung: OCP\Files\StorageNotAvailableException: File by id 479574 not found at <<closure>>
0. /var/www/html/lib/private/Files/Storage/Wrapper/Jail.php line 344
OC\Files\Storage\FailedStorage->free_space("")
1. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 334
OC\Files\Storage\Wrapper\Jail->free_space("")
2. /var/www/html/lib/private/legacy/OC_Helper.php line 521
OC\Files\Storage\Wrapper\Wrapper->free_space("")
3. /var/www/html/apps/files/lib/Helper.php line 50
OC_Helper::getStorageInfo("/Landesgeschäftsstelle")
4. /var/www/html/apps/files/lib/Controller/AjaxController.php line 46
OCA\Files\Helper::buildFileStorageStatistics("/Landesgeschäftsstelle")
5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 225
OCA\Files\Controller\AjaxController->getStorageStats("/Landesgeschäftsstelle")
6. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 133
OC\AppFramework\Http\Dispatcher->executeController(["OCA\\Files\\Co ... "], "getStorageStats")
7. /var/www/html/lib/private/AppFramework/App.php line 172
OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Files\\Co ... "], "getStorageStats")
8. /var/www/html/lib/private/Route/Router.php line 298
OC\AppFramework\App::main("OCA\\Files\\Controller\\AjaxController", "getStorageStats", ["OC\\AppFramewo ... "], ["files.ajax.getStorageStats"])
9. /var/www/html/lib/base.php line 1047
OC\Route\Router->match("/apps/files/ajax/getstoragestats")
10. /var/www/html/index.php line 36
OC::handleRequest()
GET /apps/files/ajax/getstoragestats?dir=%2FLandesgesch%C3%A4ftsstelle
from 95.222.193.189 by XXXXXXXXXXXXX at 2023-03-15T21:41:22+00:00
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'nextcloud-redis',
'password' => 'So0iHiXaiHoofeeL',
'port' => 6379,
),
'overwritehost' => 'XXXXXX',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://XXXXXX',
'trusted_proxies' =>
array (
0 => '172.21.0.2/16',
),
'instanceid' => 'XXXXXX',
'passwordsalt' => 'XXXXXX+XXXXXX',
'secret' => 'XXXXXX+XXXXXX',
'trusted_domains' =>
array (
0 => 'XXXXXX',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '25.0.4.1',
'dbname' => 'nextcloud',
'dbhost' => 'nextcloud-db',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'XXXXXX',
'installed' => true,
'default_language' => 'de',
'default_phone_region' => 'de',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_smtphost' => 'XXXXXX',
'mail_from_address' => 'cloud',
'mail_domain' => 'XXXXXX',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtpport' => '587',
'mail_smtpname' => 'XXXXXX',
'mail_smtppassword' => 'XXXXXX',
'mail_smtpsecure' => 'tls',
'simpleSignUpLink.shown' => false,
'trashbin_retention_obligation' => 'auto, 10',
'maintenance' => false,
Thanks for helping!