I have exported a site with the Alfresco bulk export extension and enabled Export Versions.
In the export directory I can see that there is a file like document.pdf for example with the metadata file document.pdf.metadata.properties.xml.
For a file with versions there are additional files like document.pdf.v1.0 and the corresponding document.pdf.metadata.properties.xml.v1.0 so I assumed that the export went fine including the versions.
When I Import this folder into Alfresco v6.1.2 via the Bulk Filesystem Import Tool the import finishes without errors or warnings. However, all versioned files are imported as normal files. This is also true for the metadata.propierties.xml<version> files, so I ended up with two files per version in addition to the initial file.
I would expect that the versioned files would be attached to the initial file (document.pdf in this example) as a version.
Is there an option to control this behaviour that I missed?
Solved! Go to Solution.
After quite some investigation I figured out that the import tool expects the versioned files to be prefixed with `.#` instead of `.#.0` (see https://docs.alfresco.com/5.2/concepts/bulk-import-prepare-filesystem.html).
I have no clue why the `Alfresco Bulk Filesystem Export Tool` generates files with a suffix that is incompatible with the import tool. I can't find any config option to manipulate this behaviour.
However, it is quite easy to fix the import directory with a bash one-liner:
find <exportfolder> -name "*.0" | while read f; do mv $f ${f%.0}; done
This basically renames every file with a `.0` suffix so that it is removed.
After this the versioned files were resolved and imported correctly.
After quite some investigation I figured out that the import tool expects the versioned files to be prefixed with `.#` instead of `.#.0` (see https://docs.alfresco.com/5.2/concepts/bulk-import-prepare-filesystem.html).
I have no clue why the `Alfresco Bulk Filesystem Export Tool` generates files with a suffix that is incompatible with the import tool. I can't find any config option to manipulate this behaviour.
However, it is quite easy to fix the import directory with a bash one-liner:
find <exportfolder> -name "*.0" | while read f; do mv $f ${f%.0}; done
This basically renames every file with a `.0` suffix so that it is removed.
After this the versioned files were resolved and imported correctly.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.