[Bacula-users] RunScript fails
Good morning, I've got the following RunScript-directive in my Job definition. What I want to do is run a script before the job is started, on the client obviously, that dumps the databases into a directory backed up by bacula later on. RunScript { RunsWhen = Before FailJobOnError = No Command = /usr/local/sbin/db_sql_backup.sh } I've got two problems, first of the Job fails because the script can't be run - I expected the FailJobOnError = No directive to make bacula inform me about the script not beeing run but still continues backing up the other data. I named it already, the script fails. I tried starting it on the client machine and it works fine. I suspect permission problems because the directory the script writes into is just writeable by root. Then again the FD is running as root too sooo.. yeah dunno. Yet another question, is there a way to get stderr from the script? Should I (or rather, can I?) pipe stderr into some directory that is backed up (like in Command = myscript.sh 2 /var/www/myscript.err)? Either way here's the log output: 11-Dec 02:00 datensenke-dir JobId 35: Fatal error: Bad response to RunScript command: wanted 2000 OK RunScript, got 2999 Invalid command 11-Dec 02:00 datensenke-dir JobId 35: Fatal error: Client vash-fd RunScript failed. 11-Dec 02:00 datensenke-dir JobId 35: Fatal error: No Job status returned from FD. -- __ Sascha Retzki n...@work Internet Informationssyteme EMail: sas...@work.de Wandalenweg 5 - 20097 Hamburg Tel.: +49 (0)40-23 88 09-338Germany - http://www.work.de HR B 61 668 - Amtsgericht Hamburg Geschaeftsfuehrer Jan Diegelmann __ -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] RunScript fails
Sascha Retzki wrote: Good morning, ClientRunBeforeJob = /usr/local/sbin/db_sql_backup.sh this works. Apperently the RunScript {} thing runs on the director? I've got the following RunScript-directive in my Job definition. What I want to do is run a script before the job is started, on the client obviously, that dumps the databases into a directory backed up by bacula later on. RunScript { RunsWhen = Before FailJobOnError = No Command = /usr/local/sbin/db_sql_backup.sh } I've got two problems, first of the Job fails because the script can't be run - I expected the FailJobOnError = No directive to make bacula inform me about the script not beeing run but still continues backing up the other data. I named it already, the script fails. I tried starting it on the client machine and it works fine. I suspect permission problems because the directory the script writes into is just writeable by root. Then again the FD is running as root too sooo.. yeah dunno. Yet another question, is there a way to get stderr from the script? Should I (or rather, can I?) pipe stderr into some directory that is backed up (like in Command = myscript.sh 2 /var/www/myscript.err)? Either way here's the log output: 11-Dec 02:00 datensenke-dir JobId 35: Fatal error: Bad response to RunScript command: wanted 2000 OK RunScript, got 2999 Invalid command 11-Dec 02:00 datensenke-dir JobId 35: Fatal error: Client vash-fd RunScript failed. 11-Dec 02:00 datensenke-dir JobId 35: Fatal error: No Job status returned from FD. -- __ Sascha Retzki n...@work Internet Informationssyteme EMail: sas...@work.de Wandalenweg 5 - 20097 Hamburg Tel.: +49 (0)40-23 88 09-338Germany - http://www.work.de HR B 61 668 - Amtsgericht Hamburg Geschaeftsfuehrer Jan Diegelmann __ -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] RunScript fails
Thomas Mueller wrote: Am Fri, 11 Dec 2009 10:38:08 +0100 schrieb Sascha Retzki: Sascha Retzki wrote: Good morning, ClientRunBeforeJob = /usr/local/sbin/db_sql_backup.sh this works. Apperently the RunScript {} thing runs on the director? you need to set RunsOnClient = yes for RunScript resource. hmm tested that, doesn't work for me :-/ - Thomas -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- __ Sascha Retzki n...@work Internet Informationssyteme EMail: sas...@work.de Wandalenweg 5 - 20097 Hamburg Tel.: +49 (0)40-23 88 09-338Germany - http://www.work.de HR B 61 668 - Amtsgericht Hamburg Geschaeftsfuehrer Jan Diegelmann __ -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Best Practice tip: automatically cancel Jobs
Arno Lehmann wrote: Hi, 25.11.2009 14:20, Sascha Retzki wrote: Hello List, I've got a best practice question. When a Job is started it changes to Status=Running and the FD tries to connect to the SD. Let's assume this fails due to network outages, or in my case I configured an IP for the SD which is not accessible from the Client. I suggest to first upgrade... the versions you're running are really old, and espcially regarding the different max ... time settings, much has been improved in between. On an interesting sidenote, after playing arround with the syntax (changed it to 1 min everywhere) bacula indeedly automatically canceled the job, but after 30 minutes and not 1 minute. As 30 Minutes beeing the default I kinda figured the same, maybe I was just running into some kind of bug. So to get this straight I am doing all right, yeah? I am kinda puzzled by the syntax as the Documentation is vague on it on this case: SD Connect Timeout = 1 min FD Connect Timeout = 1 min and in the SD config I got: Client Connect Wait = 1 min Furthermore, it's unlikely anybody has a 2.2.8 reference installation available any more :-) Derailing my own thread, what's the best practice for Bacula regarding upgrading? Do you guys just follow your Distributions/Packet Managements and upgrade the Bacula server? Do you compile from source and read the Bacula docs? Do you upgrade at all or do you just upgrade when you need new features/bugfixes? Cheers, Arno -- __ Sascha Retzki n...@work Internet Informationssyteme EMail: sas...@work.de Wandalenweg 5 - 20097 Hamburg Tel.: +49 (0)40-23 88 09-338Germany - http://www.work.de HR B 61 668 - Amtsgericht Hamburg Geschaeftsfuehrer Jan Diegelmann __ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Best Practice tip: automatically cancel Jobs
Hello List, I've got a best practice question. When a Job is started it changes to Status=Running and the FD tries to connect to the SD. Let's assume this fails due to network outages, or in my case I configured an IP for the SD which is not accessible from the Client. What happens is the Job sits in Status=Running and no Data is transfered. On canceling the Job, I see things like: 25-Nov 11:25 bacula-dir JobId 27: Start Backup JobId 27, Job=bacula-test.2009-11-25_11.25.40 25-Nov 11:25 bacula-dir JobId 27: Created new Volume bacula-test-0017 in catalog. 25-Nov 11:25 bacula-dir JobId 27: Using Device bacula-test-file 25-Nov 11:34 bacula-test-fd JobId 27: Fatal error: Failed to connect to Storage daemon: 192.168.1.xxx:9103 25-Nov 11:31 bacula-test-fd JobId 27: Warning: bsock.c:123 Could not connect to Storage daemon on 192.168.1.xxx:9103. ERR=Connection timed out Retrying ... 25-Nov 11:34 bacula-dir JobId 27: Fatal error: Socket error on Storage command: ERR=No data available 25-Nov 11:34 bacula-dir JobId 27: Bacula bacula-dir 2.2.8 (26Jan08): 25-Nov-2009 11:34:59 Build OS: x86_64-pc-linux-gnu debian lenny/sid JobId: 27 Job:bacula-test.2009-11-25_11.25.40 Backup Level: Full Client: bacula-test-fd 2.4.4 (28Dec08) i486-pc-linux-gnu,debian,5.0 FileSet:bacula-test-fileset 2009-11-25 11:25:10 Pool: bacula-test-pool (From Job resource) Storage:bacula-test-sd (From Pool resource) Scheduled time: 25-Nov-2009 11:24:58 Start time: 25-Nov-2009 11:25:12 End time: 25-Nov-2009 11:34:59 Elapsed time: 9 mins 47 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 Storage Encryption: no Volume name(s): Volume Session Id: 2 Volume Session Time:1259081276 Last Volume Bytes: 0 (0 B) Non-fatal FD errors:0 SD Errors: 0 FD termination status: SD termination status: Waiting on FD Termination:Backup Canceled I've already set the following timeouts in my bacula-dir.conf: Director { ... FD Connect Timeout = 5 SD Connect Timeout = 1 ... } (I had n postfixed to the numbers because I somewhere read it means minutes, so originally I had XD Connect Timeout = 5n, but it doesnt work either way) Okay so I want it to timeout so it triggers a log message like it does when I cancel the job. I want the people who're responsible for these backup to come to the office in the morning and see their daily backup job succeeded or failed. I don't actually care if it cancels or not, at least if all the other jobs are succeeding regardlessly ;-) Soo, give me your best practice advice, or tell me if I just did something wrong with teh configuration and I am on the wrong track! Thanks in advance, Sascha -- __ Sascha Retzki n...@work Internet Informationssyteme EMail: sas...@work.de Wandalenweg 5 - 20097 Hamburg Tel.: +49 (0)40-23 88 09-338Germany - http://www.work.de HR B 61 668 - Amtsgericht Hamburg Geschaeftsfuehrer Jan Diegelmann __ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users