def run(cls, info): loopback_backup_name = 'volume-{id}.{ext}.backup'.format(id=info.run_id, ext=info.volume.extension) destination = os.path.join(info.manifest.bootstrapper['workspace'], loopback_backup_name) with unmounted(info.volume): copyfile(info.volume.image_path, destination) msg = 'A copy of the bootstrapped volume was created. Path: ' + destination log.info(msg)
def run(cls, info): snapshot = None with unmounted(info.volume): snapshot = info.volume.snapshot() msg = 'A snapshot of the bootstrapped volume was created. ID: ' + snapshot.id log.info(msg)