Issue
- How can I migrate my FileSystemStore or AdvancedFileSystemStore to DBStore?
Environment
- DXP 7.0
- DXP 7.1
Resolution
-
Stop the DXP server and make sure to do a backup of your database and document library root folder, just in case something goes wrong and you need to roll back.
-
Start up the DXP server, and then go to Control Panel → Server Administration → Data Migration. (as described in the article mentioned above, Method 2)
-
Select DBStore as the target store type. You will also see an option whether to keep the files in from the previous store or not. That's up to you, but if you made the backup from step 1, it should be safe to choose to delete.
-
Click Execute.
-
Watch the logs to know when the process is complete, and make special note of any exceptions. The platform will be unavailable until it is restarted with the changes applied to
portal.properties
.
Basically here the migration itself will happen, by populating the dlcontent table in the database.
-
Verify the data was written to the appropriate document library store location: in this case, verify that the dlcontent table has been populated.
-
When the migration is done, you will get a message to restart the DXP server and set the dl.store.impl property to the new store type, inportal-ext.
-
So, stop the server, set
dl.store.impl=com.liferay.portal.store.db.DBStore
in your server's portal-ext file, then start the server up again. Now, the server should know that it is in DBStore mode, and it will look for the document files not in the file system, but in the dlcontent database table.
Additional Information
- Based on the following KB article, specifically written for migrating to DBStore
https://help.liferay.com/hc/en-us/articles/360017649452-Migrating-File-System-Stores-