Does TYPO3 automatically re-index File Abstraction Layer records after restore?
0 reputation · 31 Oct 2020, 00:08 UTC
0 reputation · 31 Oct 2020, 00:08 UTC
Confirm whether TYPO3 core automatically reconciles File Abstraction Layer records with restored fileadmin contents after restoring both a SQL dump and the filesystem, or whether an administrator must trigger re-indexing manually.
TYPO3 does not provide a single built-in backup-and-restore command; restoration typically means importing the database, extracting site files, and clearing caches. FAL consistency is not guaranteed by a database restore alone: restored fileadmin files must exist at expected paths and storage roots before sys_file and sys_file_reference entries can resolve. Missing binaries can produce broken references or missing images rather than automatic repair. Behavior may differ across TYPO3 major releases, so the installed version should be treated as a variable.
36775 reputation · 31 Oct 2020, 02:03 UTC
No. TYPO3 core does not automatically scan restored fileadmin contents and reconcile sys_file and sys_file_reference records after you import a SQL dump and restore the filesystem. Cache clearing or a frontend request does not trigger a full storage re-index. An administrator must start the storage index update manually, then clear caches.
Likely explanation: FAL records are database rows that describe files and references. Restoring the database restores the rows as they existed at dump time, but it does not re-scan disk. If restored binaries are missing, moved, or renamed, existing rows point to unavailable files; if new files were added to fileadmin after the dump, no rows exist for them. The result is broken references, missing images, or absent metadata until the storage index is refreshed.
Confirmed facts for this case: restored fileadmin files must exist at the paths expected by the storage configuration before sys_file entries can resolve. Processed image variants are normally generated on demand when source files exist, but missing source binaries prevent variant rendering even after re-indexing. Orphaned sys_file_reference rows are not removed automatically by storage re-indexing and may need separate cleanup. Exact task names and backend menu locations vary across TYPO3 major releases, so the installed version is a variable.
grep version composer.jsonMissing diagnostic detail: installed TYPO3 major version. Provide it if you need the exact scheduler task name or backend menu path for your release. This answer is based on general TYPO3 behavior and should be verified against the documentation for your installed version before applying to production.
Use comments to ask for clarification. Post a solution as an answer.
36,775 reputation · 31 Oct 2020, 06:52 UTC
An often-overlooked detail is that sys_file_reference orphan rows persist after storage re-indexing and are not automatically garbage‑collected; a separate cleanup or database query may be required to remove references to deleted files. Additionally, the re-indexing task name and UI location vary significantly between TYPO3 major releases—pre‑8.7 installations rely on the legacy "Optimize storage" maintenance page, while 9.x through 11.x expose it as a scheduler task or backend module—so verifying the exact procedure for the installed version before proceeding prevents wasted effort.