[Bacula-users] Re: Feature Requests and Bacula projects

2005-11-25 Thread Alexander Bergolth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/24/2005 05:47 PM, Kern Sibbald wrote:
> I have now added all the Feature Requests that I have received to the 
> projects 
> file, or at least I think I have.  If you submitted a project, and it wasn't 
> rejected, and it isn't in the the file (below), please let me know.
> [...]
> For the moment, I have chosen to work the following projects:
> [...]
> Item 5:   Implement more Python events in Bacula.

Having access to the director's list of currently running (and
eventually the scheduled jobs) from python scripts would be very useful
for me.
This would allow searching for currently running jobs with the same name
on job startup in order to avoid queuing up multiple instances of the
same job.

Cheers,
- --leo
- --
- ---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDhzTjsYaksEkoAQMRAriBAJ0ZShvU0nl5PzruxDDODASIkwQsugCgh8Tb
cfP1naqX9hOJ7IBN0Ka4zw4=
=Hx9L
-END PGP SIGNATURE-


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Re: Mark volume used after a job

2005-12-05 Thread Alexander Bergolth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/05/2005 01:42 PM, Christoph Haas wrote:
> On Monday 05 December 2005 13:28, MaxxAtWork wrote:
>>My wish is that after Bacula terminates a full backup, the volume
>>currently mounted would be marked as used, so that next weekly full
>>would start from a different tape.
> 
> Unfortunately such a feature does not exist. I also requested that some 
> time ago. The workaround I currently use it to set
> 
>  Maximum Volume Jobs = 1
> 
> in the pool. So after a job is done the current volume is not used any 
> more. 
> 
> Since you probably still want multiple incremental backups to go onto the 
> same volume you could consider using a pool for full backups with 
> MaximumVolumeJobs=1 and another pool for incremental backups without this 
> restriction.

And as I like to do the next differential job that follows a full backup
also on a fresh tape, I am running the following SQL after completion of
a full backup:

mark_used() {
  jobname="$1"

  $SQLITE 2>&1 

[Bacula-users] I/O Error on tape, maintainance of DLT1 drives

2006-01-14 Thread Alexander Bergolth

Hi!

Tonight, I got the following I/O error for the first time:
The Drive is a DLT1 tape:
  Vendor: BNCHMARK  Model: DLT1  Rev: 5538
  Type:   Sequential-Access  ANSI SCSI revision: 02

 snipp! 
14-Jan 01:55 samba-sd: Writing spooled data to Volume. Despooling 
536,904,185 bytes ...
14-Jan 01:57 samba-sd: Samba-Homes.2006-01-14_01.05.00 Error: 
block.c:538 Write error at 6:3819 on device "DLT1" (/dev/nst0). 
ERR=Input/output error.
14-Jan 01:57 samba-sd: Samba-Homes.2006-01-14_01.05.00 Error: Error 
writing final EOF to tape. This Volume may not be readable.

dev.c:1553 ioctl MTWEOF error on "DLT1" (/dev/nst0). ERR=Input/output error.
14-Jan 01:57 samba-sd: End of medium on Volume "Weekly-2005-06-12_8" 
Bytes=6,245,922,599 Blocks=96,818 at 14-Jan-2006 01:57.

14-Jan 01:57 samba-dir: Recycled volume "Weekly-2005-04-22_2"
14-Jan 01:57 samba-sd: Please mount Volume "Weekly-2005-04-22_2" on 
Storage Device "DLT1" (/dev/nst0) for Job Samba-Homes.2006-01-14_01.05.00

 snipp! 

This is the dmesg output:
 snipp! 
st0: Error with sense data: <6>st0: Current: sense key: Not Ready
Additional sense: Logical unit not ready, initializing cmd. required
st0: Error 400f4 (sugg. bt 0x0, driver bt 0x0, host bt 0x4).
st0: Error 400f4 (sugg. bt 0x0, driver bt 0x0, host bt 0x4).
[...]
 snipp! 

As I don't have very much experience with DLT tapes:
Does this indicate a worn out tape or should I simply clean the drive 
with the cleaning tape?


How many backups should be possible with a DLT tape / at which intervals 
should a tape be changed?


At which intervals should the drive be cleaned?

In this case, the current job is still running and waiting for another 
tape. Is there an option to let bacula abort the job, if such an error 
occurs?


Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] I/O Error on tape, maintainance of DLT1 drives

