Skip to content

Instantly share code, notes, and snippets.

@toodooleedoo
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save toodooleedoo/5188de2352388953683d to your computer and use it in GitHub Desktop.
Save toodooleedoo/5188de2352388953683d to your computer and use it in GitHub Desktop.
#AEM #CQ: Copy/Clone Content recursively with #VLT

This can be used to copy for example the DAM to another server.

Requires vlt to be setup and in path. ###Installation

  • vault.zip
  • Set JAVA_HOME and update PATH to vlt.bat

###Usage Just call script with a root path and wait.

if [ -z "${4}" ]; then
echo "You didn't pass everything!";
exit
fi
SOURCE_CREDENTIALS="${1}"
SOURCE_HOSTNAME="${2}"
DEST_CREDENTIALS="${3}"
DEST_HOSTNAME="${4}"
CONTENT_PATH="${5}"
SRC_SERVER="http://${SOURCE_CREDENTIALS}@${SOURCE_HOSTNAME}:4502/crx/-/jcr:root"
DEST_SERVER="http://${DEST_CREDENTIALS}@${DEST_HOSTNAME}:4502/crx/-/jcr:root"
vlt rcp -b 100 -r -u -n ${SRC_SERVER}${CONTENT_PATH} ${DEST_SERVER}${CONTENT_PATH}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment