.TH "FirstAidKit Backup system" "1" .SH "NAME" firstaidkit-backup .BR .SH "DESCRIPTION" To abstract the plugin developer from lowlevel backup logic, the plugins utilize backup object named self._backups. Developer can use it to backup and restore files and arbitrary chunks of data. The backup system si also thread safe and ensures integrity of the backups, so the developer does not have to care about locks and synchronization. .SH "Requesting a backup storage space" Every plugin has access to self.backups attribute, which is the reference to master backup system instance. Using this attribute to obtain dedicated backup space for the plugin is easy. Just type: self.mybackupspace = self._backups.getBackup(someuniquename) After all work is done, free the storage space using: self._backups.getBackup.closeBackup(someuniquename) .SH "Using the backup space instance" The instance of backup space then gives the plugin access to several methods: .IP "backupPath(self, path, name = None)" Copy the file or directory specified by path do the backup storage and give it the specified name. The name equals to the path by default. .IP "backupValue(self, value, name)" This method makes possible to save arbitrary chunk of data under specified name. .IP "restoreName(self, name, path = None)" Restore backup object specified by it's name to it's original location or to the path if specified. .IP "restorePath(self, path, name = None)" Restore backup object which resided at specified path to it's own original location. If the name is specified, use the object with that name and restore it to the path. .IP "restoreValue(self, name)" Get the data saved under the name from backup storage. .IP "delete(self, name)" Delete backup object with specified name. .IP "cleanup(self)" Cleanup the backup storage space. You shouldn't use this method, the backup system takes care about it. .PP .SH "Developing another backup storage backend" .SH "SEE ALSO" firstaidkit-plugin firstaidkit-reporting http://fedorahosted.org/firstaidkit .SH "AUTHORS" Martin Sivak Joel Granados .SH "BUGS" Please search/report bugs at http://fedorahosted.org/firstaidkit/newticket