예제 #1
0
파일: base.py 프로젝트: gardlt/fuel-octane
    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)
예제 #2
0
파일: base.py 프로젝트: rmoe/fuel-octane
    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)
예제 #3
0
파일: base.py 프로젝트: rmoe/fuel-octane
 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)
예제 #4
0
파일: base.py 프로젝트: gardlt/fuel-octane
 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)
예제 #5
0
 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)
예제 #6
0
파일: base.py 프로젝트: rmoe/fuel-octane
 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
         )
예제 #7
0
파일: base.py 프로젝트: rmoe/fuel-octane
 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")
예제 #8
0
파일: base.py 프로젝트: gardlt/fuel-octane
 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")
예제 #9
0
 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")
예제 #10
0
 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)