Sanpshot by Type:URL


(krishna singh) #1

{"error":"UnsupportedOperationException[URL repository doesn't support this operation]","status":500}

While Taking Backup type:URL it is showing this error on selecting these option....
ignore_unavailable
True False
include_global_state
True False
So,thats why it is not creating backup..please help me out.

PUT /_snapshot/my_backup
{
"type": "url",
"settings": {
"compress" : true,
"location": "http://localhost/my_backup/*"
}
}


(David Pilato) #2

You can not write to a read only repo. Use a Shared FS.


(krishna singh) #3

how to create Shared FS.??can u help me?


(David Pilato) #4

Well. Read that https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html


(terrasacer) #5

Hi,

I have a different problem in this regard.

I'm registering a repository in fs type.

PUT _snapshot/repofs
{
  "type": "fs",
  "settings": {
  "location": "/root/data"
  }
}

Then I create a snapshot.

PUT _snapshot/repofs/first
{
  "indices": "*",
  "ignore_unavailable": true
}

Then I create a repository in url type.

PUT _snapshot/repourl
{
  "type": "url",
  "settings": {
    "url": "http://mysitename.com/root/data/*"
  }
}

And finally, I get an FileNotFoundException when I run the following command:

GET /_snapshot/repourl/_all

{
"error": "RepositoryException[[repourl] failed to list snapshots in repository]; nested: FileNotFoundException[http://mysitename.com/root/data/index]; ",
"status": 500
}

Whats wrong?


(David Pilato) #6

What happen if you run from your elasticsearch machine:

curl http://mysitename.com/root/data/index

You need to run it as the same user who is running elasticsearch.


(terrasacer) #7

server returns a page that was created for the 404.


(David Pilato) #8

And curl http://mysitename.com/root/data/ ?

Are you sure this site has the data in this URL? Might be another one depending on how your web server has been set up?


(terrasacer) #9

Yes, I am sure.

I do not understand the problem. We use nginx. Maybe this is the source of the problem.


(David Pilato) #10

Do you have access to http://mysitename.com/root/data/ ?


(terrasacer) #11

Of course,

I checked, the snapshot files are stored in this directory.


(David Pilato) #12

I did not mean if you have access to the dir but to the url.

Can you ls your data dir?

ls -l /root/data

(terrasacer) #13

Yes.

# ls -l /root/data
total 32
-rw-r--r-- 1 root root   32 Oct 24 13:56 index
drwxr-xr-x 4 root root 4096 Oct 24 13:51 indices
-rw-r--r-- 1 root root 4467 Oct 24 13:51 metadata-first
-rw-r--r-- 1 root root 4467 Oct 24 13:56 metadata-second
-rw-r--r-- 1 root root  217 Oct 24 13:51 snapshot-first
-rw-r--r-- 1 root root  218 Oct 24 13:56 snapshot-second

(David Pilato) #14

So index file is here but your web server is giving you a 404, right?

And you still believe your configuration is correct?

I can't help on NGinx but I think you have something wrong there. BTW running all that as root is just a nonsense, security wise.

So, first fix your web server issues. When done, try to make it work with elasticsearch.

HTH


(system) #15