2006-01-16 Thread Alexander Bergolth

Hi!

On 01/14/06 15:20, Julien Cigar wrote:
I had exactly the same problem some months ago, full thread can be found 
here: http://www.nabble.com/Still-problems-with-my-Sony-tapes-t504270.html


Thanks for the hint. But I don't think that this is the same problem.
Your errors were DDS related, I'm using a DLT drive. Besides, the 
scsi-errors are pretty different and your problems seem to have been 
scsi-id related. I don't suspect this to be the problem in my case, as 
the server was shipped with this configuration and the tape drive has 
been working without any problem now for nearly a year.


I believe my problem might have been caused by a drive firmware problem 
or something like that. After that error, the tape was totally 
unresponsive, when I tried to query it using mt status or tapeinfo, the 
following errors showed up in the syslog:


scsi: reservation conflict: host 0 channel 1 id 6 lun 0
st0: Error 70018 (sugg. bt 0x0, driver bt 0x0, host bt 0x7).

After a cold restart, the drive works again now.

However the other issue is that apparently bacula has been informed 
about the error, but it seems to have interpreted it as an end of medium 
condition instead of aborting the backup:


 snipp! 
14-Jan 01:57 samba-sd: Samba-Homes.2006-01-14_01.05.00 Error:
block.c:538 Write error at 6:3819 on device "DLT1" (/dev/nst0).
ERR=Input/output error.
14-Jan 01:57 samba-sd: Samba-Homes.2006-01-14_01.05.00 Error: Error
writing final EOF to tape. This Volume may not be readable.
dev.c:1553 ioctl MTWEOF error on "DLT1" (/dev/nst0). ERR=Input/output error.
14-Jan 01:57 samba-sd: End of medium on Volume "Weekly-2005-06-12_8"
Bytes=6,245,922,599 Blocks=96,818 at 14-Jan-2006 01:57.
 snipp! 

Is there an option to let bacula abort a backup after a write error?

Cheers,
--leo

P.S.: I'd also still be interested in other users experiences with the 
durability of DLT tapes and some recommendations on drive cleaning and 
maintainance.



Alexander Bergolth wrote:


Hi!

Tonight, I got the following I/O error for the first time:
The Drive is a DLT1 tape:
  Vendor: BNCHMARK  Model: DLT1  Rev: 5538
  Type:   Sequential-Access  ANSI SCSI revision: 02

 snipp! 
14-Jan 01:55 samba-sd: Writing spooled data to Volume. Despooling 
536,904,185 bytes ...
14-Jan 01:57 samba-sd: Samba-Homes.2006-01-14_01.05.00 Error: 
block.c:538 Write error at 6:3819 on device "DLT1" (/dev/nst0). 
ERR=Input/output error.
14-Jan 01:57 samba-sd: Samba-Homes.2006-01-14_01.05.00 Error: Error 
writing final EOF to tape. This Volume may not be readable.
dev.c:1553 ioctl MTWEOF error on "DLT1" (/dev/nst0). ERR=Input/output 
error.
14-Jan 01:57 samba-sd: End of medium on Volume "Weekly-2005-06-12_8" 
Bytes=6,245,922,599 Blocks=96,818 at 14-Jan-2006 01:57.

14-Jan 01:57 samba-dir: Recycled volume "Weekly-2005-04-22_2"
14-Jan 01:57 samba-sd: Please mount Volume "Weekly-2005-04-22_2" on 
Storage Device "DLT1" (/dev/nst0) for Job Samba-Homes.2006-01-14_01.05.00

 snipp! 

This is the dmesg output:
 snipp! 
st0: Error with sense data: <6>st0: Current: sense key: Not Ready
Additional sense: Logical unit not ready, initializing cmd. required
st0: Error 400f4 (sugg. bt 0x0, driver bt 0x0, host bt 0x4).
st0: Error 400f4 (sugg. bt 0x0, driver bt 0x0, host bt 0x4).
[...]
 snipp! 

As I don't have very much experience with DLT tapes:
Does this indicate a worn out tape or should I simply clean the drive 
with the cleaning tape?


How many backups should be possible with a DLT tape / at which 
intervals should a tape be changed?


At which intervals should the drive be cleaned?

In this case, the current job is still running and waiting for another 
tape. Is there an option to let bacula abort the job, if such an error 
occurs?


Cheers,
--leo



