Bacula-users

[Bacula-users] Antwort: Question on BeforeJob

2009-06-15 10:23:25
Subject: [Bacula-users] Antwort: Question on BeforeJob
From: C.Keschnat AT internet-mit-iQ DOT de
To: "Chandranshu ." <chandranshu AT gmail DOT com>
Date: Mon, 15 Jun 2009 16:19:00 +0200
"Chandranshu ." <chandranshu AT gmail DOT com> wrote on 15.06.2009 15:59:06:

> "Chandranshu ." <chandranshu AT gmail DOT com>

> 15.06.2009 15:59
>
> An

>
> bacula-users AT lists.sourceforge DOT net

>
> Kopie

>
> Thema

>
> [Bacula-users] Question on BeforeJob

>
> Hi
>
> I configured the following JobDef and Job for bacula:
> JobDefs {
>   Name = "HostingFilesBackupJob"
>   Type = Backup
>   Level = Incremental
>   FileSet = "Hosting Files Set"
>   Schedule = "WeeklyCycle"
>   Storage = File
>   Messages = Standard
>   Pool = Default
>   Full Backup Pool = FreeVM-Full-Pool
>   Incremental Backup Pool = FreeVM-Inc-Pool
>   Differential Backup Pool = FreeVM-Diff-Pool
>   # This creates a snapshot and mounts it at /root/.snap
>   RunBeforeJob = "/root/backup-scripts/create-snapshot.sh"
>   # This umounts the snapshot volume and removes it from the volume group
>   RunAfterJob  = "/root/backup-scripts/remove-snapshot.sh"
>   Priority = 10
> }
>
> Job {
>   Name = "FreeVM-1 Files Backup"
>   JobDefs = "HostingFilesBackupJob"
>   Client = freevm-1-fd
>   Write Bootstrap = "/root/bacula/bin/working/freevm1.bsr"
> }
>
> In this case, the file client is on a machine different from the  on
> running the director. The scheduled job failed with the following error:
>
> 15-Jun 04:05 bacula-dir JobId 7: No prior Full backup Job record found.
> 15-Jun 04:05 bacula-dir JobId 7: No prior or suitable Full backup
> found in catalog. Doing FULL backup.
> 15-Jun 04:05 bacula-dir JobId 7: shell command: run BeforeJob "/
> root/backup-scripts/create-snapshot.sh"
> 15-Jun 04:05 bacula-dir JobId 7: Error: Runscript: BeforeJob
> returned non-zero status=208. ERR=No such file or directory
>
> Where are the before and after job scripts have to be? I assumed
> that they should be on the file client and wrote them accordingly.
> Are they supposed to be on the director machine? Any pointers will
> be greatly appreciated.
>

I think instead of RunBeforeJob you need to either use ClientRunBeforeJob or RunScript with the options RunsOnClient = yes and RunsWhen = Before.

Chris.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>