# Backup and restore elasticsearch

**URL:** <https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637>\
**Category:** Elasticsearch\
**Created:** [April 6, 2020, 7:30am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637 "2020-04-06T07:30:08Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 6, 2020, 7:30am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/1 "2020-04-06T07:30:08Z")

</div>

Hello,

in-order to take backup while creating path.repo in /etc/elaticsearch/elasticsearch.yml, the elasticsearch is failing to start its beeing in stoped state dont know what is the issue

below config file

# ======================== Elasticsearch Configuration =========================

# 

# NOTE: Elasticsearch comes with reasonable defaults for most settings.

# Before you set out to tweak and tune the configuration, make sure you

# understand what are you trying to accomplish and the consequences.

# 

# The primary way of configuring a node is via this file. This template lists

# the most important settings you may want to configure for a production cluster.

# 

# Please consult the documentation for further information on configuration options:

# [https://www.elastic.co/guide/en/elasticsearch/reference/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)

# 

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

#cluster.name: my-application

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

#node.name: node-1

# 

# Add custom attributes to the node:

# 

#node.attr.rack: r1

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

path.data: /var/lib/elasticsearch

# 

# Path to log files:

path.repo: /root/backup\_repo

# 

path.logs: /var/log/elasticsearch

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

#bootstrap.memory\_lock: true

# 

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

# ---------------------------------- Network -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

#network.host: \*\*\*\*\*\*\*\*\*\*  
network.host: 0.0.0.0

# 

# Set a custom port for HTTP:

# 

#http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when this node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

# 

#discovery.seed\_hosts: ["host1", "host2"]

# 

# Bootstrap the cluster using an initial set of master-eligible nodes:

# 

#cluster.initial\_master\_nodes: ["node-1", "node-2"]

# 

# For more information, consult the discovery and cluster formation module documentation.

# 

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
discovery.type: single-node

any help,

Thanks,  
Madhu

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2020, 7:41am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/2 "2020-04-06T07:41:45Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 6, 2020, 8:03am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/3 "2020-04-06T08:03:21Z")

</div>

```
in-order to take backup while creating path.repo in /etc/elaticsearch/elasticsearch.yml, the elasticsearch is failing to start its beeing in stoped state dont know what is the issue

below config file    

     # ======================== Elasticsearch Configuration =========================
        #
        # NOTE: Elasticsearch comes with reasonable defaults for most settings.
        # Before you set out to tweak and tune the configuration, make sure you
        # understand what are you trying to accomplish and the consequences.
        #
        # The primary way of configuring a node is via this file. This template lists
        # the most important settings you may want to configure for a production cluster.
        #
        # Please consult the documentation for further information on configuration options:
        # https://www.elastic.co/guide/en/elasticsearch/reference/index.html
        #
        # ---------------------------------- Cluster -----------------------------------
        #
        # Use a descriptive name for your cluster:
        #
        #cluster.name: my-application
        #
        # ------------------------------------ Node ------------------------------------
        #
        # Use a descriptive name for the node:
        #
        #node.name: node-1
        #
        # Add custom attributes to the node:
        #
        #node.attr.rack: r1
        #
        # ----------------------------------- Paths ------------------------------------
        #
        # Path to directory where to store the data (separate multiple locations by comma):
        #
        path.data: /var/lib/elasticsearch
        #
        # Path to log files:
        path.repo: /root/backup_repo
        #
        path.logs: /var/log/elasticsearch
        #
        # ----------------------------------- Memory -----------------------------------
        #
        # Lock the memory on startup:
        #
        #bootstrap.memory_lock: true
        #
        # Make sure that the heap size is set to about half the memory available
        # on the system and that the owner of the process is allowed to use this
        # limit.
        #
        # Elasticsearch performs poorly when the system is swapping the memory.
        #
        # ---------------------------------- Network -----------------------------------
        #
        # Set the bind address to a specific IP (IPv4 or IPv6):
        #
        #network.host: **********
        network.host: 0.0.0.0
        #
        # Set a custom port for HTTP:
        #
        #http.port: 9200
        #
        # For more information, consult the network module documentation.
        #
        # --------------------------------- Discovery ----------------------------------
        #
        # Pass an initial list of hosts to perform discovery when this node is started:
        # The default list of hosts is ["127.0.0.1", "[::1]"]
        #
        #discovery.seed_hosts: ["host1", "host2"]
        #
        # Bootstrap the cluster using an initial set of master-eligible nodes:
        #
        #cluster.initial_master_nodes: ["node-1", "node-2"]
        #
        # For more information, consult the discovery and cluster formation module documentation.
        #
        # ---------------------------------- Gateway -----------------------------------
        #
        # Block initial recovery after a full cluster restart until N nodes are started:
        #
        #gateway.recover_after_nodes: 3
        #
        # For more information, consult the gateway module documentation.
        #
        # ---------------------------------- Various -----------------------------------
        #
        # Require explicit names when deleting indices:
        #
        #action.destructive_requires_name: true
        discovery.type: single-node

any help
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2020, 8:30am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/4 "2020-04-06T08:30:32Z")

</div>

The indentation is wrong. May be that's the issue.

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 6, 2020, 8:32am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/5 "2020-04-06T08:32:44Z")

</div>

i think its right only,

can you please send me the line

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 6, 2020, 8:45am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/6 "2020-04-06T08:45:27Z")

</div>

these are the logs after adding path.repo and restarted

```
[2020-04-06T08:43:11,509][ERROR][o.e.b.Bootstrap] [elastic7] Exception
java.lang.IllegalStateException: Unable to access 'path.repo' (/root/my_backup)
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:70) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:314) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:253) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:122) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:206) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:325) [elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) [elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) [elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-7.1.1.jar:7.1.1]
        at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) [elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-7.1.1.jar:7.1.1]
