Legacy Knowledge Base
Published Jul. 2, 2025

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

Written By

Brett Ripley

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

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.

Resolution

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

Did this article resolve your issue ?

Legacy Knowledge Base