Bacula-users

[Bacula-users] RunScript and Redirecting output.

2012-04-02 06:58:46
Subject: [Bacula-users] RunScript and Redirecting output.
From: Rob Becker <rbecker AT 2co DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 2 Apr 2012 10:56:43 +0000

Hello all,

 

I’m hoping someone will be able to help me solve a problem that’s been causing me some frustration over the weekend.  I’m working on a process to automate a restore jobs to confirm the validity of the backup jobs.  The restore job will restore a single file that gets created during the backup process.  I’m trying to use RunScript to create that file and I’m having a very difficult time getting RunScript to redirect the output of the command to a file.

 

Here is the example of what I’m trying to accomplish.

 

RunScript {

    RunsWhen  = Before

    Runs On Client = Yes

    Command = "/bin/echo `/bin/hostname`  >    /usr/local/bacula/working/restore_file"

   Command = "/bin/date +%%F >> /usr/local/bacula/working/restore_file"

  }

 

 

I’ve tried many different forms of escaping the characters to no avail.  It looks like Bacula just ignores everything after, and including, the greater than sign.

 

Does anyone have any ideas? On how I can get Bacula to do redirect output from a script to a file?

 

Thanks.

Rob Becker


Follow 2Checkout!



CONFIDENTIALITY STATEMENT: All information included in this communication, including attachment(s), is intended solely for delivery to and authorized use by the addressee(s) identified above, and may contain privileged, confidential, proprietary and/or trade secret information entitled to protection and/or exempt from disclosure under applicable law. If you are not the intended recipient, please note that any use, distribution or copying of this communication is unauthorized and may be unlawful. If you have received this communication in error, please notify sender immediately and delete this communication from your computer.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
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>