Bacula-users

Re: [Bacula-users] Failure Backing Up Windows Client Machine

2014-02-27 23:47:25
Subject: Re: [Bacula-users] Failure Backing Up Windows Client Machine
From: Larry Kemp <Larry.Kemp AT usmetrotel DOT com>
To: Larry Kemp <Larry.Kemp AT usmetrotel DOT com>, John Drescher <drescherjm AT gmail DOT com>
Date: Fri, 28 Feb 2014 04:40:22 +0000

I have given up for the time being to try and use sc.exe to get the Bacula-fd.exe with Bacula-fd.conf to run automatically at boot. It is getting me no place.

 

So I starting thinking about possibly using a batch file. Running a file I created that I named bacula-fd-start.bat and placed in the Program Files\Bacula\scripts\ directory. I created the scripts folder.

I ran my batch file that contains the following, and it started the file daemon perfectly…

------------------------------------------------------------------

rem Startup script to startup Bacula File Daemon client.

cd C:\Program Files\Bacula\

start bacula-fd.exe -c ./bacula-fd.conf

exit

------------------------------------------------------------------

 

…and now when I do a netstat I see it there listening.

 

  Proto  Local Address          Foreign Address        State

  TCP    0.0.0.0:53             0.0.0.0:0              LISTENING

  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING

  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1030           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1061           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1065           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1092           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:9102           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:20000          0.0.0.0:0              LISTENING

  TCP    0.0.0.0:47001          0.0.0.0:0              LISTENING

 

 

So I am going to see if I can get this batch file to start with the system rather than in a user startup menu when anyone logs in. The Bacula-fd.exe with the .conf file needs to run at boot.

 

Anyone have any thoughts on how to get the .bat file to execute without a user logging in to the Windows server?

 

LK

 

From: Larry Kemp [mailto:Larry.Kemp AT usmetrotel DOT com]
Sent: Thursday, February 27, 2014 9:14 PM
To: John Drescher; Larry Kemp
Cc: Greg Woods; bacula-users AT lists.sourceforge DOT net
Subject: RE: [Bacula-users] Failure Backing Up Windows Client Machine

 

I entered this:

 

C:\>sc create Bacula-FD binpath= "\"C:\Program Files\Bacula\bacula-fd.exe\" -c \"C:\Program Files\Bacula\bacula-fd.conf\" " type= share start= auto

[SC] CreateService SUCCESS

 

Under netstat –na | more I saw nothing.

 

Then I saw the service listed in service.msc but it was not running. When I tried to run it manually it stated, “Could not start Bacula on Local Computer error 1053 The service did not respond to the start or control requests in a timely fashion.”

 

 

I am going to go back are read the links in the previous couple emails.

 

 

-----Original Message-----
From: John Drescher [mailto:drescherjm AT gmail DOT com]
Sent: Thursday, February 27, 2014 5:08 PM
To: Larry Kemp
Cc: Greg Woods; bacula-users AT lists.sourceforge DOT net
Subject: Re: [Bacula-users] Failure Backing Up Windows Client Machine

 

On Thu, Feb 27, 2014 at 5:03 PM, John Drescher <drescherjm AT gmail DOT com> wrote:

>> How about:

>> 

>>  C:\Documents and Settings\lkemp>sc create Bacula-FD binpath=

>> "C:\Program Files\Bacula>bacula-fd.exe" -c "C:\Program Files\Bacula\bacula-fd.conf"

>> type= share start= auto

>> 

> 

> It seems that it is not easy to pass parameters to sc..

> 

> http://stackoverflow.com/questions/3663331/creating-a-service-with-sc-

> exe-how-to-pass-in-context-parameters

> 

> Although I think this will do it (using nested quotes - escaping the

> inner quotes):

> 

> http://stackoverflow.com/a/11084834/487892

 

As a result I expect the answer to be exactly:

 

sc create Bacula-FD binpath= "\"C:\Program Files\Bacula>bacula-fd.exe\" -c \"C:\Program Files\Bacula\bacula-fd.conf\" " type= share start= auto

 

John

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users