--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] I/O Error on tape, maintainance of DLT1 drives

2006-01-17 Thread Alexander Bergolth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/17/2006 10:00 AM, Kern Sibbald wrote:
> On Tuesday 17 January 2006 00:10, Alexander Bergolth wrote:
>>However the other issue is that apparently bacula has been informed
>>about the error, but it seems to have interpreted it as an end of medium
>>condition instead of aborting the backup:
>>
>> snipp! 
>>14-Jan 01:57 samba-sd: Samba-Homes.2006-01-14_01.05.00 Error:
>>block.c:538 Write error at 6:3819 on device "DLT1" (/dev/nst0).
>>ERR=Input/output error.
>>14-Jan 01:57 samba-sd: Samba-Homes.2006-01-14_01.05.00 Error: Error
>>writing final EOF to tape. This Volume may not be readable.
>>dev.c:1553 ioctl MTWEOF error on "DLT1" (/dev/nst0). ERR=Input/output
>>error. 14-Jan 01:57 samba-sd: End of medium on Volume "Weekly-2005-06-12_8"
>>Bytes=6,245,922,599 Blocks=96,818 at 14-Jan-2006 01:57.
>> snipp! 
>>
>>Is there an option to let bacula abort a backup after a write error?
> 
> No, and I'm not sure that aborting the job would be very useful.  The last 
> record on the tape was correctly written so the tape *should* be valid.  
> Bacula does warn you, which allows you to verify the job and re-run it if 
> necessary.

Bacula aborted writing to the tape as the error occured and asked for a
new volume. So maybe the last record that has been written to the tape
before the error occured had been written correctly but the backup isn't
complete as it needed another tape and it looks like it did not write
the EOF successfully to the bad tape. So I doubt if the job could be
used for a restore. (Unfortunately I cannot verify it because the tape
has been wiped now.)

Cheers,
- --leo
- --
- ---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDzMEOsYaksEkoAQMRAiIgAJ9+4KqPxdTFNnXHWAvLkFFs0ceJmQCeK6nW
ki9ISNIxrrASOlkZCGrSXTU=
=/+vZ
-END PGP SIGNATURE-


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] status storage fails to find pool

2006-02-09 Thread Alexander Bergolth

Hi!

I've just upgraded from 1.38.0 to 1.38.5.
So far everything works fine, I was able to run a successful incremental 
backup.
However, the "status dir" command in the bacula console doesn't show the 
correct pool any more:


 snipp! 
*status storage
Automatically selected Storage: DLT1
Connecting to Storage daemon DLT1 at samba.intern.rk-klosterneuburg.at:9103

samba-sd Version: 1.38.5 (18 January 2006) i686-redhat-linux-gnu redhat 
(Heidelberg)

[...]
Device status:
Device "DLT1" (/dev/nst0) is mounted with Volume="Daily-2005-06-14_4" 
Pool="*unknown*"

Total Bytes Read=0 Blocks Read=0 Bytes/block=0
Positioned at File=0 Block=0
 snipp! 

However, this tape should be in PoolDaily:

 snipp! 
*list media pool=PoolDaily
[...]
| 14  | Daily-2005-06-14_4 | Append| 7758171961 | 12   | 
1728000  | 1   | 0| 1 | DLT1  | 2006-02-09 
13:28:50 |

 snipp! 
*show pools
Pool: name=PoolDaily PoolType=Backup
  use_cat=1 use_once=0 acpt_any=1 cat_files=1
  max_vols=0 auto_prune=1 VolRetention=20 days
  VolUse=7 days  recycle=1 
LabelFormat=Daily-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}_${NumVols}

  CleaningPrefix=*None* LabelType=0
  RecyleOldest=0 PurgeOldest=0 MaxVolJobs=0 MaxVolFiles=0
[...]
 snipp! 

Any hints why the pool isn't displayed correctly?

Btw.:
On my FC3 system, /dev/nst* and /dev/st* are created with ownership 
root.disk and modes 0640:


/etc/udev/rules.d/50-udev.rules:
KERNEL=="st*",  GROUP="disk", MODE="0640"
KERNEL=="nst*", GROUP="disk", MODE="0640"

The init-script in the RPM uses the group disk for the storage daemon. 
This won't work without additional udev-rules because the group disk 
doesn't have write permissions.


Besides, the storage daemon uses the MTSETDRVBUFFER ioctl in 
set_os_device_parameters() which seems to work only for root:

