Skip to content
Permalink
Browse files
Fix copy-state usage for brooklyn-karaf
  • Loading branch information
aledsage committed Jun 20, 2018
1 parent e1db373 commit 4d417bb21dcf7892d13aa8ed81f17d5a86401394
Showing 1 changed file with 9 additions and 9 deletions.
@@ -246,16 +246,16 @@ The state can be downloaded periodically from the object store, archived and bac
An example script to be invoked by CRON is shown below:

DATE=`date "+%Y%m%d.%H%M.%S"`
BACKUP_FILENAME=/path/to/archives/back-${DATE}.tar.gz
TEMP_DATA_DIR=/path/to/tempdir

brooklyn copy-state \
--persistenceLocation named:my-persistence-location \
--persistenceDir /path/to/bucket \
--destinationDir $TEMP_DATA_DIR
BACKUP_FILENAME=/path/to/archives/back-${DATE}.zip
HOSTNAME=localhost
USERNAME=admin
PASSWORD=pa55wOrd

curl -v -u "${USERNAME}:${PASSWORD}" \
https://${HOSTNAME}:8443/v1/server/ha/persist/export \
> ${BACKUP_FILENAME}
tar --exclude '*/backups/*' -czvf $BACKUP_FILENAME $TEMP_DATA_DIR
# For s3cmd installation see http://s3tools.org/repositories
s3cmd put $BACKUP_FILENAME s3://mybackupbucket
rm $BACKUP_FILENAME
rm -r $TEMP_DATA_DIR

0 comments on commit 4d417bb

Please sign in to comment.