You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Timothy Potter <th...@gmail.com> on 2013/04/12 17:31:10 UTC

Need hook to know when replication backup is actually completed.

Hi,

I'd like to use the backup command to create a backup of each shard
leader's index periodically. This is for disaster recovery in case our data
center goes offline.

We use SolrCloud leader/replica for day-to-day fault-tolerance and it works
great.

The backup command (http://master_host:port/solr/replication?command=backup)
works just fine but it returns immediately while the actual backup creation
runs in the background on the shard leader.

Is there any way to know when the actual backup is complete? I need that
hook to then move the backup to another storage device outside of our data
center, e.g. S3.

What are others doing for this type of backup process?

Thanks in advance.
Tim

Re: Need hook to know when replication backup is actually completed.

Posted by Nate Fox <nf...@neogov.com>.
Tim, thank you for this! I had been looking for this a while back (even
posted something on serverfault) and never got a decent answer. This is
exactly what I was looking for.


--
Nate Fox
Sr Systems Engineer

o: 310.658.5775
m: 714.248.5350

Follow us @NEOGOV <http://twitter.com/NEOGOV> and on
Facebook<http://www.facebook.com/neogov>

NEOGOV <http://www.neogov.com/> is among the top fastest growing software
companies in the USA, recognized by Inc 500|5000, Deloitte Fast 500, and
the LA Business Journal. We are hiring!<http://www.neogov.com/#/company/careers>



On Fri, Apr 12, 2013 at 12:04 PM, Timothy Potter <th...@gmail.com>wrote:

> Update to this ... did some code scanning and 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>
>
> So with a little polling of the details command from my backup script and
> I'm good to go. If anyone knows of a more direct way, let me know otherwise
> I'm moving ahead with this approach.
>
> Cheers,
> Tim
>
>
> On Fri, Apr 12, 2013 at 9:31 AM, Timothy Potter <thelabdude@gmail.com
> >wrote:
>
> > Hi,
> >
> > I'd like to use the backup command to create a backup of each shard
> > leader's index periodically. This is for disaster recovery in case our
> data
> > center goes offline.
> >
> > We use SolrCloud leader/replica for day-to-day fault-tolerance and it
> > works great.
> >
> > The backup command (
> > http://master_host:port/solr/replication?command=backup) works just fine
> > but it returns immediately while the actual backup creation runs in the
> > background on the shard leader.
> >
> > Is there any way to know when the actual backup is complete? I need that
> > hook to then move the backup to another storage device outside of our
> data
> > center, e.g. S3.
> >
> > What are others doing for this type of backup process?
> >
> > Thanks in advance.
> > Tim
> >
>

Re: Need hook to know when replication backup is actually completed.

Posted by Timothy Potter <th...@gmail.com>.
Update to this ... did some code scanning and 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>

So with a little polling of the details command from my backup script and
I'm good to go. If anyone knows of a more direct way, let me know otherwise
I'm moving ahead with this approach.

Cheers,
Tim


On Fri, Apr 12, 2013 at 9:31 AM, Timothy Potter <th...@gmail.com>wrote:

> Hi,
>
> I'd like to use the backup command to create a backup of each shard
> leader's index periodically. This is for disaster recovery in case our data
> center goes offline.
>
> We use SolrCloud leader/replica for day-to-day fault-tolerance and it
> works great.
>
> The backup command (
> http://master_host:port/solr/replication?command=backup) works just fine
> but it returns immediately while the actual backup creation runs in the
> background on the shard leader.
>
> Is there any way to know when the actual backup is complete? I need that
> hook to then move the backup to another storage device outside of our data
> center, e.g. S3.
>
> What are others doing for this type of backup process?
>
> Thanks in advance.
> Tim
>