Feb  9 12:59:12 samba bacula-sd: bacula-sd startup succeeded
Feb  9 12:59:12 samba kernel: st0: MTSETDRVBUFFER only allowed for root.

Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Automatically cancel differential jobs but not full jobs

2005-05-24 Thread Alexander Bergolth

Hi!

I'm doing a full backup once a week and a differential backup on the 
other days. Differential jobs are backed up to a daily-tape-pool, full 
jobs are saved to a weekly pool.
As the tapes sometimes are not changed in time, the jobs may have to 
wait for insertation of the right tape. To avoid having multiple same 
differential jobs in the waiting queue, I've set "Max Run Time" and "Max 
Start Delay" to 10h. However, this also results in cancelation of the 
full backup jobs, if the correct tape for the full-backup wasn't 
inserted in time.


Is there a way to avoid having multiple jobs of the same kind queue up 
without loosing full-level jobs? I've tried "Rerun Failed Levels", 
hoping that the next differential jobs backup-level would be upgraded to 
"full" but this doesn't seem to work for jobs that were canceled because 
 of wait-timeouts.


Any help would be appreciated.

Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria



---
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Label Media and cancelled jobs

2005-07-01 Thread Alexander Bergolth

Hi!

I've experienced a problem where the storage daemon did automatically 
label a new tape for an already cancelled job.


I'll try to outline my problem:

A few days ago, the director tried to automatically create a new volume 
for my daily pool, because the pool didn't contain any acceptable volume 
for the job. However, the new tape was never inserted, instead of that, 
the job was canceled.


The next scheduled job is a monthly hob, so a tape from the monthly-pool 
should be requested. Since there was no free tape, I inserted an empty 
one. But instead of leaving that tape blank and automatically labeling 
the tape when that scheduled monthly job starts, the storage daemon 
labeled the tape with a "daily"-label (the same label as for the new 
daily-tape that had been requested but never inserted).


