Backup elastic indices

I am trying to backup my indices in elasticsearch. Its working fine in my local. When I do the same in cloud, I get an exception as follows:
{“error”:“RepositoryException[[janusindexbackup] failed to create repository]; nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, org.elasticsearch.repositories.RepositoryException: [janusindexbackup] location [janusindex] doesn’t match any of the locations specified by path.repo because this setting is empty\n at org.elasticsearch.repositories.fs.FsRepository.(Unknown Source)\n while locating org.elasticsearch.repositories.fs.FsRepository\n while locating org.elasticsearch.repositories.Repository\n\n1 error]; nested: RepositoryException[[janusindexbackup] location [janusindex] doesn’t match any of the locations specified by path.repo because this setting is empty]; “,”status”:500}

Any suggestions?

one suggestion is to copy your error message in google:

location [janusindex] doesn’t match any of the locations specified by path.repo because this setting is empty

Then go to the first result found:

and then read it, look like several users had the same problem, you may find one solution in the thread.