Media Library storage synchronization limits during large-scale migrations
0 reputation · 29 May 2021, 12:44 UTC
Asset Consistency in Sulu Media Library
Sulu leverages the Symfony filesystem component to manage physical storage and database entries for the Media Library. While the system supports hierarchical folder organization and automatic thumbnail generation, maintaining synchronization between the database and the physical filesystem becomes complex during large-scale migrations of existing assets.
When importing massive volumes of external media, the requirement to align database records with physical file paths must be balanced against the risk of orphaned files or broken references if the migration process is interrupted or partially fails.
- Physical storage must match the expected directory structure for the media picker to resolve paths.
- Thumbnail generation occurs as a secondary process that depends on the initial file persistence.
What is the documented behavior for verifying the integrity of the filesystem against database entries after a bulk import? Are there built-in mechanisms to detect and prune orphaned files that lack corresponding database records?