I had to unmount the tape and manually blank it to fix the problem. 
(Now, when mounting it again, the storage-daemon states: "open but no 
Bacula volume is mounted".)


Maybe that label-request to the storage daemon wasn't properly cancelled 
by the director after the corresponding job had been cancelled?


Is this a known problem?

Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Bacula RPM conflicts with sqlite (which is needed by rpm-4.4)

2005-07-11 Thread Alexander Bergolth

Hi!

The current bacula-sqlite RPM has a conflicts-tag for sqlite:

$ rpm -q --conflicts -p bacula-sqlite-1.36.3-1.fc3.i386.rpm
bacula-client
sqlite
sqlite-tools

However, the current rpm package from Axel Thimm's ATrpms
(http://atrpms.net/dist/fc3/rpm-4.4.x/) requires sqlite which is 
packaged as a seperate RPM (http://atrpms.net/dist/fc3/sqlite/).


> rpm -q rpm
rpm-4.4.1-21_45.rhfc3.at
> rpm -q --requires rpm | fgrep sqlite
libsqlite3.so.0
> rpm -q sqlite
sqlite-3.1.2-2.99_1.rhfc3.at
> rpm -ql sqlite
/usr/bin/sqlite3
/usr/lib/libsqlite3.so.0
/usr/lib/libsqlite3.so.0.8.6
/usr/share/doc/sqlite-3.1.2
/usr/share/doc/sqlite-3.1.2/README
/usr/share/man/man1/sqlite3.1.gz

Can the bacula-rpm be rebuilt to either use the existing sqlite-RPM or 
use it's own sqlite that doesn't conflict with the sqlite-package? (The 
current version's filenames shouldn't conflict anyway however the 
Conflicts-tag prevents from installing both packages.


Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria



---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar

___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Avoid queuing of multiple jobs with the same name

2005-08-07 Thread Alexander Bergolth

Hi!

I've already posted a similar request back in May and I've been refered 
to Bug 307 but I believe the answer presented there this doesn't solve 
my problem.


The problem was:

I'm doing a full backup once a week and a differential backup on the 
other days. Differential jobs are backed up to a daily-tape-pool, full 
jobs are saved to a weekly pool.
As the tapes sometimes are not changed in time, the jobs may have to 
wait for insertation of the right tape. To avoid having multiple same 
differential jobs in the waiting queue, I've set "Max Run Time" and "Max 
Start Delay" to 10h. However, this also results in cancelation of the 
full backup jobs, if the correct tape for the full-backup wasn't 
inserted in time.


Is there a way to avoid having multiple jobs of the same kind queue up 
without loosing full-level jobs? I've tried "Rerun Failed Levels", 
hoping that the next differential jobs backup-level would be upgraded to 
"full" but this doesn't seem to work for jobs that were canceled because 
 of wait-timeouts.


I've tried to use a "Run before job"-script that cancels the current 
job, if another one with with the same name and a higher or same level 
is already running (or waiting for a tape). Unfortunately the "Run 
before job"-Script isn't even executed because it is waiting for the 
other job.


So an option to allow only one job with the same name in the scheduler's 
queue would be very useful. (Preferrable a higher level job should 
replace a lower level job that is already waiting in the queue.)


Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria



---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] specify pool with the new run directive in job-resource

2005-11-17 Thread Alexander Bergolth

Hi!

I'd like to use the new Run-directive in the Job Resource to define a
job that should be run after the main backup-job. (This job should
backup the bacula database directory and is called BackupCatalog.)

However, since my schedule uses daily incremental backups that go to a
"PoolDaily" during the week, weekly full backups that go to "PoolWeekly"
and monthly full backups that go to "PoolMonthly", I'd like to specify
the BackupCatalog-Job to use the same pool as the main backup job and
hence use the same tape.

I'd like to use a variable like "%p" that is substituted for the pool, 
that the current job is using, to allow starting the BackupCatalog-job 
like that:


Job {
  Name = "Samba-Homes"
  Schedule = "WeeklyCycle"
[...]
  Run = "BackupCatalog level=%l since=\"%s\" storage=DLT1 pool=%p"
}

I've found out that "%v" is substituted by the volume-name in 
edit_job_codes() (in lib/util.c) but it looks like there is no variable 
for the pool.


So I tried to add this feature using the attached patch.
However, it doesn't compile because the pool attribute is only compiled 
into the class JCR, if DIRECTOR_DAEMON is defined. (See jcr.h)
Unfortunately, when lib/util.c is compiled, DIRECTOR_DAEMON isn't 
defined. So jcr->pool isn't available at compile time in 
edit_job_codes(). However, since jcr is passed from is passed from 
do_backup_init() in dird/backup.c, it should be available at run-time.


I'd appreciate any hint at how to solve the problem...

Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria


--- src/lib/util.c.orig	2005-11-17 15:02:31.365260719 +0100
+++ src/lib/util.c	2005-11-17 15:03:45.888108025 +0100
@@ -592,6 +592,13 @@
 str = _("*none*");
 	 }
 	 break;
+ case 'p':/* Job name */
+	if (jcr) {
+	   str = jcr->pool->hdr.name;
+	} else {
+   str = _("*none*");
+	}
+	break;
  case 'r':
 	str = to;
 	break;


[Bacula-users] Re: [Bacula-devel] specify pool with the new run directive in job-resource

2005-11-18 Thread Alexander Bergolth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi!

On 11/17/2005 09:16 PM, Kern Sibbald wrote:
> A kludge, which I don't like much, would be to move the definition of Pool 
> into the common part of the jcr.

Hmm - isn't it dangerous and error-prone anyways to have different
definitions of JCR in lib, director daemon, file daemon and storage
daemon and pass e.g. director jcr objects to methods in lib (and the
other way around)?

OK, the definition of the daemon-specific attributes (data members)
comes at the end of the class definition but I believe that it can be
potentially dangerous if the caller (e.g. do_backup_init() in the
director) has a different view of the object than the called function
(e.g. edit_job_codes() in libbac).

Taken from the O'Reilly book "Linux Device Drivers":
-  snipp! 
Another issue related to alignment is portability of data structures
across platforms. The same data structure (as defined in the C-language
source file) can be compiled differently on different platforms. The
compiler arranges structure fields to be aligned according to
conventions that differ from platform to platform. At least in theory,
the compiler can even reorder structure fields in order to optimize
memory usage.
-  snipp! 

I haven't found a similar abstract about c++ member alignment but at
least padding is also done when aligning c++ class members.

Recapitulationg I believe that it would be much more portable and a much
cleaner coding style to have all parts of baculas code use the same
class definitions.
If there is a common subset of data members that is used by all daemons
and a daemon specific part, inheritance (specialization) should be used,
the daemon's job control records should inherit from an abstract class
that defines the common part.

See
http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)#Specialization

> A much better solution, would be to enhance the Python scripting interface to 
> include all the variables you want.  Most likely all except %s (Since) are 
> implemented, so it wouldn't be very hard.  See src/dird/pythondir.c (if I 
> remember the name correctly), then just duplicate the code necessary.
> Since Python can already submit a run command, the rest should be rather easy 
> and in the long run, much more powerful.

