Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ableasdale/71c21032600a8dce7c1c to your computer and use it in GitHub Desktop.
Save ableasdale/71c21032600a8dce7c1c to your computer and use it in GitHub Desktop.
XQSync Security Database backup script
# XQSync Security Database backup script
# Takes a backup of the Security database on a given system and creates
# a zip file containing all the necessary data for restoring.
# GLOBAL VARIABLES
CONNECTION_URI=xcc://admin:admin@localhost:8010
TSTAMP=`date +"%H%M%S-%m-%d-%Y"`
echo ********************************
echo Script started on $TSTAMP
echo Backing up the Security Database
echo ********************************
java -cp xqsync.jar:xcc.jar:xstream.jar:xpp3.jar \
-DINPUT_CONNECTION_STRING=$CONNECTION_URI/Security \
-DTHREADS=16 \
-DOUTPUT_PACKAGE=/path_to_your_backups/security-$TSTAMP.zip \
com.marklogic.ps.xqsync.XQSync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment