import imp backupmanager=imp.load_source("BackupManager","/usr/share/n4d/python-plugins/support/BackupManager.py") class MoodleManager: def __init__(self): self.moodle=backupmanager.BackupManager(app='moodle') moodleFiles={} moodleDbFiles={'moodle':['/etc/moodle/debian-db.php']} moodleDirs={'moodle':['/var/lib/moodle']} self.moodle.set_app_files(moodleFiles) self.moodle.set_app_dbFiles(moodleDbFiles) self.moodle.set_app_dirs(moodleDirs) def restore(self,file_path=None): self.moodle.set_backup_name("MoodleManager") retVal=self.moodle.restore(file_path) return retVal def backup(self,dir="/backup"): self.moodle.set_backup_name(get_backup_name("MoodleManager")) retVal=self.moodle.backup(dir) return retVal