How-to use VLT tools’ “vlt export” command to same destination folder on aem


While working on “vlt” command ( File Vault – Jackrabbit FileVault comes prepackaged in AEM VLT Tool )

vlt --credentials admin:admin export -v http://localhost:4502/crx /content/dam/geometrixx-outdoors/activities /Users/temp/data

The above command works fine and exports the Assets in “geometrixx-outdoors/activities” to jcr_root and META-INF folders. If these folders are missing, the command would even create them.

But if run the same command using a different source (geometrixx/portraits) and same destination(/Users/temp/data) like:

vlt --credentials admin:admin export -v http://localhost:4502/crx /content/dam/geometrixx/portraits /Users/temp/data

The command errors with the message [ERROR] Not such remote file: /content/dam/geometrixx/portraits

But if i use a different destination folder (/Users/temp/data/new), the same command works:

vlt --credentials admin:admin export -v http://localhost:4502/crx /content/dam/geometrixx/portraits /Users/temp/data/new

Below is a shell script to use VLT Tools’ export command to the same destination folder.

Every time vlt export command executes, jcr_root and META-INF folders are created. META-INF holds the config files and jcr_root maps to the jcr’s source path. The exported files reside here.

If we use the same destination folder for all your exports, because of the path written in filter.xml, consecutive exports won’t work. To overcome this, i’m doing the following:

  • Make a copy of the filter.xml (i’m calling it as master filter) with /content as path. Since all content in jcr generally comes under this, so any export at any source path will work.
  • Since we are planning to use the same destination folder for all our exports, delete the existing filter.xml file and replace it with the above master filter.xml

Copy of the shell script and filter.xml