@@ -197,6 +197,39 @@ Manage the background scanner
197197The background scanner does not require any manual intervention.
198198However at times you might want to inspect it or perform tasks on it.
199199
200+ How the background scanner works
201+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202+
203+ Each time the background scanner runs, it processes files in three passes (in priority order),
204+ up to the configured batch size per run:
205+
206+ 1. **Unscanned files ** — files that have never been scanned, including files that were
207+ uploaded or existed before the Antivirus app was installed. All such files will
208+ eventually be scanned as the background job runs repeatedly.
209+
210+ 2. **Modified files ** — files whose modification time is newer than their last scan time,
211+ i.e. files that have been updated since they were last scanned.
212+
213+ 3. **Outdated files ** — files that were last scanned more than 28 days ago (configurable
214+ via ``av_rescan_days ``), to account for updated virus definitions.
215+
216+ The scanner runs at most once every 15 minutes by default. The effective
217+ frequency is also bounded by how often Nextcloud's background job mechanism
218+ (cron, webcron, or ajax) runs.
219+
220+ To change the minimum interval between runs (in seconds)::
221+
222+ sudo -E -u www-data php occ config:app:set files_antivirus av_scan_interval --value="900"
223+
224+ To change the number of days before already-scanned files are rescanned::
225+
226+ sudo -E -u www-data php occ config:app:set files_antivirus av_rescan_days --value="28"
227+
228+ **External storage: ** files on external storage are included in passes 1 and 2
229+ (initial scan and rescan on modification). However, the periodic 28-day rescan
230+ (pass 3) applies only to files under ``files/ `` (i.e. home storage), not external storage.
231+
232+
200233Get info about files in the scan queue
201234~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202235
0 commit comments