You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exlude particular directories from beeing viewed, accessed and scanned #15385
I came across this when I did some debugging on SMB, but this is not limited to.
My external storage is capable of snapshots. These snapshots are present in each directory and have as entrypoint a particular directory name. I can enable the view on this directory from the storage point of view, then when you browse with your desktop and enter the snapshot directory name, you can walk into. If I disable this view, I can enter the snapshot directory name, but it behaves like a non existing folder.
As this is a good thing to recover files without tape access, enabeling the view has its benefits.
The bad thing with the current behaviour of owncloud is, if you have a TB volume shared, snapshot directory access enabled and let´s say 10 snapshots you rotate, you scan 11TB (1 + 10)...
And each rescan does then the same
And each mount point does the same.
The idea is now, that there is a possibility in owncloud to exlude the view, access and scan of these directories. Maybe a config.php parameter array with names to exclude.
In my case, the folder names to exclude would be ~snapshot and .snapshot
(The first character is access protocol dependent, ~ = SMB, . = NFS)
Please consider, that these kind of storages are more likely to be found in enterprise environments, but then snapshots are liked and heavily used ...
Yes, being able to exclude folders from being scanned also fits my usecase, where incremental backups using hardlinks would result in terabytes of storage to be scanned. Also see #7234
/**
* check if the directory should be ignored when scanning
* NOTE: the special directories . and .. would cause never ending recursion
* @param String $dir
* @return boolean
*/
static public function isIgnoredDir($dir) {
if ($dir === '.' || $dir === '..') {
return true;
}
return false;
}
This would do what we expect, at least from the scanning point of view, maybe also from viewing. Just needs to be expanded to a config.php parameter maybe blacklisted_directories
Activity
Aesculapius commentedon Apr 7, 2015
Yes, being able to exclude folders from being scanned also fits my usecase, where incremental backups using hardlinks would result in terabytes of storage to be scanned. Also see #7234
DeepDiver1975 commentedon Apr 8, 2015
Please have a look at config.sample.php - there is a option to blacklist files/folders.
Please give it a try if this works out for you.
mmattel commentedon Apr 8, 2015
Good hint.
The config.php parameter:
blacklisted_filesis for files only, but not for directorieshttps://github.com/owncloud/core/blob/master/config/config.sample.php
core/lib/private/files/filesystem.php
Line 569 in 4082436
But there is another function just below:
core/lib/private/files/filesystem.php
Line 583 in 4082436
This would do what we expect, at least from the scanning point of view, maybe also from viewing. Just needs to be expanded to a config.php parameter maybe
blacklisted_directoriesPVince81 commentedon Sep 23, 2016
@mmattel since your PR was merged I guess this can be closed ? Or is something missing ?
mmattel commentedon Sep 25, 2016
Closing because of merging #19235
lock commentedon Aug 3, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.