def restore(self): assert self.path assert self.tag for member in archivate.filter_members(self.archive, self.tag): member.name = member.name.split("/", 1)[-1] self.archive.extract(member, self.path)
def restore(self): for member in archivate.filter_members(self.archive, self.name): if os.path.isfile(self.path): path, member.name = os.path.split(self.path) else: member.name = member.name.split("/", 1)[-1] path = self.path self.archive.extract(member, path)
def restore(self): assert self.container assert self.backup_directory for member in archivate.filter_members(self.archive, self.container): dump = self.archive.extractfile(member.name).read() name = member.name.split("/", 1)[-1] docker.write_data_in_docker_file( self.container, os.path.join(self.backup_directory, name), dump)
def restore(self): assert self.container assert self.backup_directory for member in archivate.filter_members(self.archive, self.container): dump = self.archive.extractfile(member.name).read() name = member.name.split("/", 1)[-1] docker.write_data_in_docker_file( self.container, os.path.join(self.backup_directory, name), dump )
def pre_restore_check(self): members = list(archivate.filter_members(self.archive, self.name)) if os.path.isfile(self.path) and len(members) > 1: raise Exception("try to restore in file more than 1 member")
def restore(self): networks_member = next(archivate.filter_members( self.archive, self.backup_name), None) if networks_member is not None: super(AdminNetworks, self).restore() puppet.apply_task("dhcp-ranges")
def restore(self): assert self.backup_name assert self.backup_directory for member in archivate.filter_members(self.archive, self.backup_name): member.name = member.name.partition(os.path.sep)[-1] self.archive.extract(member, self.backup_directory)