<p>I have an up&amp;running SolrCloud v8.11 cluster on Kubernetes, with solr-operator.</p>
<p>The backup is enabled on S3 bucket.</p>
<p>How can I correctly write the request to perform a <code>RESTORE</code> of a backup stored in a S3 bucket?</p>
<p>I'm unable to figure out what should it be the <code>location</code> and the <code>snapshotName</code> I have to provide in the <code>Restore API</code> request made to Solr.</p>
<p>In order to discover those values, I tried to execute the <code>LISTBACKUP</code> action, but in this case the <code>location</code> values is also wrong...</p>
<pre class="lang-sh prettyprint-override"><code>$ curl https://my-solrcloud.example.org/solr/admin/collections\?action=LISTBACKUP\&amp;name=collection-name\&amp;repository=collection-backup\&amp;location=my-s3-bucket/collection-backup

{
  &quot;responseHeader&quot;:{
    &quot;status&quot;:400,
    &quot;QTime&quot;:70},
  &quot;error&quot;:{
    &quot;metadata&quot;:[
      &quot;error-class&quot;,&quot;org.apache.solr.common.SolrException&quot;,
      &quot;root-error-class&quot;,&quot;org.apache.solr.common.SolrException&quot;],
    &quot;msg&quot;:&quot;specified location s3:///my-s3-bucket/collection-backup/ does not exist.&quot;,
    &quot;code&quot;:400}}

## The Log in cluster writes:
org.apache.solr.common.SolrException: specified location s3:///my-s3-bucket/collection-backup/ does not exist. =&gt; org.apache.solr.common.SolrException: specified location s3:///my-s3-bucket/collection-backup/ does not exist.
</code></pre>
<p>After all, the recurring backup works as expected, but sooner or later a <code>RESTORE action</code> will be performed and it's not clear how could it be done correctly.</p>
<p>Thank you in advance.</p>

<p>A bit late, but I came across this question while searching for the same answer. There was <a href="https://lists.apache.org/list?users@solr.apache.org:2022-2:S3%20backup" rel="nofollow noreferrer">a thread on the mailing list</a> that helped me to figure out how this is supposed to work.</p>
<p>I found the documentation on this pretty confusing, but the <code>location</code> seems to be <em>relative to the backup repository</em>. So, the <code>repository</code> argument already accounts for the bucket name, and the <code>name</code> argument would be the name of the backup you are attempting to list. Solr then builds the S3 path as <code>{repository bucket} + {location} + {backup name}</code>. So, location should simply be: <code>/</code></p>
<p>Assume you've set up a <code>backupRepository</code> for the SolrCloud deployment like the following:</p>
<pre><code>backupRepositories:
- name: &quot;my-backup-repo&quot;
  s3:
    region: &quot;us-east-1&quot;
    bucket: &quot;my-s3-bucket&quot;
</code></pre>
<p>and you have created a SolrBackup like the following:</p>
<pre><code>---
apiVersion: solr.apache.org/v1beta1
kind: SolrBackup
metadata:
  name: &quot;my-collection-backup&quot;
spec:
  repositoryName: &quot;my-backup-repo&quot;
  solrCloud: &quot;my-solr-cloud&quot;
  collections:
    - &quot;my-collection&quot;
</code></pre>
<p>The full cURL command for LISTBACKUP would be:</p>
<pre><code>$ curl https://my-solrcloud.example.org/solr/admin/collections \
  -d action=LISTBACKUP \
  -d name=my-collection-backup \
  -d repository=my-backup-repo \
  -d location=/
</code></pre>
<p>Similarly for the RESTORE command:</p>
<pre><code>$ curl https://my-solrcloud.example.org/solr/admin/collections \
-d action=RESTORE \
-d name=my-collection-backup \
-d repository=my-backup-repo \
-d location=/ \
-d collection=my-collection-restore
</code></pre>
