Open lherbolt opened 1 year ago
Interesting find, @lherbolt! That does appear sub-optimal (at least based on a cursory look on my part).
There is already a function RecursiveDirectoryIteratorWithoutData()
:
https://github.com/caco3/updater/blob/27447ce4580e590134918a32ab9c3420dce8f42e/index.php#L44
Maybe it would be enough to just use that function?
I guess btw, the same is happening when deleting the data after update:
Related: #397 (same solution will likely be used for both)
⚠️ This issue respects the following points: ⚠️
Bug description
The updater.phar recurse into data directory which is later excluded. This is prolonging the creation of the backup while running update.
I believe there it comes from this:
Above creates iterator over all files in nextcloud folder, it;s called from the backup fucntion public function createBackup() bellow. Once the iterator is constructed the data .well-knonw and .rnd are excluded. It the data folder has significant amount files (in ma case is preview of images) it takes significant amount of time to create the iterator of files which are excluded later on
excludedElements:
I guess usage of something like would be better:
I am not php coder so it's taken from:
Steps to reproduce
Expected behavior
the data folder and others are excluded before creating the iterator
Installation method
Community Manual installation with Archive
Nextcloud Server version
25
Operating system
Other
PHP engine version
PHP 8.0
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response