[Pybackpack] pybackpack thoughts and future

Andrew Price andy at andrewprice.me.uk
Sat Aug 25 18:17:41 BST 2007


On 23/08/07 03:12, Andrew Price wrote:
> On 22/08/07 14:51, seth vidal wrote:
>> So pybackpack would definitely need a backup-set abstraction that
>> doesn't include the rdiff-interface.
> 
> It's been on my lengthy todo list for a while, but now's a good time...
> 
> I've made a start on this by committing backupsets.py to svn. In this
> module, the classes BackupSet and BackupSets are defined so the
> following code now "works":
> 
> import backupsets
> backups = backupsets.BackupSets("/home/andy/.pybackpack")
> for backup in backups:
>     print backup.name
>     print backup.files_include
>     print backup.files_exclude
>     print backup.desc
>     backup.files_include.append('/some/file/I/want')
>     backup.write()
> 
> I'll make this less buggy and start using it in the other modules soon.

This is pretty much complete in svn now (could do with some more
testing). Currently backup destination settings are being passed around
as pseudo-URL strings so I think the next job will be to create similar
Destination and/or Destinations classes to pass around details of backup
destinations easier. This should allow the rdiff-backup stuff to be
modularised so that we can call it like:

method = rdiff_interface.BackupMethod()
method.add_progress_hook(somefunction)
try:
   method.runbackup(backupset, dest)
except BackupFailure, e:
   # Report failure

After that it should be pretty simple to modularise other backup methods.

Thoughts?

--
Andy Price
http://andrewprice.me.uk




More information about the pybackpack mailing list