About Snapshot API and Backup for Solr Index

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

About Snapshot API and Backup for Solr Index

Kayak28
Hello, Community Members:

I am using Solr 7.7.4
I have a question about a Snapshot API.
https://lucene.apache.org/solr/guide/7_4/making-and-restoring-backups.html#create-snapshot-api

I have tested basic of snapshot APIs, create snapshot, list snapshot,
delete snapshot.

As far as I know, when I do:
- create a snapshot: create a binary file (snapshot_N where n is identical
to segment_N) that contains a path of the index.
- the file is created under data/snapshot_metadata directory.

- list snapshot: return JSON, containing all snapshot data which show
segment generation and path to the index.
- delete snapshot: delete a snapshot data from snapshot_N.

For me, it is impossible to "backup" or "restore" Solr's index.

So, my questions are:

- How snapshot APIs are related to "backup" or "restore"?
- or more basically, when should I use snapshot API?
- Is there any way to make a "backup" without consuming a double-size of
the index? (I am asking because if I use backup API, it will copy the
entire index)
- what is the cheapest way to make a backup for Solr?

If you help me out one of these questions or give me any clue,
I will really appreciate.

Sincerely,
Kaya Ota
Reply | Threaded
Open this post in threaded view
|

Re: About Snapshot API and Backup for Solr Index

Kayak28
I was not clear in the last email.
I mean "For me, it is impossible to "backup" or "restore" Solr's index by
taking a snapshot."

If I make you confuse, I am sorry about that.

Sincerely,
Kaya Ota

2019年11月21日(木) 19:50 Kayak28 <[hidden email]>:

> Hello, Community Members:
>
> I am using Solr 7.7.4
> I have a question about a Snapshot API.
>
> https://lucene.apache.org/solr/guide/7_4/making-and-restoring-backups.html#create-snapshot-api
>
> I have tested basic of snapshot APIs, create snapshot, list snapshot,
> delete snapshot.
>
> As far as I know, when I do:
> - create a snapshot: create a binary file (snapshot_N where n is identical
> to segment_N) that contains a path of the index.
> - the file is created under data/snapshot_metadata directory.
>
> - list snapshot: return JSON, containing all snapshot data which show
> segment generation and path to the index.
> - delete snapshot: delete a snapshot data from snapshot_N.
>
> For me, it is impossible to "backup" or "restore" Solr's index.
>
> So, my questions are:
>
> - How snapshot APIs are related to "backup" or "restore"?
> - or more basically, when should I use snapshot API?
> - Is there any way to make a "backup" without consuming a double-size of
> the index? (I am asking because if I use backup API, it will copy the
> entire index)
> - what is the cheapest way to make a backup for Solr?
>
> If you help me out one of these questions or give me any clue,
> I will really appreciate.
>
> Sincerely,
> Kaya Ota
>
>
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: About Snapshot API and Backup for Solr Index

Paras Lehana
Hey Kaya,

Are you not able to restore with the same restore backup command?

http://localhost:8983/solr/gettingstarted/replication?command=restore&name=backup_name


Replace backup_name with the snapshot name.

On Thu, 21 Nov 2019 at 16:23, Kayak28 <[hidden email]> wrote:

> I was not clear in the last email.
> I mean "For me, it is impossible to "backup" or "restore" Solr's index by
> taking a snapshot."
>
> If I make you confuse, I am sorry about that.
>
> Sincerely,
> Kaya Ota
>
> 2019年11月21日(木) 19:50 Kayak28 <[hidden email]>:
>
> > Hello, Community Members:
> >
> > I am using Solr 7.7.4
> > I have a question about a Snapshot API.
> >
> >
> https://lucene.apache.org/solr/guide/7_4/making-and-restoring-backups.html#create-snapshot-api
> >
> > I have tested basic of snapshot APIs, create snapshot, list snapshot,
> > delete snapshot.
> >
> > As far as I know, when I do:
> > - create a snapshot: create a binary file (snapshot_N where n is
> identical
> > to segment_N) that contains a path of the index.
> > - the file is created under data/snapshot_metadata directory.
> >
> > - list snapshot: return JSON, containing all snapshot data which show
> > segment generation and path to the index.
> > - delete snapshot: delete a snapshot data from snapshot_N.
> >
> > For me, it is impossible to "backup" or "restore" Solr's index.
> >
> > So, my questions are:
> >
> > - How snapshot APIs are related to "backup" or "restore"?
> > - or more basically, when should I use snapshot API?
> > - Is there any way to make a "backup" without consuming a double-size of
> > the index? (I am asking because if I use backup API, it will copy the
> > entire index)
> > - what is the cheapest way to make a backup for Solr?
> >
> > If you help me out one of these questions or give me any clue,
> > I will really appreciate.
> >
> > Sincerely,
> > Kaya Ota
> >
> >
> >
> >
> >
> >
> >
>


--
--
Regards,

*Paras Lehana* [65871]
Development Engineer, Auto-Suggest,
IndiaMART Intermesh Ltd.

8th Floor, Tower A, Advant-Navis Business Park, Sector 142,
Noida, UP, IN - 201303

Mob.: +91-9560911996
Work: 01203916600 | Extn:  *8173*

--
IMPORTANT: 
NEVER share your IndiaMART OTP/ Password with anyone.