Bacula-users

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

2014-02-27 15:06:41
Subject: Re: [Bacula-users] Failure Backing Up Windows Client Machine
From: Larry Kemp <Larry.Kemp AT usmetrotel DOT com>
To: John Drescher <drescherjm AT gmail DOT com>, "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 27 Feb 2014 20:03:09 +0000

Thanks John for the response.

 

I have tried it a few ways with no success getting the File Daemon to start at boot.

I also read this link here for help: http://technet.microsoft.com/en-us/library/cc990289.aspx

 

Failed attempts:

 

Entered:

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

[SC] CreateService SUCCESS

System accepted it but it would not startup….it showed under services.msc as Manual start only. Then when you try to manually start it, it would fail and state that it could not find the specified file.

So then I deleted it entirely to try again:

C:\Documents and Settings\lkemp>sc.exe delete Bacula-FD

[SC] DeleteService SUCCESS

 

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

 

Entered:

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

[SC] CreateService SUCCESS

System accepted it but it would not startup….it showed under services.msc as Manual start only. Then when you try to manually start it, it would fail and state that it could not find the specified file.

So then I deleted it entirely to try again:

C:\Documents and Settings\lkemp>sc.exe delete Bacula-FD

[SC] DeleteService SUCCESS

 

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

 

Entered:

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

There was no output showing SUCCESS so I assume it did not create the service.

Running netstat –nc | more did not show anything listening.

C:\Documents and Settings\lkemp>sc.exe delete Bacula-FD

[SC] OpenService FAILED 1060:

The specified service does not exist as an installed service.

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

 

Entered:

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

There was no output showing SUCCESS so I assume it did not create the service.

Running netstat –nc | more did not show anything listening.

Failed 1060 when tried to delete.

 

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

 

Entered:

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

Failed.

 

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

 

Entered:

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

Failed.

 

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

 

Entered:

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

Failed.

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

 

I spent a bunch of time looking online too at Microsoft sites and looking at the output of sc.exe to see how to include the path to the .conf file after the –c in the command so it would allow it to start up as a service without human intervention. I must be missing it by a character or two. Let me know if you or anyone else has any ideas or different ways to approach this. What if I tried to call a .bat file as the binpath instead; and then in that .bat file I placed the string to “C:\Program Files\Bacula\bacula-fd.exe ./bacula-fd.conf” in the .bat file. I wonder if sc.exe would accept it. I might try that unless anyone comes up with something more plausible.

 

LK

 

From: John Drescher [mailto:drescherjm AT gmail DOT com]
Sent: Wednesday, February 26, 2014 7:00 PM
To: Larry Kemp
Cc: bacula-users AT lists.sourceforge DOT net
Subject: Re: [Bacula-users] Failure Backing Up Windows Client Machine

 

 

 

On Wed, Feb 26, 2014 at 6:57 PM, John Drescher <drescherjm AT gmail DOT com> wrote:

 

 

On Wed, Feb 26, 2014 at 6:16 PM, Larry Kemp <Larry.Kemp AT usmetrotel DOT com> wrote:

Kern/All,

 

I was able to get the Bacula file daemon to start manually on my Windows Server 2003 32bit system by using the following exact command:

Command to start File Daemon:

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

 

To see if the Bacula-FD is running I entered the following at the command line:

netstat -na | more

Then I looked for socket 9101 listening.

 

Then I wanted to kill the daemon I entered:

bacula-fd.exe -kill

 

Then I wanted the daemon to start as a service at boot so if the server was ever rebooted it would startup just like my Linux systems at bott/reboot without me having to manually go to each Windows Server 2003/2008/2012.

I read about Creating A Service at this Microsoft link: http://technet.microsoft.com/en-us/library/cc990289.aspx

Entering this command:

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

 

....produced a named service but it will not start at boot and will not let me edit it from the services.msc module.

 

Manully trying to click “Start Service” gives this graphical error:

 

Services: Could not start the Bacula-FD service on Local Computer. Error 2: The system cannot find the file specified. OK?

 

 

 

Anyone know how to make it behave and start up at boot without human intervention? I’m almost there! Whoo hoo!

 

You need to your quotes to be around the executable path only.

 

You may also need to supply a full path for the config file instead of ./bacula-fd.conf. If this is required you must quote the path for that. And do that separately from the quoting you have for the executable path.

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
<Prev in Thread] Current Thread [Next in Thread>