Hello,

Bacula runs the *program* that you specify.  In your command, you are using 
*shell* commands (>) and the OS does not know how to interpret shell 
commands.  So if you want to use shell commands (as you did), you must run a 
shell or a shell script.  With the Bacula Run scripts, you are talking 
directly to the system and not to a shell.  If you don't understand what all 
the above means, someone on the list can probably help you.  In addition, I 
think there is at least one example in the manual ...

Best regards,

Kern

On Thursday 17 January 2008 19:01, Alexander Kolesnik wrote:
> Hello,
>
> I have the following line in my job resource:
>   Client Run Before Job = "fdisk -l > /etc/fdisk.lst"
>
> Backup completes without errors or warnings:
> 17-Jan 20:53 trendy-dir JobId 479: Start Backup JobId 479,
> Job=Backup_test.2008-01-17_20.52.08 17-Jan 20:53 trendy-dir JobId 479:
> Using Device "Dev_test"
> 17-Jan 20:53 alto-fd JobId 479: ClientRunBeforeJob: run command "fdisk -l >
> /etc/fdisk.lst" 17-Jan 20:53 trendy-sd JobId 479: Volume "day_test_0384"
> previously written, moving to end of data. 17-Jan 20:53 trendy-sd JobId
> 479: Ready to append to end of Volume "day_test_0384" size=631 17-Jan 20:53
> trendy-sd JobId 479: Job write elapsed time = 00:00:01, Transfer rate = 0 
> bytes/second 17-Jan 20:53 trendy-dir JobId 479: Bacula trendy-dir 2.2.6
> (10Nov07): 17-Jan-2008 20:53:01 Build OS:              
> i686-redhat-linux-gnu redhat
>   JobId:                  479
>   Job:                    Backup_test.2008-01-17_20.52.08
>   Backup Level:           Incremental, since=2008-01-17 20:49:12
>   Client:                 "alto-fd" 2.2.6 (10Nov07)
> i686-redhat-linux-gnu,redhat, FileSet:                "Files_test"
> 2008-01-17 20:23:35
>   Pool:                   "Pool_Daily_test" (From Job IncPool override)
>   Storage:                "File_test" (From Job resource)
>   Scheduled time:         17-Jan-2008 20:52:57
>   Start time:             17-Jan-2008 20:53:01
>   End time:               17-Jan-2008 20:53:01
>   Elapsed time:           0 secs
>   Priority:               10
>   FD Files Written:       0
>   SD Files Written:       0
>   FD Bytes Written:       0 (0 B)
>   SD Bytes Written:       0 (0 B)
>   Rate:                   0.0 KB/s
>   Software Compression:   None
>   VSS:                    no
>   Encryption:             no
>   Volume name(s):         day_test_0384
>   Volume Session Id:      3
>   Volume Session Time:    1200590458
>   Last Volume Bytes:      1,039 (1.039 KB)
>   Non-fatal FD errors:    0
>   SD Errors:              0
>   FD termination status:  OK
>   SD termination status:  OK
>   Termination:            Backup OK
>
> 17-Jan 20:53 trendy-dir JobId 479: Begin pruning Jobs.
> 17-Jan 20:53 trendy-dir JobId 479: No Jobs found to prune.
> 17-Jan 20:53 trendy-dir JobId 479: Begin pruning Files.
> 17-Jan 20:53 trendy-dir JobId 479: No Files found to prune.
> 17-Jan 20:53 trendy-dir JobId 479: End auto prune.
>
>
> And there's no /etc/fdisk.lst file on the client host.
>
> Here is the output from strace tool, ran on the client against
> bacula-fd process:
> [pid  9747] execve("/sbin/fdisk", ["fdisk"..., "-l"..., ">"...,
> "/etc/fdisk.lst"...], [/* 24 vars */]) = 0 ...
> [pid  9747] open(">", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
> directory) [pid  9747] open(">", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such
> file or directory) [pid  9747] open("/etc/fdisk.lst", O_RDONLY|O_LARGEFILE)
> = -1 ENOENT (No such file or directory) [pid  9747] open("/etc/fdisk.lst",
> O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) ...
>
> Bacula director version:
> Version: 2.2.6 (10 November 2007) i686-redhat-linux-gnu redhat
>
> Bacula client version:
> alto-fd Version: 2.2.6 (10 November 2007)  i686-redhat-linux-gnu redhat
>
> I wonder what am I doing wrong?
>
> Thanks for help in advance!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to