.. _command-reference: ================= Command reference ================= The cleanup commands are meant for scheduled or unattended runs (cron, TYPO3 Scheduler) once you trust the tool for a given site. .. _command-cleanup-scan: filefix:cleanup:scan ==================== Scans file storages for cleanup candidates and queues them in :sql:`tx_filefix_quarantine`. .. list-table:: :header-rows: 1 :widths: 30 50 20 * - Option - Description - Default * - ``--storage`` - Storage UID to scan - ``1`` * - ``--folder`` - Restrict to a FAL folder identifier (for example ``/images/``) - (all) * - ``--older-than`` - Duration string: ``90d``, ``2w``, ``24h`` - ``90d`` * - ``--limit`` - Maximum candidates per scan type - ``5000`` * - ``--include-unused`` - Scan for unreferenced FAL files - off * - ``--include-missing`` - Scan for FAL records whose file is gone - off * - ``--include-physical-orphans`` - Scan for un-indexed physical files - off .. code-block:: bash vendor/bin/typo3 filefix:cleanup:scan --folder=/2021/ --older-than=180d --include-unused .. _command-cleanup-flush: filefix:cleanup:flush ===================== Processes what is already in the queue. .. list-table:: :header-rows: 1 :widths: 30 50 20 * - Option - Description - Default * - ``--storage`` - Storage UID - ``1`` * - ``--status`` - Status to process: ``candidate`` or ``quarantined`` - ``candidate`` * - ``--older-than`` - Only records queued longer than this (for example ``14d``) - (none) * - ``--limit`` - Maximum records per run - ``1000`` * - ``--move-to-quarantine`` - ``candidate`` → ``quarantined`` - – * - ``--delete`` - ``quarantined`` → ``flushed`` (permanent) - – * - ``--scan-id`` - Restrict to one scan's results - (none) * - ``--force`` - Allow ``candidate`` → ``flushed`` directly, skipping quarantine - off * - ``--dry-run`` - Simulate, no changes made - off .. code-block:: bash # Safe pipeline for a cron job vendor/bin/typo3 filefix:cleanup:flush --status=candidate --move-to-quarantine vendor/bin/typo3 filefix:cleanup:flush --status=quarantined --delete --older-than=14d .. note:: ``--delete`` on ``candidate`` status is blocked unless you pass ``--force``. The lifecycle is meant to go through quarantine first. .. _command-stats-update: filefix:stats:update ==================== Rebuilds the unused-file statistics for the :ref:`dashboard widgets `. Schedulable: add it as a Scheduler task (for example nightly) on large installations so no dashboard load has to rebuild the snapshot. .. list-table:: :header-rows: 1 :widths: 30 50 20 * - Option - Description - Default * - ``--storage`` - Storage UID - default storage .. code-block:: bash vendor/bin/typo3 filefix:stats:update