backup strategy

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

backup strategy

Koen De Groote
Greetings.

Solr 7.6, cloud.

From what I've researched, backup and restore is pretty straightforward.
BACKUP and RESTORE are collection commands and the backup is to be put on a
shared filesystem.

So far so good.

I'm a bit concerned about the RESTORE action. A RESTORE command will create
a new collection, meaning either I need to pick a new name or delete the
old one first.

And if I pick a new name, that would still mean restarting all clients that
have to connect to it.

The documentation speaks or using ALIAS, but I don't see how that works.

I can only create an alias for an existing collection, so I'd first have to
restore the backup to a different name, verify it is correct, delete the
old collection and then give it an alias that is the name of the old
collection?

Or how is this supposed to work?

Because honestly, deleting the existing collection first is rather scary
and sounds like downtime for a restore is unavoidable.

So, how to properly restore?

Kind regards,
Koen De Groote
Reply | Threaded
Open this post in threaded view
|

Re: backup strategy

Shawn Heisey-2
On 10/4/2019 1:41 PM, Koen De Groote wrote:
>  From what I've researched, backup and restore is pretty straightforward.
> BACKUP and RESTORE are collection commands and the backup is to be put on a
> shared filesystem.
>
> So far so good.
>
> I'm a bit concerned about the RESTORE action. A RESTORE command will create
> a new collection, meaning either I need to pick a new name or delete the
> old one first.

The basic use case of backup/restore is that you create a backup, and
then you lose your Solr install.  So you set up a brand new one ...
which has no collections.  So the fact that the restore command must
create the collection is not really a problem.

> And if I pick a new name, that would still mean restarting all clients that
> have to connect to it.

That would depend on how those clients work, and we have no way of
knowing anything about your clients.

> The documentation speaks or using ALIAS, but I don't see how that works.
>
> I can only create an alias for an existing collection, so I'd first have to
> restore the backup to a different name, verify it is correct, delete the
> old collection and then give it an alias that is the name of the old
> collection?

If you are testing restore on a SolrCloud install that has NOT died and
been rebuilt, then that would be what you need to do to use an alias.

> Because honestly, deleting the existing collection first is rather scary
> and sounds like downtime for a restore is unavoidable.

In most situations where a backup is useful, you're already down.

Thanks,
Shawn
Reply | Threaded
Open this post in threaded view
|

Re: backup strategy

Mikhail Khludnev-2
In reply to this post by Koen De Groote
Hello, Koen.
What about switching "query" alias to restored collection, and then nuking
the old one?

On Fri, Oct 4, 2019 at 10:52 PM Koen De Groote <[hidden email]>
wrote:

> Greetings.
>
> Solr 7.6, cloud.
>
> From what I've researched, backup and restore is pretty straightforward.
> BACKUP and RESTORE are collection commands and the backup is to be put on a
> shared filesystem.
>
> So far so good.
>
> I'm a bit concerned about the RESTORE action. A RESTORE command will create
> a new collection, meaning either I need to pick a new name or delete the
> old one first.
>
> And if I pick a new name, that would still mean restarting all clients that
> have to connect to it.
>
> The documentation speaks or using ALIAS, but I don't see how that works.
>
> I can only create an alias for an existing collection, so I'd first have to
> restore the backup to a different name, verify it is correct, delete the
> old collection and then give it an alias that is the name of the old
> collection?
>
> Or how is this supposed to work?
>
> Because honestly, deleting the existing collection first is rather scary
> and sounds like downtime for a restore is unavoidable.
>
> So, how to properly restore?
>
> Kind regards,
> Koen De Groote
>


--
Sincerely yours
Mikhail Khludnev
Reply | Threaded
Open this post in threaded view
|

Re: backup strategy

Koen De Groote
Shawn,

Indeed, we're probably already in catastrophe territory in this case. A
complete replace does indeed seem like the best option in that case.

Client is just the default solr client, `
org.apache.solr:solr-solrj:<version>`

Mikhail,

Sounds possible, but I wonder about the cases where I would need a restore
now. Most of these will probably be a catastrophic event in which a
complete re-setup is needed.
I guess it would be useful in restoring an older version for a specific
reason.

Thanks.







On Fri, Oct 4, 2019 at 10:59 PM Mikhail Khludnev <[hidden email]> wrote:

> Hello, Koen.
> What about switching "query" alias to restored collection, and then nuking
> the old one?
>
> On Fri, Oct 4, 2019 at 10:52 PM Koen De Groote <
> [hidden email]>
> wrote:
>
> > Greetings.
> >
> > Solr 7.6, cloud.
> >
> > From what I've researched, backup and restore is pretty straightforward.
> > BACKUP and RESTORE are collection commands and the backup is to be put
> on a
> > shared filesystem.
> >
> > So far so good.
> >
> > I'm a bit concerned about the RESTORE action. A RESTORE command will
> create
> > a new collection, meaning either I need to pick a new name or delete the
> > old one first.
> >
> > And if I pick a new name, that would still mean restarting all clients
> that
> > have to connect to it.
> >
> > The documentation speaks or using ALIAS, but I don't see how that works.
> >
> > I can only create an alias for an existing collection, so I'd first have
> to
> > restore the backup to a different name, verify it is correct, delete the
> > old collection and then give it an alias that is the name of the old
> > collection?
> >
> > Or how is this supposed to work?
> >
> > Because honestly, deleting the existing collection first is rather scary
> > and sounds like downtime for a restore is unavoidable.
> >
> > So, how to properly restore?
> >
> > Kind regards,
> > Koen De Groote
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>