def _get_restore_runner(self, backup_type): """Returns the RestoreRunner associated with this backup type.""" try: runner = get_restore_strategy(backup_type, CONF.restore_namespace) except ImportError: raise UnknownBackupType("Unknown Backup type: %s" % backup_type) return runner
def _get_restore_runner(self, backup_type): """Returns the RestoreRunner associated with this backup type.""" try: runner = get_restore_strategy(backup_type, CONF.restore_namespace) except ImportError: raise UnknownBackupType("Unknown Backup type: %s" % backup_type) return runner
def _get_restore_runner(self, backup_type): """Returns the RestoreRunner associated with this backup type.""" try: runner = get_restore_strategy(backup_type, RESTORE_NAMESPACE) except ImportError: raise UnknownBackupType("Unknown Backup type: %s in namespace %s" % (backup_type, RESTORE_NAMESPACE)) return runner
def _get_restore_runner(self, backup_type): """Returns the RestoreRunner associated with this backup type.""" try: runner = get_restore_strategy(backup_type, RESTORE_NAMESPACE) except ImportError: raise UnknownBackupType("Unknown Backup type: %s in namespace %s" % (backup_type, RESTORE_NAMESPACE)) return runner
def _get_restore_runner(self, backup_type): """Returns the RestoreRunner associated with this backup type.""" try: runner = get_restore_strategy(backup_type, RESTORE_NAMESPACE) except ImportError: raise UnknownBackupType(_("Unknown Backup type: %(type)s in " "namespace %(ns)s") % {"type": backup_type, "ns": RESTORE_NAMESPACE}) return runner
def _create_restore_strategy(self): from trove.guestagent.strategies import restore restore_strategy = restore.get_restore_strategy("InnoBackupEx", "trove.patch.guestagent.strategies.restore.impl") print restore_strategy mysql_dir = CONF.mount_point backup_dir = CONF.ebs_backup_path restore_strategy.is_zipped = False restore_strategy.is_encrypted = False _bk = restore_strategy(None,restore_location=mysql_dir,backup_location=backup_dir) print _bk.restore_cmd print _bk.prepare_cmd return _bk