Caused by: java.nio.file.AccessDeniedException: /root/my_backup
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389) ~[?:?]
        at java.nio.file.Files.createDirectory(Files.java:692) ~[?:?]
        at java.nio.file.Files.createAndCheckIsDirectory(Files.java:799) ~[?:?]
        at java.nio.file.Files.createDirectories(Files.java:785) ~[?:?]
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:401) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:68) ~[elasticsearch-7.1.1.jar:7.1.1]
        ... 12 more
[2020-04-06T08:43:11,524][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [elastic7] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.repo' (/root/my_backup)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-7.1.1.jar:7.1.1]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.1.1.jar:7.1.1]
Caused by: java.lang.IllegalStateException: Unable to access 'path.repo' (/root/my_backup)
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:70) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:314) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:253) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:122) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:206) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:325) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.1.1.jar:7.1.1]
        ... 6 more
Caused by: java.nio.file.AccessDeniedException: /root/my_backup
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389) ~[?:?]
        at java.nio.file.Files.createDirectory(Files.java:692) ~[?:?]
        at java.nio.file.Files.createAndCheckIsDirectory(Files.java:799) ~[?:?]
        at java.nio.file.Files.createDirectories(Files.java:785) ~[?:?]
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:401) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:68) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:314) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:253) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:122) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:206) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:325) ~[elasticsearch-7.1.1.jar:7.1.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.1.1.jar:7.1.1]
        ... 6 more
[2020-04-06T08:43:37,806][INFO][o.e.e.NodeEnvironment] [elastic7] using [1] data paths, mounts [[/ (/dev/vda1)]], net usable_space [144.6gb], net total_space [154.8gb], types [ext4]
[2020-04-06T08:43:37,811][INFO][o.e.e.NodeEnvironment] [elastic7] heap size [990.7mb], compressed ordinary object pointers [true]
[2020-04-06T08:43:37,879][INFO][o.e.n.Node] [elastic7] node name [elastic7], node ID [3eScVBuNT5K0fveQzu-YEA], cluster name [elasticsearch]
[2020-04-06T08:43:37,880][INFO][o.e.n.Node] [elastic7] version[7.1.1], pid[8847], build[default/deb/7a013de/2019-05-23T14:04:00.380842Z], OS[Linux/4.15.0-72-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/12.0.1/12.0.1+12]
[2020-04-06T08:43:37,881][INFO][o.e.n.Node] [elastic7] JVM home [/usr/share/elasticsearch/jdk]
[2020-04-06T08:43:37,881][INFO][o.e.n.Node] [elastic7] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-17675785612206672785, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -Dio.netty.allocator.type=unpooled, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=deb, -Des.bundled_jdk=true]
[2020-04-06T08:43:39,775][INFO][o.e.p.PluginsService] [elastic7] loaded module [aggs-matrix-stats]
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2020, 3:09pm UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/7 "2020-04-06T15:09:18Z")

