Re: make DLE wait for a job

2017-02-13 Thread Stefan G. Weichinger
Am 2017-02-13 um 21:18 schrieb J Chapman Flack:
> On 02/13/2017 02:47 PM, Debra S Baddorf wrote:
> 
>>> If that would work per DLE it would be nice.
>>> Something like a dumptype-parameter ;-)
> 
>> Yes, that’s a built in thing,  but yes it affects the whole dump run.
> 
> I might suggest an addition to the Script API so that a
> pre-dle-estimate or pre-dle-backup script can report back
> a special status (like "try again in N minutes").
> 
> Then it'd be easy to just write a script for a particular DLE
> that will check whatever is appropriate, and decide when to
> proceed.

I agree.

Aside that I found a more advanced fork of the virt-backup-script with
an interesting approach:

https://github.com/vazhnov/virt-backup.pl

The dev there adds some feature to mount the LV-snapshot via the chunkfs
binary so that the backup program is able to dump it chunk by chunk.

I have no experience with chunkfs and a quick google doesn't make me
feel as if that fs would be very commonly used these days.

nice approach, though.

He also has added an option to add the date to the dumped backup. Adds
possibilities as well.

--

The coolest solution would be to somehow convert this outdated
virt-backup.pl into an amanda application, right? ;-)

Unfortunately I am not cool enough to do that, afaik.

I think the easiest trick will be to add some move or link to the script:

after dd is done, link the new images to something like
"amanda_vmX_diskY.img" and edit the DLE to include those only.

Although this isn't perfect yet: this wouldn't make amdump *wait* for
todays dump, but sometimes dump yesterday's virt-backup and the other
day dump the virt-backup from today.

-

The suggested enhancement with a "wait for n minutes" would be way nicer.



Re: make DLE wait for a job

2017-02-13 Thread J Chapman Flack
On 02/13/2017 02:47 PM, Debra S Baddorf wrote:

>> If that would work per DLE it would be nice.
>> Something like a dumptype-parameter ;-)

> Yes, that’s a built in thing,  but yes it affects the whole dump run.

I might suggest an addition to the Script API so that a
pre-dle-estimate or pre-dle-backup script can report back
a special status (like "try again in N minutes").

Then it'd be easy to just write a script for a particular DLE
that will check whatever is appropriate, and decide when to
proceed.

-Chap



Re: make DLE wait for a job

2017-02-13 Thread Debra S Baddorf

> On Feb 13, 2017, at 1:42 PM, Stefan G. Weichinger  wrote:
> 
> Am 2017-02-13 um 20:30 schrieb Debra S Baddorf:
> 
>> re:  Lockfile:   if you put a file named   “hold”  in your config directory, 
>>  amanda
>> will wait until it is gone.I have my ARCHIVE script  put a hold file in 
>> the DAILY directory,
>> so that the daily waits until archive is done:
>> 
>> touch $HOME/amanda/configs/daily/hold
>> 
>> rm -f $HOME/amanda/configs/daily/hold
>> 
>>  (Or wherever you keep YOUR config files.   My “configs”  directory is a 
>> pointer to the real
>> place,   /usr/local/etc/amanda  for me.
> 
> nice suggestion, but as I understand it it pauses the whole amdump run,
> and not only dumping one specific DLE.
> 
> If that would work per DLE it would be nice.
> Something like a dumptype-parameter ;-)
> 
> thanks
> 


Yes, that’s a built in thing,  but yes it affects the whole dump run.

Deb


Re: make DLE wait for a job

2017-02-13 Thread Stefan G. Weichinger
Am 2017-02-13 um 16:29 schrieb Jon LaBadie:

> Would it be unreasonable to leave unfinished virt-backups
> til the next amdump?  If not, make sure they unique names
> or time-stamps.  Do the virt-backups to a ?.tmp name
> that is excluded by amanda.  Renam the ?.tmp backup
> upon completion.

2nd suggestion sounds good.
I will have a look at the script and try to come up with some patch.

The original project I cloned from is unchanged for years:

https://github.com/syndicut/virt-backup

But the backups work fine for me (aside from the current timing issue).



Re: make DLE wait for a job

2017-02-13 Thread Debra S Baddorf

> On Feb 13, 2017, at 2:46 AM, Stefan G. Weichinger  wrote:
> 
> 
> (didn't show up on the ml, so I re-send)
> 
> is there any good trick to do this:
> 
> on amanda-client-host I run backups of VMs to tarballs (using
> virt-backup and LVM)
> 
> in my amanda config I have DLEs pointing at the generated tarballs
> 
> Now it happens that the virt-backup isn't fully done when amanda already
> wants to dump the DLEs -> this results in invalid backups!
> 
> I know, I could schedule amdump *after* all the virt-backups are done,
> but I would like to optimize that: amdump should be able to dump other
> DLEs in parallel already.
> 
> One solution would be to use the starttime parameter?
> Rather static.
> 
> plan B: make virt-backup create some lock-file during its runs and make
> the amanda DLE wait to be dumped until after that virt-backup lock file
> has been removed.
> 
> Does anyone of you already have such a setup running?


re:  Lockfile:   if you put a file named   “hold”  in your config directory,  
amanda
will wait until it is gone.I have my ARCHIVE script  put a hold file in the 
DAILY directory,
so that the daily waits until archive is done:

touch $HOME/amanda/configs/daily/hold

rm -f $HOME/amanda/configs/daily/hold

  (Or wherever you keep YOUR config files.   My “configs”  directory is a 
pointer to the real
place,   /usr/local/etc/amanda  for me.

Deb Baddorf
Fermilab


Re: make DLE wait for a job

2017-02-13 Thread Jon LaBadie
On Mon, Feb 13, 2017 at 09:46:00AM +0100, Stefan G. Weichinger wrote:
> 
> (didn't show up on the ml, so I re-send)
> 
> is there any good trick to do this:
> 
> on amanda-client-host I run backups of VMs to tarballs (using
> virt-backup and LVM)
> 
> in my amanda config I have DLEs pointing at the generated tarballs
> 
> Now it happens that the virt-backup isn't fully done when amanda already
> wants to dump the DLEs -> this results in invalid backups!
> 
> I know, I could schedule amdump *after* all the virt-backups are done,
> but I would like to optimize that: amdump should be able to dump other
> DLEs in parallel already.
> 
> One solution would be to use the starttime parameter?
> Rather static.
> 
> plan B: make virt-backup create some lock-file during its runs and make
> the amanda DLE wait to be dumped until after that virt-backup lock file
> has been removed.
> 
> Does anyone of you already have such a setup running?
>>> End of included message <<<

Would it be unreasonable to leave unfinished virt-backups
til the next amdump?  If not, make sure they unique names
or time-stamps.  Do the virt-backups to a ?.tmp name
that is excluded by amanda.  Renam the ?.tmp backup
upon completion.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


make DLE wait for a job

2017-02-13 Thread Stefan G. Weichinger

(didn't show up on the ml, so I re-send)

is there any good trick to do this:

on amanda-client-host I run backups of VMs to tarballs (using
virt-backup and LVM)

in my amanda config I have DLEs pointing at the generated tarballs

Now it happens that the virt-backup isn't fully done when amanda already
wants to dump the DLEs -> this results in invalid backups!

I know, I could schedule amdump *after* all the virt-backups are done,
but I would like to optimize that: amdump should be able to dump other
DLEs in parallel already.

One solution would be to use the starttime parameter?
Rather static.

plan B: make virt-backup create some lock-file during its runs and make
the amanda DLE wait to be dumped until after that virt-backup lock file
has been removed.

Does anyone of you already have such a setup running?