doc-exports/docs/evs/dev/evs_03_0006.html
Zaoxu, Li 305c41bb57 EVS 2.0.38 SP1 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com>
Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
2022-10-19 22:27:18 +00:00

113 lines
6.8 KiB
HTML

<a name="evs_03_0006"></a><a name="evs_03_0006"></a>
<h1 class="topictitle1">Creating an EVS Snapshot</h1>
<div id="body1540283101101"><div class="section" id="evs_03_0006__section1063418559011"><h4 class="sectiontitle">Scenarios</h4><p id="evs_03_0006__p58789484121">You can create an EVS snapshot on the management console to save the disk data at a specific time point.</p>
</div>
<div class="section" id="evs_03_0006__section28146133118"><h4 class="sectiontitle">Constraints</h4><p id="evs_03_0006__p139166352615">A maximum of 7 snapshots can be created for an EVS disk.</p>
</div>
<div class="section" id="evs_03_0006__section1531361811311"><h4 class="sectiontitle">Involved APIs</h4><p id="evs_03_0006__p33281854345">Query the disk list, obtain the ID of the target disk, and then create the snapshot.</p>
<p id="evs_03_0006__p73251180314">To meet the preceding requirements, call the following APIs:</p>
</div>
<ul id="evs_03_0006__ul1325151816318"><li id="evs_03_0006__li1259991315119">Query EVS disks.</li><li id="evs_03_0006__li1966105613286">Create an EVS snapshot.</li></ul>
<div class="section" id="evs_03_0006__section16886203916519"><h4 class="sectiontitle">Procedure</h4><ol id="evs_03_0006__ol081544055118"><li id="evs_03_0006__li581684015116">Query EVS disks.<ul id="evs_03_0006__evs_03_0004_ul118162040125112"><li id="evs_03_0006__evs_03_0004_li158161740155110">API information<p id="evs_03_0006__evs_03_0004_p670222213411"><a name="evs_03_0006__evs_03_0004_li158161740155110"></a><a name="evs_03_0004_li158161740155110"></a>URI format: GET /v3/{project_id}/volumes</p>
<p id="evs_03_0006__evs_03_0004_p116419475511">For details, see <strong id="evs_03_0006__evs_03_0004_b842352706154153">OpenStack Cinder API v3</strong> &gt; <strong id="evs_03_0006__evs_03_0004_b84235270615422">EVS Disk</strong> &gt; <strong id="evs_03_0006__evs_03_0004_b842352706154211">Querying EVS Disks</strong> in the <em id="evs_03_0006__evs_03_0004_i886446318154217">Elastic Volume Service API Reference</em>.</p>
</li><li id="evs_03_0006__evs_03_0004_li17816340125118">Example request<p id="evs_03_0006__evs_03_0004_p31824912620"><a name="evs_03_0006__evs_03_0004_li17816340125118"></a><a name="evs_03_0004_li17816340125118"></a>GET /v3/000efdc5f9064584b718b181df137bd7/volumes</p>
</li><li id="evs_03_0006__evs_03_0004_li4816124025117">Example response<pre class="screen" id="evs_03_0006__evs_03_0004_screen1656613210549">{
"volumes": [
{
"id": "6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
"links": [
{
"href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
"rel": "self"
},
{
"href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
"rel": "bookmark"
}
],
"name": "zjb_u25_test"
},
{
"id": "2bce4552-9a7d-48fa-8484-abbbf64b206e",
"links": [
{
"href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/2bce4552-9a7d-48fa-8484-abbbf64b206e",
"rel": "self"
},
{
"href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/2bce4552-9a7d-48fa-8484-abbbf64b206e",
"rel": "bookmark"
}
],
"name": "zjb_u25_test"
},
{
"id": "3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
"links": [
{
"href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
"rel": "self"
},
{
"href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
"rel": "bookmark"
}
],
"name": "zjb_u25_test"
}
],
"volumes_links": [
{
"href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes?limit=3&amp;marker=3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
"rel": "next"
}
]
}</pre>
</li></ul>
</li><li id="evs_03_0006__li17817114010516">Create the snapshot.<ul id="evs_03_0006__ul481784055111"><li id="evs_03_0006__li5817940105111">API information<p id="evs_03_0006__p75101049862"><a name="evs_03_0006__li5817940105111"></a><a name="li5817940105111"></a>URI format: POST /v3/{project_id}/snapshots</p>
<p id="evs_03_0006__p19381155416718">For details, see <strong id="evs_03_0006__b842352706154153">OpenStack Cinder API v3</strong> &gt; <strong id="evs_03_0006__b84235270615422">EVS Snapshot</strong> &gt; <strong id="evs_03_0006__b842352706154211">Creating an EVS Snapshot</strong> in the <em id="evs_03_0006__i886446318154217">Elastic Volume Service API Reference</em>.</p>
</li><li id="evs_03_0006__li18176402515">Example request<p id="evs_03_0006__p08548399814"><a name="evs_03_0006__li18176402515"></a><a name="li18176402515"></a>GET /v3/000efdc5f9064584b718b181df137bd7/snapshots</p>
<pre class="screen" id="evs_03_0006__screen0293209191519">{
"snapshot": {
"name": "snap-001",
"description": "Daily backup",
"volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635",
"force": false,
"metadata": { }
}
}</pre>
</li><li id="evs_03_0006__li10817124015112">Example response<pre class="screen" id="evs_03_0006__screen15395132223213">{
"snapshot": {
"status": "creating",
"description": "Daily backup",
"created_at": "2013-02-25T03:56:53.081642",
"metadata": { },
"volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635",
"size": 1,
"id": "ffa9bc5e-1172-4021-acaf-cdcd78a9584d",
"name": "snap-001",
"updated_at": "2013-02-25T03:56:53.081642"
}
}</pre>
<div class="p" id="evs_03_0006__evs_03_0004_p723312591897">or<pre class="screen" id="evs_03_0006__evs_03_0004_screen2699535114213">{
"error": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</div>
<div class="p" id="evs_03_0006__evs_03_0004_p92381159293">In the preceding example, <strong id="evs_03_0006__b842352706143959">error</strong> indicates a general error, for example, <strong id="evs_03_0006__b842352706144438">badRequest</strong> or <strong id="evs_03_0006__b842352706144454">itemNotFound</strong>. An example is provided as follows:<pre class="screen" id="evs_03_0006__evs_03_0004_screen5305191315435">{
"badRequest": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</div>
</li></ul>
</li></ol>
</div>
</div>
<div></div>