</div>

```
AccessDeniedException: /root/my_backup

```

It means that not all the nodes can access this dir from the elasticsearch process.

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 7, 2020, 6:41am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/8 "2020-04-07T06:41:43Z")

</div>

i need to restore all my indexes from dev to prod env what is the best way to do it any document to follow

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 7, 2020, 11:08am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/9 "2020-04-07T11:08:26Z")

</div>

You can use snapshot and restore, you can use reindex from remote if your prod cluster has access to your dev cluster, you can "just" reindex the same way you did when you initially indexed in the dev cluster.

What is exactly the problem you have?

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 8, 2020, 5:09am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/10 "2020-04-08T05:09:03Z")

</div>

While i trying to index from dev to prod i got below error

```
 curl -X POST " ***.**. ***.** :9200/_snapshot/my_backup/snapshot_1/_restore?pretty"
{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_missing_exception",
        "reason" : "[my_backup] missing"
      }
    ],
    "type" : "repository_missing_exception",
    "reason" : "[my_backup] missing"
  },
  "status" : 404
}
```

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 8, 2020, 5:24am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/11 "2020-04-08T05:24:13Z")

</div>

i took backup on dev box and try to load it from dev to prod by executing below command from dev box

`curl -X POST "Prod_URL:9200/_snapshot/my_backup/snapshot_1/_restore?pretty"`

but i got below error, even through i added my\_backup folder and added (path.repo: $path) on elastiseach.yml file on prod

what could be the issue

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 8, 2020, 7:24am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/12 "2020-04-08T07:24:05Z")

</div>

You need to create the repository in the destination cluster.

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 8, 2020, 7:34am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/13 "2020-04-08T07:34:27Z")

</div>

can we have quick zoom call please

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 8, 2020, 7:47am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/14 "2020-04-08T07:47:38Z")

</div>

I can't I'm afraid.

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 8, 2020, 7:50am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/15 "2020-04-08T07:50:00Z")

</div>

my question is cant we restore indexes from dev box to prod frm dev box only  
??

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 8, 2020, 7:51am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/16 "2020-04-08T07:51:09Z")

</div>

because now its showing there is no snapshot after creating repo

```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "snapshot_restore_exception",
        "reason" : "[my_backup:snapshot_1] snapshot does not exist"
      }
    ],
    "type" : "snapshot_restore_exception",
    "reason" : "[my_backup:snapshot_1] snapshot does not exist"
  },
  "status" : 500
}
```

---

<div class="post-metadata">

**Author:** ![Madhu\_Cherukuri](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Madhu\_Cherukuri](https://discuss.elastic.co/u/Madhu_Cherukuri)\
**Post date:** [April 8, 2020, 7:54am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/17 "2020-04-08T07:54:39Z")

</div>

so do i need to copy the snapshot manually from dev to prod and need to execute below command or i can execute from dev box itself ??

`curl -X POST "Prod_URL:9200/_snapshot/my_backup/snapshot_1/_restore?pretty"`

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 8, 2020, 8:06am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/18 "2020-04-08T08:06:30Z")

</div>

You need to have a repository on the dev machine which is able to save the data to a shared FS.  
You need to create a repository on the prod machine which is able to access the same data on a shared FS.

So yes, once everything is backup on the dev shared FS, you can copy the files to the production system in whatever dir which needs to be shared by all nodes, create the repository and restore.

---

<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:** [May 6, 2020, 8:06am UTC](https://discuss.elastic.co/t/backup-and-restore-elasticsearch/226637/19 "2020-05-06T08:06:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
