def perform_backup(self, name, drivename): if not self.is_drive_mounted(drivename): raise UnMountedError, "Drive %s not mounted." % drivename diropt = "%s_path" % name srcdir = config.get("portacopy", diropt) destdir = self._destdir(drivename, name) pdest = os.path.dirname(destdir) if not os.path.isdir(pdest): os.makedirs(pdest) return portacopy.backup_directory(srcdir, destdir)
def get_uuid(self, drivename): option = "%s_uuid" % drivename return config.get("portacopy", option)