Synchronization tool
The synchronization tool can be used to add/remove files and folders from a location on the file system to the Hippo Repository. It scans the specified location for new, modified and deleted files, and synchronizes the target folder in the repository accordingly.
Getting and building the code
The synchronization tool is available from our public SVN repository. Check out the trunk and build it using Maven:
svn co https://svn.hippocms.org/repos/hippo/hippo-tools/synchronization-tool/trunk/ filesync cd filesync maven uberjar
Start
To start the synchronization tool type
java -jar filesync-VERSION-uber.jar CONFIGFILE
The current VERSION is 1.01.00. If no CONFIGFILE is typed the synchronization tool uses the file "filesync.properties".
Logging
The standard logging is the command line.
The tool logs the current directory being scanned and all operations that result in a change in the repository (add, replace and remove files and/or folders).
Configfile
The contents of the configfile for test are
# Directory to watch for files. # Use a forward slash for subdirectories # To use a windows share: \\\\servername/share/subdirectory sourcedirectory=D:/filesync/files # WebDAV server configuration host=10.10.100.209 port=60000 rootpath=default realm=default realm username=root password=***** # Path relative to the root of the WebDAV server in which to create subfolders # for the imported documents. # This directory must exist. path=files/default.preview/binaries/filesync # Delay between directory scans in milliseconds. # 10 minutes sleeptime=600000 # delete files that exist in repository but not on file system # true = if the file is removed from the filesystem it will be removed from the repository # false = if the file is removed from the filesystem it will be kept into the repository deletefromrepository=false