Hi Ana

Its a possibility although the estimate doesn't seem to factor in compression 
(not an issue for me) or the volume overhead.

I guess we could always allocate one extra volume to cover this and then at the 
end remove any unused volumes.


I tried post processing (renaming the file and catalog entry) but the volume 
name is also held internally in the volume headers and checked during restore - 
changing this value messes up the checksums which are also checked. I've 
currently gone for using extended attributes to provide additional volume 
metadata.


Regards

Steve




________________________________
From: Ana Emília M. Arruda <emiliaarr...@gmail.com>
Sent: 22 April 2015 18:01
To: Steve Lee
Cc: bacula-de...@lists.sourceforge.net; bacula-users@lists.sourceforge.net
Subject: Re: [Bacula-devel] [Bacula-users] Python in bacula 7 - dynamically 
assign volume names

Hi Steve,

Would you like to try a shell script in a RunBeforeJob directive? Maybe this 
should work:

#!/bin/bash
#
# Usage: myscript.sh "MyBackupJob"

JOB=$1
BCONSOLE="/pathtoyourbconsole/bconsole"
MYSTORAGE="myStorage"
MYPOOL="myPool"
BYTES=$(echo estimate job=$JOB | $BCONSOLE)
GBYTES=$(echo ${BYTES#*bytes=} | sed 's/,//g')
VOLS=$((GBYTES/(1024*1024*1024)))
for ((i=0;i<=VOLS;i++) do
  echo label storage=$MYSTORAGE volume=$LABEL$i pool=$MYPOOL | $BCONSOLE | grep 
"already exists" > /dev/null
  if [ $? -eq 0 ]; then
     printf "Volume %s already exists.\n" $LABEL$i
     exit 1
  fi
done
exit $?

This should be enhanced. And it will be necessary to make sure labels are 
unique for the script (maybe using PoolID+MeidaId).

Best regards,
Ana


On Wed, Apr 22, 2015 at 2:09 AM, Steve Lee 
<steve....@zynstra.com<mailto:steve....@zynstra.com>> wrote:

I think I'm going to revert to bacula 5 for now. Anyone know why python was 
dropped?

On 21 Apr 2015 10:07, Steve Lee 
<steve....@zynstra.com<mailto:steve....@zynstra.com>> wrote:

Thanks for your reply Ana


I guess that could work if I required a single Volume but I limit my volume 
sizes to 1GB (files) for operational reasons and typically require multiple 
volumes but I don't know in advance how many. I suppose I could create multiple 
volumes in advance and after delete any unused.


I always ensure that there volumes are automatically allocated as required and 
are never reused between jobs. Thee first one is allocated when the job starts 
and others as each becomes full.​ The content of the backup can vary according 
to some run before scripts and I would like the volume names to reflect that.


It was easy to do this with python scripting but we are in the process of 
upgrading to bacula 7 where that isn't supported.


Regards

Steve



________________________________
From: Ana Emília M. Arruda 
<emiliaarr...@gmail.com<mailto:emiliaarr...@gmail.com>>
Sent: 20 April 2015 17:53
To: Steve Lee
Cc: 
bacula-users@lists.sourceforge.net<mailto:bacula-users@lists.sourceforge.net>; 
bacula-de...@lists.sourceforge.net<mailto:bacula-de...@lists.sourceforge.net>
Subject: Re: [Bacula-users] Python in bacula 7 - dynamically assign volume names

Hi Steve,

Maybe a shell script in a RunBeforeJob directive? You can test with "list 
nextvol" if there is an available volume and if not instruct Bacula to label 
one (and the label you can create it for your own in your shell script).
Could you be more specific about "allocate volume names at run time"? Should 
they be allocated before the job starts running or during a the job runs in the 
case it needs a volume and cannot find any available?

Best regards,
Ana

On Mon, Apr 20, 2015 at 1:25 PM, Steve Lee 
<steve....@zynstra.com<mailto:steve....@zynstra.com>> wrote:

OK - I found in the release notes for 7.0.0

The following features or directives have been removed:
- Win32
- tray-monitor
- wx_console
- Removed cats DBI driver
- Python

So I assume this means python scripting is no longer supported.


If this is the case is there an alternative mechanism for dynamically set 
volume names?


​Label Format doesn't quite do it because it is limited to specific bacula 
variables or environment variables set during director startup and I need to 
allocate volume names at run time.


Thanks


Steve



________________________________
From: Steve Lee
Sent: 20 April 2015 10:08
To: bacula-users; bacula-devel
Subject: Python in bacula 7

HI

Does anyone know whether python scripting is supported in 7.0.5?
I could see that --with-python is no longer a valid configuration option.

Regards

Steve Lee

________________________________________
From: Kern Sibbald <k...@sibbald.com<mailto:k...@sibbald.com>>
Sent: 11 September 2011 10:31
To: bacula-users; bacula-devel
Subject: [Bacula-devel] [Bacula-users] Bacula Conference in September

Hello,

This is just a reminder concerning the Bacula conference on September
21th 2011.
Registrations coming in every day, but there is a limit of 60 seats.

So, if you are interested in attending, please hurry to sign up at
following the link:

http://www.bacula-konferenz.de/

This is an excellent opportunity to meet and discuss with other Bacula users
as well as to learn what the Bacula Roadmap is.

Also, if you would like to submit a paper, there is still one slot free.

I am looking forward to being there and to meeting you there too.

Best regards,

Kern

------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Bacula-devel mailing list
bacula-de...@lists.sourceforge.net<mailto:bacula-de...@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Zynstra is a private limited company registered in England and Wales 
(registered number 07864369). Our registered office and Headquarters are at The 
Innovation Centre, Broad Quay, Bath, BA1 1UD. This email, its contents and any 
attachments are confidential. If you have received this message in error please 
delete it from your system and advise the sender immediately.

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/bacula-users



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to