I planned to use the python interface anyways so I'll take a look into
that, thanks!

Cheers,
- --leo

> On Thursday 17 November 2005 17:16, Alexander Bergolth wrote:
> 
>>Hi!
>>
>>I'd like to use the new Run-directive in the Job Resource to define a
>>job that should be run after the main backup-job. (This job should
>>backup the bacula database directory and is called BackupCatalog.)
>>
>>However, since my schedule uses daily incremental backups that go to a
>>"PoolDaily" during the week, weekly full backups that go to "PoolWeekly"
>>and monthly full backups that go to "PoolMonthly", I'd like to specify
>>the BackupCatalog-Job to use the same pool as the main backup job and
>>hence use the same tape.
>>
>>I'd like to use a variable like "%p" that is substituted for the pool,
>>that the current job is using, to allow starting the BackupCatalog-job
>>like that:
>>
>>Job {
>>   Name = "Samba-Homes"
>>   Schedule = "WeeklyCycle"
>>[...]
>>   Run = "BackupCatalog level=%l since=\"%s\" storage=DLT1 pool=%p"
>>}
>>
>>I've found out that "%v" is substituted by the volume-name in
>>edit_job_codes() (in lib/util.c) but it looks like there is no variable
>>for the pool.
>>
>>So I tried to add this feature using the attached patch.
>>However, it doesn't compile because the pool attribute is only compiled
>>into the class JCR, if DIRECTOR_DAEMON is defined. (See jcr.h)
>>Unfortunately, when lib/util.c is compiled, DIRECTOR_DAEMON isn't
>>defined. So jcr->pool isn't available at compile time in
>>edit_job_codes(). However, since jcr is passed from is passed from
>>do_backup_init() in dird/backup.c, it should be available at run-time.
>>
>>I'd appreciate any hint at how to solve the problem...
>>
>>Cheers,
>>--leo

- --
- ---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDfdZJsYaksEkoAQMRAud/AJ44ZLvZYA9nBuO7Rt5evmZi0xLBfwCfVuPw
GMiffQhytH7PLzxZaDF

[Bacula-users] Re: [Bacula-devel] specify pool with the new run directive in job-resource

2005-11-18 Thread Alexander Bergolth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/18/2005 03:57 PM, Kern Sibbald wrote:
> On Friday 18 November 2005 14:25, Alexander Bergolth wrote:
>>On 11/17/2005 09:16 PM, Kern Sibbald wrote:
>>
>>>A kludge, which I don't like much, would be to move the definition of
>>>Pool into the common part of the jcr.
>>
>>Hmm - isn't it dangerous and error-prone anyways to have different
>>definitions of JCR in lib, director daemon, file daemon and storage
>>daemon and pass e.g. director jcr objects to methods in lib (and the
>>other way around)?
> 
> The library can only reference the common part of the objects.  This is no 
> different than what C++ does with inherentance. There is no danger other than 
> some people may not understand the metaphore ...
> 
>>OK, the definition of the daemon-specific attributes (data members)
>>comes at the end of the class definition but I believe that it can be
>>potentially dangerous if the caller (e.g. do_backup_init() in the
>>director) has a different view of the object than the called function
>>(e.g. edit_job_codes() in libbac).
> 
> As I mentioned above, this is not a solution that I like, and as a 
> consequence, I wouldn't implement it in the code I release. If you want to 
> use it for your own code, I have no problem, and don't see that it can do any 
> harm.

But that is what happens in the current code! do_backup_init() passes a
jrc object (the version that has all the daemon specific members) to
edit_job_codes(). But edit_job_codes() has a different view on the class
than do_backup_init().

> My emphasis is going to be to try to do as much as possible with Python and 
> to 
> try to reduce the use of new % variables and directives as much as possible, 
> so a proper solution for me is one that involves Python.

I agree.

