Wildcard query with '?' does not work with Snapshot

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?

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