google-compute-engine,ubuntu-16.04,disk-image,clone"/>
  • 7
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I created a machine image on GCE from a running ubuntu VM which has an "additional" disk available to be mounted. That disk is mounted for backups, then dismounted, and was not mounted at the time the machine image was made.

Some time later (cron job), the additional disk was mounted, a backup written, and then dismounted. Manually mounting the disk shows the new backup file.

I later created a new VM from the machine image. When I start that VM and mount the backup disk, it does not show the last backup file written. If I look at the disks for this project in the console, I see two new disks -- the one for the boot disk clone from the machine image, and another for the "additional" disk.

This seems to imply that creating a machine image also creates an image of any "additional" disks available to the VM, even if they are not mounted. Is there a way to create a machine image without also cloning unmounted disks, without dis-associating the disks from the original VM?

Unmounting a disk sometimes is not a cold backup.

Remove extra disks from the source instance. You said you didn't want to, but those are not necessary to make a copy.

Snapshot the source disk, mount the snapshot as a new disk on a different instance that does backups, and copy the disk image somewhere else like archival blob storage. GCP docs outline an implementation of this under exporting an image manually. Which will need to be enhanced to make a robust backup script that meets your recovery point objective.

Some third party backup software has already scripted backing up a wide variety of data into GCP Cloud Storage. Consider these for backing up data both inside and out of GCP, or other more complex use cases.

  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags