← Back to team overview

holland-discuss team mailing list archive

Re: Generic copy backup plugin?

 

Ah I didn't think of having a set of options - that's a good idea. Indeed I'll keep playing around with it and let you know if I have any feedback, though it's already pretty nifty! I'll take the new changes for a spin probably tomorrow. Nice work Andy!

Tim

On Jan 18, 2011, at 5:55 PM, Andrew Garner wrote:

> Yeah, estimation is ugly :)   I updated it with a simple workaround
> where you can specify a directory, constant size or command outputting
> the size on stdout for the size estimation instead.   In your case you
> should be able to use dir:/var/lib/ldap/, or you can do something
> fancy with a shell command.
> 
> Feel free to fork and hack on that if you want to add something.
> If/when it's useful I'll merge it back into mainline.
> 
> ~Andy
> 
> On Tue, Jan 18, 2011 at 3:17 PM, Tim Soderstrom
> <tim@xxxxxxxxxxxxxxxxxxxxx> wrote:
>> Looks pretty cool, Andy! Took a look at the source and it's definitely more Pro than I could do :) Ran a simple test using 'slapcat' and it works:
>> 
>> root@domainator:~/holland-test/etc/holland/backupsets# holland bk script
>> Holland 1.0.5 started with pid 2948
>> --- Starting backup run ---
>> Failed to load config for provider u'script' (Config file not found: "/root/holland-test/etc/holland/providers/script.conf".)
>> Acquired lock /root/holland-test/etc/holland/backupsets/script.conf : '/root/holland-test/etc/holland/backupsets/script.conf'
>> Creating backup path env/var/spool/holland/script/20110117_150140
>> Estimated Backup Size: 1.00B
>> Starting backup[script/20110117_150140] via plugin script
>> + slapcat | gzip -1 > env/var/spool/holland/script/20110117_150140/slapcat.ldif.gz
>> ::
>> Final on-disk backup size 242.07KB
>> 24787500.00% of estimated size 1.00B
>> Backup completed in 0.14 seconds
>> No backups purged
>> Released lock /root/holland-test/etc/holland/backupsets/script.conf
>> --- Ending backup run ---
>> 
>> The 24787500% bit gave me a chuckle. Wish there was a way to express that. I don't think it would work well with the current framework but in a plugin like this, having a command you could pass to do the estimation would be cool. For the above example, to estimate the size off the top of my head I would have done "du -sc /var/lib/ldap | tail -n1 | awk {'print $1'}" so having a callable mechanism for that would be pretty neat.
>> 
>> On Jan 15, 2011, at 11:30 AM, Andrew Garner wrote:
>> 
>>> I opened a blueprint for the generic script plugin here:
>>> 
>>> https://blueprints.launchpad.net/holland-backup/+spec/script-plugin
>>> 
>>> I had thrown together a prototype yesterday morning which I've published here:
>>> 
>>> https://github.com/abg/holland-script
>>> 
>>> ~Andy
>>> 
>> 
>> 
> 




References