Bulk Filesystem Import Tool treats versions as new files

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

Bulk Filesystem Import Tool treats versions as new files

Jump to solution

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? 

1 Solution

Accepted Solutions
Highlighted
Active Member II

Re: Bulk Filesystem Import Tool treats versions as new files

Jump 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.

View solution in original post

1 Reply
Highlighted
Active Member II

Re: Bulk Filesystem Import Tool treats versions as new files

Jump 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.

View solution in original post