"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "freezer/job.py" between
freezer-9.0.0.tar.gz and freezer-10.0.0.tar.gz

About: OpenStack Freezer is a tool to automate (incremental) data backup and restore process using OpenStack Swift and/or other media storage.
The "Wallaby" series (latest release).

job.py  (freezer-9.0.0):job.py  (freezer-10.0.0)
skipping to change at line 480 skipping to change at line 480
else: else:
raise ConsistencyCheckException( raise ConsistencyCheckException(
"Backup Consistency Check failed: backup checksum " "Backup Consistency Check failed: backup checksum "
"({0}) and restore checksum ({1}) did not match.". "({0}) and restore checksum ({1}) did not match.".
format(backup_checksum, restore_checksum.checksum)) format(backup_checksum, restore_checksum.checksum))
except OSError as e: except OSError as e:
raise ConsistencyCheckException( raise ConsistencyCheckException(
"Backup Consistency Check failed: could not checksum file" "Backup Consistency Check failed: could not checksum file"
" {0} ({1})".format(e.filename, e.strerror)) " {0} ({1})".format(e.filename, e.strerror))
return {} return {}
res = restore.RestoreOs(conf.client_manager, conf.container,
self.storage) elif conf.backup_media == 'nova':
if conf.backup_media == 'nova':
if self.conf.project_id: if self.conf.project_id:
return self.engine.restore_nova_tenant( return self.engine.restore_nova_tenant(
project_id=self.conf.project_id, project_id=self.conf.project_id,
hostname_backup_name=self.conf.hostname_backup_name, hostname_backup_name=self.conf.hostname_backup_name,
overwrite=conf.overwrite, overwrite=conf.overwrite,
recent_to_date=restore_timestamp) recent_to_date=restore_timestamp)
elif conf.nova_inst_id: elif conf.nova_inst_id:
LOG.info("Restoring nova backup. Instance ID: {0}, " LOG.info("Restoring nova backup. Instance ID: {0}, "
"timestamp: {1} network-id {2}".format( "timestamp: {1} network-id {2}".format(
skipping to change at line 558 skipping to change at line 557
hostname_backup_name = os.path.join( hostname_backup_name = os.path.join(
self.conf.hostname_backup_name, image_id) self.conf.hostname_backup_name, image_id)
self.engine.restore( self.engine.restore(
hostname_backup_name=hostname_backup_name, hostname_backup_name=hostname_backup_name,
restore_resource=image_id, restore_resource=image_id,
overwrite=conf.overwrite, overwrite=conf.overwrite,
recent_to_date=restore_timestamp, recent_to_date=restore_timestamp,
backup_media=conf.mode) backup_media=conf.mode)
elif conf.backup_media == 'cinder': elif conf.backup_media == 'cinder':
res = restore.RestoreOs(conf.client_manager, conf.container,
self.storage)
if conf.cinder_vol_id: if conf.cinder_vol_id:
LOG.info("Restoring cinder backup from glance. " LOG.info("Restoring cinder backup from glance. "
"Volume ID: {0}, timestamp: {1}".format( "Volume ID: {0}, timestamp: {1}".format(
conf.cinder_vol_id, conf.cinder_vol_id,
restore_timestamp)) restore_timestamp))
res.restore_cinder_by_glance(conf.cinder_vol_id, res.restore_cinder_by_glance(conf.cinder_vol_id,
restore_timestamp) restore_timestamp)
else: else:
for instance_id in self.cinder_vol_ids: for instance_id in self.cinder_vol_ids:
LOG.info("Restoring cinder backup from glance. " LOG.info("Restoring cinder backup from glance. "
"Volume ID: {0}, timestamp: {1}".format( "Volume ID: {0}, timestamp: {1}".format(
instance_id, restore_timestamp)) instance_id, restore_timestamp))
res.restore_cinder_by_glance(instance_id, res.restore_cinder_by_glance(instance_id,
restore_timestamp) restore_timestamp)
elif conf.backup_media == 'cindernative': elif conf.backup_media == 'cindernative':
res = restore.RestoreOs(conf.client_manager, conf.container,
self.storage)
LOG.info("Restoring cinder native backup. Volume ID {0}, Backup ID" LOG.info("Restoring cinder native backup. Volume ID {0}, Backup ID"
" {1}, timestamp: {2}".format(conf.cindernative_vol_id, " {1}, timestamp: {2}".format(conf.cindernative_vol_id,
conf.cindernative_backup_id, conf.cindernative_backup_id,
restore_timestamp)) restore_timestamp))
res.restore_cinder(conf.cindernative_vol_id, res.restore_cinder(conf.cindernative_vol_id,
conf.cindernative_backup_id, conf.cindernative_backup_id,
restore_timestamp) restore_timestamp)
elif conf.backup_media == 'cinderbrick': elif conf.backup_media == 'cinderbrick':
LOG.info("Restoring cinder backup using os-brick. Volume ID {0}, " LOG.info("Restoring cinder backup using os-brick. Volume ID {0}, "
"timestamp: {1}".format(conf.cinderbrick_vol_id, "timestamp: {1}".format(conf.cinderbrick_vol_id,
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)