Hi,

04.02.2009 19:13, Dupree, Craig wrote:
> This is starting to get annoying....
> 
> Can the parts of bacula that ask for volume names not arbitrarily
> use atoi on them?

Not easily, no...

> Here is a good example where I want to purge a volume name, since I
> know now the list of volumes that I want to purge and reuse for
> this month's backup set:
> 
> Enter MediaId or Volume name: 000029 sql_get.c:1002 Media record
> MediaId=29 not found.
> 
> In this case, it's only a hassle because MediaId 29 doesn't exist.
> A worse problem occurs when the leading zeros are stripped off of a
> volume name, and the resulting number is a valid MediaId.

The problem is that the requests accepts both MediaId or a Volume 
name. MediaId is always numeric, a volume name is not.

As long as volume names can be numeric, and there is no way to 
distinguish if a MediaId or a volume name is entered, I see no simle 
solution to the problem.

Actually, as most volume names today are non-numeric, I don't think 
this affects enough users to make a fix an urgent thing.

You can, of course, post a proper feature request - preferrably along 
with a potential solution. A solution would have to be compatible to 
todays behaviour, though, as that interface is probably used by 
scripts; thus, requiring qoutes or any other special way to 
distinguish between media id and volume name when entered is probably 
not the best way.

I could imagine some post-input checks, i.e., after the value is 
entered, and it's numerical only, and has leading zeros, see if a 
volume with that MediaId exists. If there isn't one, use the input as 
a volume name.

I'm sure other solutions could be found...

Arno

> Craig
> 
> ------------------------------------------------------------------------------
>  Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use
> existing skills and code to build responsive, highly engaging
> applications that combine the power of local resources and data
> with the reach of the web. Download the Adobe AIR SDK and Ajax docs
> to start building applications today-http://p.sf.net/sfu/adobe-com 
> _______________________________________________ Bacula-users
> mailing list Bacula-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to