[Deprecated starting XWiki 9.10] Port attachments from the database to the filesystem store

Last modified by Gabriela Anechitoaei on 2022/05/03 09:29

Home Other Tests Home Run Test

Steps to reproduce

NOTE: Starting with version 9.10, this attachments porting operation is deprecated as XWiki supports mixed storage (database and file system) for attachments which means if switched from 'hibernate' to 'file' store, the existing attachments will keep working.

  1. Enable Filesystem Attachment Store
  2. Download the XAR for the Filesystem Attachment Porter
  3. Upload it (Administer Wiki > Content > Import > Browse)
  4. Under "Available packages" click on the newly added FilesystelAttachmentPorterScript
  5. Click on Import
  6. Under "List of installed pages" click on FilesystemAttachmentPorter.WebHome
  7. Make sure the 3 bullet points from "Step 1" are colored in green, otherwise this means the 'xwiki.cfg' was not configured properly; see step 1 & 2 of Enable Filesystem Attachment Store
  8. Copy the code from this page (Edit > Wiki)
  9. Create a new page (P1)
  10. Paste the code from the Filesystem Attachment Porter (Edit > Wiki)
  11. Tick the "Dry Run" option
  12. Click Start (wait for the run to finish)
  13. Click on the P1 page again
  14. Untick the "Dry Run" option
  15. Click Start

Expected results

  1. A message similar to "[87] attachments" is displayed inside the "Step 3" section (at the bottom of the attachments list) when Dry-Run the script.
  2. Inside data\storage\xwiki\ are folders including attachments for each page that has attachments when run the script with the "Dry Run" option unticked. Note - if Tomcat is used, then the folders can be found in TOMCAT_HOME\work\Catalina\localhost\xwiki\storage\xwiki.


per page of Page
Jira Issue
The environment prevents the table from loading data.

Get Connected