Create a Plan for Maintaining Database-File System Consistency for Staging

Remember that Liferay’s database and file system are generally separate data sources that need to be in sync as Liferay references the file system. When backing up, make sure that these sources are backed up in a way that ensures that the two sources remain in sync. 

How can I ensure the database is synced with the file system?

This article outlines a practical suggestion for keeping the Liferay database in sync with the file system (or other non-transactional systems) in the case of a staging failure. Following this suggestion will help prevent data integrity issues and also prevent future staging publication issues.


In the case of a staging publication failure, since the process is transactional, the created entries in the database will be rolled back. However, unless your file system is also being stored in the database, you may need to roll that back as well.

Here, a potential issue arises in that a discrepancy between the database (which contains references to files) and the file system or other non-transactional systems (which houses those files) will cause errors in the future.

Because of this, administrators should take great care if they decide to stage the document library, making sure that regular backups of both their database and their file system are being maintained. Administrators should also ensure that it is clear which file system backups will correspond with particular database backups.

Additional Information

Was this article helpful?
0 out of 0 found this helpful