>>Taken from the O'Reilly book "Linux Device Drivers":
>> snipp! 
>>Another issue related to alignment is portability of data structures
>>across platforms. The same data structure (as defined in the C-language
>>source file) can be compiled differently on different platforms. The
>>compiler arranges structure fields to be aligned according to
>>conventions that differ from platform to platform. At least in theory,
>>the compiler can even reorder structure fields in order to optimize
>>memory usage.
>> snipp! 
> 
> This is not an issue here as all of Bacula is recompiled on every platform.

This issue may as well affect two pieces of code compiled on a single
platform, due to several source files using different class definitions
resulting from the #ifdef's. Imagine the following scenario: First, when
libbac is compiled, the compiler only sees a limited JCR class that
contains the common members. The optimizer may arrange the members in a
specific pattern. Then it compiles backup.c in the director's sources.
Now it sees a different JCR class, additionally containing the director
specific members. Now the optimizer may arrange the members in a
different way than before which will lead to problems when passing an
object between those two pieces of code. While the compiler will not
change the order of the members on most platforms and will most likely
use the same padding to align the members, this behaviour isn't
something one should rely on.

>>I haven't found a similar abstract about c++ member alignment but at
>>least padding is also done when aligning c++ class members.
>>
>>Recapitulationg I believe that it would be much more portable and a much
>>cleaner coding style to have all parts of baculas code use the same
>>class definitions.
>>If there is a common subset of data members that is used by all daemons
>>and a daemon specific part, inheritance (specialization) should be used,
>>the daemon's job control records should inherit from an abstract class
>>that defines the common part.
> 
> Bacula started out as C code, and it is slowly transitioning to C++. This 
> transition is not easy particularly because I consider C++ one of the 
> lousiest languages ever written mostly due to the gross number of syntax 
> kludges that make it totally unreadable.  However it has a few nice features 
> that C does not have that I am adding to Bacula.

I don't want to persuade you into using inheritance, there are
alternatives other than trimming structures using preprocessor macros.

> If you want to propose something that is simple and does not mean changing 
> 50% 
> of the code in Bacula, I am open to suggestion ...

I don't want to propose major code changes, I'd only wanted to warn you
that this is a possible sou

Re: [Bacula-users] bacula-1.38.9 rpm packages released

2006-05-27 Thread Alexander Bergolth

On 05/06/2006 03:40 PM, Scott Barninger wrote:

Bacula-1.38 RPM Release Notes
[...]
*
* Fix for daemon user/group problem *
*

Prior to the 1.38.8 release the pre-install scripts attempted to create
the
user bacula with primary group as both bacula and disk which failed.
There was 
still a problem with these scripts in 1.38.8, noted in bug 605, on
RedHat 
platforms which by default attempt to create a group with same name as
the user 
(bacula) and failed because it had already been created. 


This has (I think) now been corrected with the addition of the -g
parameter to 
the useradd commands and should work.


I think the order of user and groups has to be reversed.

The following code in the preinstall script fails on my FC5 box with:
usermod: user bacula,disk does not exist


if [ "$IS_ROOT" != "root" ]; then
/usr/sbin/usermod bacula -G bacula,disk
fi


However,
/usr/sbin/usermod -G bacula,disk bacula
... works as expected.

Besides, the src-rpms build really smooth, even on FC5 (using the 
attached small spec-file patch). Thanks!


Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria


--- SPECS/bacula.spec	2006-05-06 20:26:04.0 +0200
+++ bacula.spec	2006-05-17 13:39:27.825655250 +0200
@@ -40,6 +40,8 @@
 %{?build_fc3:%define fc3 1}
 %define fc4 0
 %{?build_fc4:%define fc4 1}
+%define fc5 0
+%{?build_fc5:%define fc5 1}
 # Whitebox Enterprise build
 %define wb3 0
 %{?build_wb3:%define wb3 1}
@@ -70,7 +72,7 @@
 %{?build_mdv:%define mdk 1}
 
 # test for a platform definition
-%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{mdk}
+%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{mdk}
 %{error: You must specify a platform. Please examine the spec file.}
 exit 1
 %endif
@@ -113,7 +115,7 @@
 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4}
 %define _dist %(grep Red /etc/redhat-release)
 %endif
-%if %{fc1} || %{fc4}
+%if %{fc1} || %{fc4} || %{fc5}
 %define _dist %(grep Fedora /etc/redhat-release)
 %endif
 %if %{centos4} || %{centos3}
