# Backup and restore using snapshots

**URL:** <https://discuss.elastic.co/t/backup-and-restore-using-snapshots/19541>\
**Category:** Elasticsearch\
**Created:** [August 31, 2014, 11:08am UTC](https://discuss.elastic.co/t/backup-and-restore-using-snapshots/19541 "2014-08-31T11:08:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Harvey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_harvey/32/32183_2.png) [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Post date:** [August 31, 2014, 11:08am UTC](https://discuss.elastic.co/t/backup-and-restore-using-snapshots/19541/1 "2014-08-31T11:08:12Z")

</div>

Hi all

I could use some help getting my head around the snapshot and restore  
functionality in ES.

I have a requirement to do incremental daily tape backups and full backups  
weekly using EMC's Avamar backup software.

I'd really appreciate if someone can tell me if the following plan is going  
to work -

1. Export an NFS filesystem from the storage node to both ES data nodes,  
and mount that as /mnt/backup on both nodes.

2. From one of the ES nodes register this directory as the shared  
repository: curl -XPUT '[http://localhost:9200/\_snapshot/backup](http://localhost:9200/_snapshot/backup)' -d  
'{"type": "fs","settings": {"location": "/mnt/backup"}}'

3. On Saturday do a full backup:

i. Get a list of all snapshots using: curl -XGET  
'localhost:9200/\_snapshot/\_status'  
ii. For each of these delete using a command like: curl -XDELETE  
'localhost:9200/\_snapshot/backup/snapshot\_20140830'  
iii. Create a full backup using: curl -XPUT  
"localhost:9200/_snapshot/backup/snapshot_$(date  
+%Y%m%d)?wait\_for\_completion=true"  
iv. Copy the /mnt/backup directory to tape telling Avamar to take a full  
backup

1. On Sunday to Friday do incremental backups based on the Saturday backup:

i. Simply run: curl -XPUT "localhost:9200/_snapshot/backup/snapshot_$(date  
+%d%m%Y)?wait\_for\_completion=true"  
ii. Copy /mnt/backup to tape telling Avamar to take an incremental backup

Is this plan going to work? Is there a better way?

Thanks very much in advance.

Best regards,  
Alex

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2a21ece7-533c-480e-9ac1-218d76d85385%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2a21ece7-533c-480e-9ac1-218d76d85385%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Alex\_Harvey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_harvey/32/32183_2.png) [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Post date:** [September 11, 2014, 5:45am UTC](https://discuss.elastic.co/t/backup-and-restore-using-snapshots/19541/2 "2014-09-11T05:45:28Z")

</div>

I could still use feedback on this plan.

On Sunday, August 31, 2014 9:08:12 PM UTC+10, Alex Harvey wrote:

> Hi all
> 
> I could use some help getting my head around the snapshot and restore  
> functionality in ES.
> 
> I have a requirement to do incremental daily tape backups and full backups  
> weekly using EMC's Avamar backup software.
> 
> I'd really appreciate if someone can tell me if the following plan is  
> going to work -
> 
> 1. Export an NFS filesystem from the storage node to both ES data nodes,  
> and mount that as /mnt/backup on both nodes.
> 
> 2. From one of the ES nodes register this directory as the shared  
> repository: curl -XPUT '[http://localhost:9200/\_snapshot/backup](http://localhost:9200/_snapshot/backup)' -d  
> '{"type": "fs","settings": {"location": "/mnt/backup"}}'
> 
> 3. On Saturday do a full backup:
> 
> i. Get a list of all snapshots using: curl -XGET  
> 'localhost:9200/\_snapshot/\_status'  
> ii. For each of these delete using a command like: curl -XDELETE  
> 'localhost:9200/\_snapshot/backup/snapshot\_20140830'  
> iii. Create a full backup using: curl -XPUT  
> "localhost:9200/_snapshot/backup/snapshot_$(date  
> +%Y%m%d)?wait\_for\_completion=true"  
> iv. Copy the /mnt/backup directory to tape telling Avamar to take a full  
> backup
> 
> 1. On Sunday to Friday do incremental backups based on the Saturday  
> backup:
> 
> i. Simply run: curl -XPUT  
> "localhost:9200/_snapshot/backup/snapshot_$(date  
> +%d%m%Y)?wait\_for\_completion=true"  
> ii. Copy /mnt/backup to tape telling Avamar to take an incremental backup
> 
> Is this plan going to work? Is there a better way?
> 
> Thanks very much in advance.
> 
> Best regards,  
> Alex

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6bea9d13-5137-41e6-842c-32fbe71c56b8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6bea9d13-5137-41e6-842c-32fbe71c56b8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:03am UTC](https://discuss.elastic.co/t/backup-and-restore-using-snapshots/19541/3 "2017-07-06T01:03:11Z")

</div>


