"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/rest-api-spec/src/main/resources/rest-api-spec/test/snapshot.restore/10_basic.yml" (29 Dec 2021, 1439 Bytes) of package /linux/www/elasticsearch-6.8.23-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ---
    2 setup:
    3 
    4   - do:
    5       snapshot.create_repository:
    6         repository: test_repo_restore_1
    7         body:
    8           type: fs
    9           settings:
   10             location: "test_repo_restore_1_loc"
   11 
   12   - do:
   13       indices.create:
   14         index: test_index
   15         body:
   16           settings:
   17             number_of_shards:   1
   18             number_of_replicas: 0
   19 
   20   - do:
   21       cluster.health:
   22         wait_for_status: green
   23 
   24 ---
   25 "Create a snapshot and then restore it":
   26 
   27   - do:
   28       snapshot.create:
   29         repository: test_repo_restore_1
   30         snapshot: test_snapshot
   31         wait_for_completion: true
   32 
   33   - match: { snapshot.snapshot: test_snapshot }
   34   - match: { snapshot.state : SUCCESS }
   35   - match: { snapshot.shards.successful: 1 }
   36   - match: { snapshot.shards.failed : 0 }
   37   - is_true: snapshot.version
   38   - gt: { snapshot.version_id: 0}
   39 
   40   - do:
   41       indices.close:
   42         index : test_index
   43 
   44   - do:
   45       snapshot.restore:
   46         repository: test_repo_restore_1
   47         snapshot: test_snapshot
   48         wait_for_completion: true
   49 
   50   - do:
   51       indices.recovery:
   52         index: test_index
   53 
   54   - match: { test_index.shards.0.type: SNAPSHOT }
   55   - match: { test_index.shards.0.stage: DONE }
   56   - gte:   { test_index.shards.0.index.files.recovered: 0}
   57   - gte:   { test_index.shards.0.index.size.recovered_in_bytes: 0}
   58   - gte:   { test_index.shards.0.index.files.reused: 0}
   59   - gte:   { test_index.shards.0.index.size.reused_in_bytes: 0}