# Wildcard query with '?' does not work with Snapshot

**URL:** <https://discuss.elastic.co/t/wildcard-query-with-does-not-work-with-snapshot/184329>\
**Category:** Elasticsearch\
**Created:** [June 5, 2019, 10:30am UTC](https://discuss.elastic.co/t/wildcard-query-with-does-not-work-with-snapshot/184329 "2019-06-05T10:30:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kokidinivi](https://avatars.discourse-cdn.com/v4/letter/k/7bcc69/32.png) [@kokidinivi](https://discuss.elastic.co/u/kokidinivi)\
**Post date:** [June 5, 2019, 10:30am UTC](https://discuss.elastic.co/t/wildcard-query-with-does-not-work-with-snapshot/184329/1 "2019-06-05T10:30:58Z")

</div>

This is the actual query:

```
`curl -X PUT "localhost:9200/_snapshot/backup_test/test_0?wait_for_completion=true" -H 'Content-Type: application/json' -d'
{
  "indices": "graylog2_?",
  "ignore_unavailable": true,
  "include_global_state": false
}
' `

```

This is the output:

```
"snapshot": {                              
  "snapshot": "test_0",                    
   "uuid": "pi7oGQyXQJSEEflAvwNjYw",        
   "version_id": 6070099,                   
   "version": "6.7.0",                      
   "indices": [],                           
   "include_global_state": false,           
   "state": "SUCCESS",                      
   "start_time": "2019-06-05T10:17:39.690Z",
   "start_time_in_millis": 1559729859690,   
   "end_time": "2019-06-05T10:17:39.764Z",  
   "end_time_in_millis": 1559729859764,     
   "duration_in_millis": 74,                
   "failures": [],                          
   "shards": {                              
      "total": 0,                            
      "failed": 0,                           
      "successful": 0 }

```

And if I run this:

```
`curl -X PUT "localhost:9200/_snapshot/backup_test/test_0?wait_for_completion=true" -H 'Content-Type: application/json' -d'
{
  "indices": "graylog2_1*",
  "ignore_unavailable": true,
  "include_global_state": false
}
' `

```

I will get this:

```
  "snapshots": [       
{                               
  "snapshot": "test_0",  
  "uuid": "M0uhTVLCTkGCzfq6Y7WXrQ",        
  "version_id": 6070099,                
  "version": "6.7.0",
  "indices": [                  
    "graylog2_17",       
    "graylog2_15",                         
    "graylog2_119",                     
    "graylog2_117",
    "graylog2_114",
    "graylog2_108",
    "graylog2_111",
    "graylog2_12",
    "graylog2_14",
    "graylog2_105",
    "graylog2_104",
    "graylog2_106",
    "graylog2_16",
    "graylog2_113",
    "graylog2_102",
    "graylog2_112",
    "graylog2_13",
    "graylog2_110",
    "graylog2_100",
    "graylog2_109",
    "graylog2_18",
    "graylog2_116",
    "graylog2_11",
    "graylog2_107",
    "graylog2_1",
    "graylog2_10",
    "graylog2_115",
    "graylog2_118",
    "graylog2_103",
    "graylog2_19",
    "graylog2_101"
  ],
  "include_global_state": false,
  "state": "IN_PROGRESS",
  "start_time": "2019-06-05T09:35:53.514Z",
  "start_time_in_millis": 1559727353514,
  "end_time": "1970-01-01T00:00:00.000Z",
  "end_time_in_millis": 0,
  "duration_in_millis": -1559727353514,
  "failures": [],
  "shards": {
    "total": 0,
    "failed": 0,
    "successful": 0
  }
}

```

So the question is, how I actually can snapshot all the indices from graylog2\_0 to graylog2\_99?

---

<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 3, 2019, 10:31am UTC](https://discuss.elastic.co/t/wildcard-query-with-does-not-work-with-snapshot/184329/2 "2019-07-03T10:31:02Z")

</div>

Closed on July 3, 2019, 10:31am UTC

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