Note

If you are using the VLT tool in a CRX-only instance, the default URL for CRX is localhost:7402. Use that instead of the CQ default URL.

The FileVault tool (VLT) is a tool developed by Day that maps the content of a CRX/CQ instance to your file system. The VLT tool has similar functions as source control system client (such as a Subversion (SVN) client), providing normal check-in, check-out and management operations, as well as configuration options for flexible representation of the project content.

You run the VLT tool from the command line. This document describes how to use the tool, including how to get started and get help, as well as a list of all commands and available options.

Getting Started with VLT

To start using VLT, you need to do the following:

  1. Install VLT, update environment variables, and update global ignored subversion files.
  2. Set up the CRX/CQ repository (if you have not already done so).
  3. Check out the CRX/CQ repository.
  4. Synchronize with the repository.
  5. Test whether the synchronization worked.

Installing the vlt tool

To use the VLT tool, you first need to install it. It is not installed by default and is an additional tool available in the /opt folder. In addition, you need to set your system's environment variable.

After you have installed it you need to update global ignored subversion files. Edit your svn settings and add the following:

[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
global-ignores = .vlt

Setting up the CRX/CQ repository

If necessary, install CRX or install CQ and start the instance.

Checking out the repository

Check out the repository using the source control system. In svn, for example, type the following (substituting the URI and path with your repository):

svn co http://svn.server.com/repos/myproject

Synchronizing with the repository

You need to synchronize filevault with the repository. To do this:

  1. In the command line, navigate to content/jcr_root.

  2. Check out the repository by typing the following (substituting your port number for 4502 and your admin passwords):

    vlt --credentials admin:admin co --force http://localhost:4502/crx

    Note

    The credentials have to be specified only once upon your initial checkout. They will then be stored in your home directory inside .vault/auth.xml.

Testing whether the synchronization worked

After you have checked out the repository and synchronized it, you should test to make sure everything functions properly. An easy way to do this is to edit a .jsp file and see whether your changes are reflected after committing the changes.

To test the synchronization:

  1. Navigate to .../jcr_content/libs/foundation/components/text.
  2. Edit something in text.jsp.
  3. See the modified files by typing vlt st
  4. See the changes by typing vlt diff text.jsp
  5. Commit the changes: vlt ci test.jsp.
  6. Reload a page containing a text component and see whether your changes are there.

Getting Help with the VLT Tool

After installing the VLT tool, you can access its Help file from the command line:

vlt --help

The VLT tool help file opens with a complete list of commands available. The following is an excerpt from the help file:

file

For help on a particular command, type the help command followed by the name of the command. For example:

vlt --help export

The Terminal window displays information about that particular command:

file

Common Tasks Performed in VLT

The following are some common tasks performed in VLT. For detailed information on each command see the individual commands.

Checking out a subtree

If you only want to check out a subtree of the repository for example, /apps/geometrixx, you can do so by typing the following:

vlt co http://localhost:4502/crx/-/jcr:root/apps/geometrixx geo

Doing this creates a new export root geo with a META-INF and jcr_root directory and puts all files below /apps/geometrixx in geo/jcr_root.

Performing a filtered checkout

If you have an existing workspace filter and you want to use it for checkout, you can either first create the META-INF/vault directory and place the filter there, or specify it on the command line as follows:

$ vlt co --filter filter.xml http://localhost:4502/crx/-/jcr:root geo

An example filter:

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/etc/designs/geometrixx" />
<filter root="/apps/geometrixx"/>
</workspaceFilter>

Using import/export instead of .vlt control

You can import and export content between a JCR repository and the local file system without using control files.

To import and export content without using .vlt control:

  1. Initially set up the repository:

    $ cd /projects
    $ svn mkdir http://svn.server.com/repos/myproject
    $ svn co http://svn.server.com/repos/myproject
    $ vlt export -v http://localhost:4502/crx /apps/geometrixx geometrixx
    $ cd geometrixx/
    $ svn add META-INF/ jcr_root/
    $ svn ci
  2. Change the remote copy and update JCR:

    $ cd /projects/geometrixx
    $ vlt -v import http://localhost:4502/crx . /
  3. Change the remote copy and update the file server:

    $ cd /projects/geometrixx
    $ vlt export -v http://localhost:4502/crx /apps/geometrixx .
    $ svn st
    M META-INF/vault/properties.xml
    M jcr_root/apps/geometrixx/components/contentpage/.content.xml
    $ svn ci

Using VLT

To issue commands in VLT, type the following at the command line:

vlt [options] <command> [arg1 [arg2 [arg3] ..]]  

Options and commands are described in detail in the following sections.

VLT Global Options

The following is a list of VLT options, which are available for all commands. See the individual commands for information on additional available options.

Option
Description
-Xjcrlog <arg> Extended JcrLog options
-Xdavex <arg> Extended JCR remoting options
--credentials <arg> The default credentials to use
--config <arg> The JcrFs config to use
-v (--verbose) verbose output
-q (--quiet) print as little as possible
--version Prints the version information and exits VLT
--log-level <level> Indicates the log level, for example, the log4j log level.
-h (--help) <command> Prints help for that particular command

VLT Commands

The following table describes all available VLT commands. See the individual commands for detailed information on syntax, available options, and examples.

Command Abbreviated Command Description
export 
  Exports from a JCR repository (vault file system) to the local file system without control files.
import   Imports a local file system to a JCR repository (vault file system).
checkout
co Checks out a Vault file system. Use this for an initial JCR repository to the local file system. (Note: You must first check out the repository in subversion.)
analyze 
  Analyzes packages.
status st Prints the status of working copy files and directories.
update up Imports changes from the repository into the working copy.
info   Displays information about a local file.
commit ci Sends changes from your working copy to the repository.
revert rev Restores the working copy file to its original state and undoes most local edits.
resolved res Removes conflicted state on working copy files or directories.
propget pg Prints the value of a property on files or directories.
proplist pl Prints the properties on files or directories. 
propset ps Sets the value of a property on files or directories.
add   Puts files and directories under version control.
delete del or rm Removes files and directories from version control.
diff di Displays the differences between two paths.
console   Runs an interactive console
rcp   Copies a node tree from one remote repository to another.

Export

Exports the Vault filesystem mounted at <uri> to the local filesystem at <local-path>. An optional <jcr-path> can be specified in order to export just a sub-tree.  

Syntax

export -v|-t <arg>|-p <uri> <jcr-path> <local-path>

Options

-v (--verbose) verbose output
-t (--type) <arg> specifies the export type, either platform or jar.
-p (--prune-missing) specifies if missing local files should be deleted
<uri> mountpoint uri
<jcrPath> JCR path
<localPath> local path

Examples

vlt export http://localhost:4502/crx /apps/geometrixx myproject

Import

Imports the local file system (starting at <local-path> to the vault file system at <uri>. You can specify a <jcr-path>as import root. If --sync is specified, the imported files are automatically put under vault control. 

Syntax

import -v|-s <uri> <local-path> <jcr-path>

Options

-v (--verbose) verbose output
-s (-- sync)
puts the local files under vault control
<uri> mountpoint uri
<jcrPath> JCR path
<localPath> local path

Examples

vlt import http://localhost:4502/crx . /

Checkout (co)

Performs an initial check out from a JCR repository to the local filesystem starting at <uri> to the local filesystem at <local-path>. You can also add a <jcrPath> argument to check out a sub-directory of the remote tree. Workspace filters can be specified that are copied into the META-INF directory.

Syntax

checkout --force|-v|-q|-f <file> <uri> <jcrPath> <localPath>  

Options

--force forces checkout to overwrite local files if they already exist
-v (--verbose) verbose output
-q (--quiet) prints as little as possible
-f (--filter) <file> specifies auto filters if none are defined
<uri> mountpoint uri
<jcrPath> (optional) remote path
<localPath> (optional) local path

Examples

Using JCR Remoting:

vlt --credentials admin:admin co http://localhost:8080/crx/server/crx.default/jcr_root/

With the default workspace:

vlt --credentials admin:admin co http://localhost:8080/crx/server/-/jcr_root/

If URI is incomplete, it will be expanded:

vlt --credentials admin:admin co http://localhost:8080/crx 

Analyze

Analyzes packages.

Syntax

analyze -l <format>|-v|-q <localPaths1> [<localPaths2> ...]

Options

-l (--linkFormat) <format> printf format for hotfix links (name,id), for example [CQ520_HF_%s|%s]
-v (--verbose) verbose output
-q (--quiet) prints as little as possible
<localPaths> [<localPaths> ...]
local path

Status

Prints the status of working copy files and directories.

If --show-update is specified, each file is checked against the remote version. The second letter then specifies what action would be performed by an update operation. 

Syntax

status -v|-q|-u|-N <file1> [<file2> ...] 

Options

-v (--verbose) verbose output
-q (--quiet) prints as little as possible
-u (--show-update) displays update information
-N (--non-recursive) operates on a single directory
<file> [<file> ...]
file or directory to display the status

Update

Copies changes from the repository into the working copy.

Syntax

update -v|-q|--force|-N <file1> [<file2> ...] 

Options

-v (--verbose) verbose output
-q (--quiet) prints as little as possible
--force forces the overwrite of local files
-N (--non-recursive) operates on a single directory
<file> [<file> ...]
file or directory to update

Info

Displays information about a local file.

Syntax

info -v|-q|-R <file1> [<file2> ...] 

Options

-v (--verbose) verbose output
-q (--quiet) prints as little as possible
-R (--recursive) operates recursive
<file> [<file> ...]
file or directory to display info

Commit

Sends changes from your working copy to the repository.

Syntax

commit -v|-q|--force|-N <file1> [<file2> ...]

Options

-v (--verbose) verbose output
-q (--quiet) prints as little as possible
--force forces committing even if the remote copy is modified
-N (--non-recursive) operates on a single directory
<file> [<file> ...]
file or directory to commit

Revert

Restores working copy file to original state and undoes most local edits.

Syntax

revert -q|-R <file1> [<file2> ...]   

Options

-q (--quiet) prints as little as possible
-R (--recursive) descends recursively
<file> [<file> ...]
file or directory to commit

Resolved

Removes conflicted state on working copy files or directories. 

Note

This command does not semantically resolve conflicts or remove conflict markers; it merely removes the conflict-related artifact files and allows PATH to be committed again.

Syntax

resolved -q|-R|--force <file1> [<file2> ...]  

Options

-q (--quiet) prints as little as possible
-R (--recursive) descends recursively
--force resolves, even if there are conflict markers
<file> [<file> ...]
file or directory to resolve

Propget

Prints the value of a property on files or directories.

Syntax

propget -q|-R <propname> <file1> [<file2> ...]

Options

-q (--quiet) prints as little as possible
-R (--recursive) descends recursively
<propname> the property name
<file> [<file> ...]
file or directory to get the property from

Proplist

Prints the properties on files or directories.

Syntax

proplist -q|-R <file1> [<file2> ...] 

Options

-q (--quiet) prints as little as possible
-R (--recursive) descends recursively
<file> [<file> ...]
file or directory to list the properties from

Propset

Sets the value of a property on files or directories.

Note

VLT recognizes the following special versioned properties:              
                                                                               vlt:mime-type                                                               

The mimetype of the file. Used to determine whether to merge the file. A mimetype beginning with 'text/' (or an absent mimetype) is treated as text. Anything else is treated as binary.       

Syntax

propset -q|-R <propname> <propval> <file1> [<file2> ...]

Options

-q (--quiet) prints as little as possible
-R (--recursive) descends recursively
<propname> the property name
<propval> the property value
<file> [<file> ...]
file or directory to set the property to

Add

Puts files and directories under version control, scheduling them for addition to repository. They will be added on next commit.  

Syntax

add -v|-q|-N|--force <file1> [<file2> ...] 

Options

-v (--verbose) verbose output
-q (--quiet) prints as little as possible
-N (--non-recursive)
operates on a single directory
--force forces the operation to run
<file> [<file> ...]
local file or directory to add

Delete

Removes files and directories from version control.

Syntax

delete -v|-q|--force <file1> [<file2> ...] 

Options

-v (--verbose) verbose output
-q (--quiet) prints as little as possible
--force forces the operation to run
<file> [<file> ...]
local file or directory to delete

Diff

Displays the differences between two paths.

Syntax

diff -N <file1> [<file2> ...]

Options

-N (--non-recursive)
operates on a single directory
<file> [<file> ...]
file or directory to display the differences from

Console

Runs an interactive console.

Syntax

console -F <file>

Options

-F (--console-settings) <file> specifies the console settings file. The default file is console.properties.

Rcp

Copies a node tree from one remote repository to another. <src> points to the source node and <dst> specifies the destination path, where the parent node must exist. Rcp processes the nodes by streaming the data.

Syntax

rcp -q|-r|-b <size>|-t <seconds>|-u|-n|-e <arg1> [<arg2> ...] <src> <dst>

Options

-q (--quiet) Prints as little as possible.
-r (--recursive) Descends recursively.
-b (--batchSize) <size> Number of nodes to be processed before an intermediate save.
-t (--throttle) <seconds> Number of seconds to wait after
an intermediate save.
-u (--update) Overwrite/delete existing nodes.
-n (--newer) Respect lastModified properties for update.
-e (--exclude) <arg> [<arg> ...] Regexp of excluded source paths.
<src>
The repository address of the source tree.
<dst> The repository address of the destination node.

Examples

vlt rcp http://localhost:4502/crx/-/jcr:root/content  http://admin:admin@localhost:4503/crx/-/jcr:root/content_copy  

Note

The --exclude options need to be followed by another option before the <src> and <dst> arguments.
For example:
    vlt rcp -e ".*\.txt" -r


Your comments are welcome!
Did you notice a way we could improve the documentation on this page? Is something unclear or insufficiently explained? Please leave your comments below and we will make the appropriate changes. Comments that have been addressed, by improving the documentation accordingly, will then be removed.

COMMENTS

  • By Andy Green - 8:12 PM on Jun 13, 2012   Reply
    Hi

    For CQ 5.5, Is this page to be referred or this one here - http://dev.day.com/docs/en/crx/current/how_to/how_to_use_the_vlttool.html

    Thanks
    • By ppiegaze - 3:20 PM on Jun 15, 2012   Reply
      For CQ 5.5, the URL you mention is the correct one.

    ADD A COMMENT

     

    In order to post a comment, you need to sign-in.

    Note: Customers with DayCare user accounts need to create a new account for use on day.com.

    ***