Beispiel #1
0
def backup(machine):
    cfg = UmlConfig(machine)
    basefile = cfg['basefile']
    backup = UmlChroot(cfg)
    backup.set_targetimage(basefile)
    backup.options['backup_target'] = machine
    backup.options['paella_action'] = 'backup'
    backup.run_uml()
Beispiel #2
0
def extract(tarball, basefile=None, size=None):
    cfg = UmlConfig()
    u = UmlChroot(cfg)
    u.options['paella_system_tarball'] = tarball
    u.options['paella_action'] = 'extract'
    u.options['devfs'] = 'mount'
    u.set_targetimage(basefile)
    if size is None:
        size = cfg['basefile_size']
    create_sparse_file(basefile, size=size)
    u.run_uml()
Beispiel #3
0
 def backup_machine(self, basefile=None):
     self._check_current()
     machine = self.current
     cfg = self._make_config(machine)
     chroot = UmlChroot(cfg)
     if basefile is None:
         basefile = self._get_basefile(cfg, machine)
     chroot.set_targetimage(basefile)
     chroot.options['backup_target'] = machine
     chroot.options['paella_action'] = 'backup'
     chroot.run_uml()