VK Cloud logo

Downloading a copy via the management console

You can download VM disk backups not only via the management console but also with OpenStack CLI and API.

1. Download the copy files

  1. Go to your VK Cloud management console.

  2. Go to Cloud Backup → Backup.

  3. Open the required list of backup copies and select the copies to download.

    1. Go to the Automatic tab.

    2. Click the name of the required plan, or click  for the plan and select View backups.

    3. Click the name of the required instance or the  icon.

    4. Select the copies to download.

      The copy name contains the disk name, the creation date and time (UTC), and the copy type: full or incremental. For example, CentOS_Basic-1-1_10GB_03.10.2022_16:39_UTC_full. The copy type is shown in the Backups column. You can also determine it by the suffix in the name:

      • For full copies (the _full suffix), download only this copy.
      • For incremental copies (the _incremental suffix), download the entire chain. It includes the base full copy and all incremental copies after it, up to the one you need.
  4. Click  for the required copy and select Download archive.

  5. Download all five files for each copy.

    The name of each file contains the same copy ID, which is the UUID of the backup in the Cinder service. You can use it to determine the size of the source disk via OpenStack CLI. Only the file type differs:

    • content
    • object_segments
    • volume_segments
    • sha_list
    • volume_metadata

    For more information, see Migrating VM disk backups outside VK Cloud.

  6. Wait for the download to finish.

  7. If the VM has several disks, repeat these steps for the copies of each disk.

2. Prepare the files for verification

  1. Move the files of each copy to a separate folder.

    If the name of a copy file includes an ID, remove it so that each file name contains only the file type:

    • content
    • object_segments
    • volume_segments
    • sha_list
    • volume_metadata

    The verification looks for files with these names. You can name the folders as you like. When you assemble the copy, specify the folders in the order of the chain: from the full copy to the latest incremental copy.

  2. Go to Cloud Servers → Disks and make note of the size in GB of the disk whose copy you downloaded. You will need it for the assembly.

    The Volume column in the list of backups shows the size of the copy, not the disk. Do not use it for the assembly.

3. Verify the downloaded files

  1. Make sure that the folder of each copy contains all five files (content, object_segments, volume_segments, sha_list, and volume_metadata). To do this, run the command:

    ls -l ./<COPY_FOLDER>/

    Here <COPY_FOLDER> is the folder that contains the backup copy files.

  2. If the content file was downloaded in parts (content1, content2, and so on), join them via natural sorting:

    cat $(ls ./<COPY_FOLDER>/content[0-9]* | sort -V) > ./<COPY_FOLDER>/content

    Here <COPY_FOLDER> is the folder that contains the backup copy files.

  3. Make sure that the content file was downloaded completely. To do this, take the last element in the object_segments file. Compare the sum of object_offset and object_length with the size of the content file:

    python3 -I - <<'EOF'import json, osd = "./<COPY_FOLDER>"seg = json.load(open(os.path.join(d, "object_segments")))last = seg[-1]print("by map:", last["object_offset"] + last["object_length"],      "file:", os.path.getsize(os.path.join(d, "content")))EOF

    Here <COPY_FOLDER> is the folder that contains the backup copy files.

    If the numbers do not match, the file was not downloaded completely. Download the copy again.

Was this article helpful?