@@ -268,11 +270,12 @@
 BuildRequires: GConf2-devel
 BuildRequires: freetype-devel
 %endif
-%if %{fc4}
+%if %{fc4} || %{fc5}
 BuildRequires: libtermcap-devel
 BuildRequires: glibc-devel >= 2.3
 %endif
-%if %{fc4} && %{gconsole}
+%if %{gconsole}
+%if %{fc4} || %{fc5}
 BuildRequires: gtk2-devel >= 2.6
 BuildRequires: libgnomeui-devel >= 2.10
 BuildRequires: ORBit2-devel
@@ -283,11 +286,12 @@
 BuildRequires: GConf2-devel
 BuildRequires: freetype-devel
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
+%endif
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5}
 BuildRequires: libtermcap-devel
 BuildRequires: glibc-devel >= 2.3
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && %{gconsole}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && %{gconsole}
 BuildRequires: gtk2-devel >= 2.0
 BuildRequires: libgnomeui-devel >= 2.0
 BuildRequires: ORBit2-devel
@@ -568,7 +572,8 @@
 Requires: GConf2
 Requires: freetype
 %endif
-%if %{gconsole} && %{fc4}  
+%if %{gconsole}
+%if %{fc4} || %{fc5}
 Requires: gtk2 >= 2.6
 Requires: libgnomeui >= 2.10
 Requires: glibc >= 2.3
@@ -580,7 +585,8 @@
 Requires: GConf2
 Requires: freetype
 %endif
-%if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
+%endif
+%if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5}
 Requires: gtk2 >= 2.0
 Requires: libgnomeui >= 2.0
 Requires: glibc >= 2.3
@@ -634,9 +640,11 @@
 Requires: gtk2 >= 2.4
 %endif
 
-%if %{wxconsole} && %{fc4}  
+%if %{wxconsole}
+%if %{fc4} || %{fc5} 
 Requires: gtk2 >= 2.6
 %endif
+%endif
 
 %if %{wxconsole}
 %description wxconsole
@@ -864,7 +872,7 @@
 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
 %endif
-%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{mdk}
+%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{mdk}
 %define iftrick 1
 %else
 %define iftrick 0
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Scheduled job preview

2005-04-13 Thread Alexander Bergolth
Hi!
In order to minimize operator interaction, I'd like to make bacula send 
an email containing the next n scheduled jobs, their levels and maybe a 
list of volumes that could be used for each job.

The console command "status dir" only shows jobs scheduled for the next 
24 hours. However, I don't have any jobs scheduled during the weekend, 
so a more general preview, that for example shows the next 3 scheduled 
jobs would be more useful in my case. Is there a way to produce such 
kind of output?

Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria

---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Concatenate Jobs

2005-04-13 Thread Alexander Bergolth
Hi!
I'd like to run two Jobs, a "normal" backup-job that runs full or 
differential, followed by a Catalog-Backup that should always be a full 
backup.

I've implemented it using two seperate consecutive schedules with 
different priorities now, following the example in the manual. However, 
this causes to two email status-notifications to be sent and could lead 
to configuration errors. Is there a way to configure a job to always 
append another one? (And maybe treat them as one.)

Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria

---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Volume Use Duration

2005-04-13 Thread Alexander Bergolth
Hi!
The manual says that the Pool directive "Volume Use Duration" is only 
checked at the end of a job that writes to a volume.
Is there a way to manually trigger this check? (E.g. to mark all 
"Appendable" daily volumes as Used when doing a full backup?)

I could set the Volume Use Duration so that it will fire at the end of 
the last differential backup before a weekly full backup but the problem 
is that the last scheduled differential backup runs two days before the 
next full backup, because there are no scheduled jobs during the 
weekend. So I'd have to set the "Volume Use Duration" to 4 days. The 
problem with this setup is that I'd like to allow manual (differential) 
backups to this volume during the weekend, so I'd like to mark the 
volume as Used just before the Full backup is started.

Is there a way to configure this behavior?
Thanks in advance,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria

---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Renaming volumes without loosing data

2005-04-13 Thread Alexander Bergolth
Hi!
Is there a way to relabel a tape without loosing the data stored on it 
and without affecting the associated catalog data?

Is it possible to just update the corresponding Media.VolumeName in the 
database and relabel the tape with "btape label"?

Cheers,
--leo
--
---
[EMAIL PROTECTED]Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria

---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users