Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are using SolrCloud and utilizing a the replication backup command:

curl "http://localhost:8080/solr/replication?command=backup&numberToKeep=5&location=/data/backup"

Which works great and responds with:

<?xml version="1.0" encoding="UTF-8"?>
  <response>
    <lst name="responseHeader"><int name="status">0</int><int name="QTime">6</int></lst><str name="status">OK</str>
</response>

However, I'd like to rsync the files off of the box when the backup is done - but I dont know how to determine when it's finished. How can I know when it's done backing up?

share|improve this question
add comment

2 Answers

curl "http://foobar" && rsync foobar

&& continues upon success of the previous command.

share|improve this answer
    
curl returns instantly while the backup can take a few minutes when copying gigs of data. –  natefox Mar 13 '13 at 0:44
add comment
up vote 0 down vote accepted

This was finally answered here: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201304.mbox/%3CCAJt9WniZCAwOy+Bsw9e7vZULpOuVfvOOrKdm5RfqmKLtXc40Lw@mail.gmail.com%3E

it looks like the backup status is available via the details command, e.g.
<lst name="backup">
  <str name="startTime">Fri Apr 12 17:53:17 UTC 2013</str>
  <int name="fileCount">120</int>
  <str name="status">success</str>
  <str name="snapshotCompletedAt">Fri Apr 12 17:58:22 UTC 2013</str>
</lst>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.