[Box Backup] Setup windows client

Chris Wilson chris at qwirx.com
Wed Jan 18 21:21:26 GMT 2012


Hi Enrique,

On Wed, 18 Jan 2012, Enrique Perez-Terron wrote:

> Hello, I just learned about bb, and I am setting it up.
>
> The first client runs XP, and I have just managed to run bbackupd in a 
> cygwin window. That run is still in progress, the Documents and Settings 
> tree is quite large.

It shouldn't be a Cygwin window, it should be a command prompt. If it says 
Cygwin then you might be running an ancient or unsupported version. 
What version are you using and where did you get it from>

> The next step will be to make it run in the background. I am looking around 
> for tools to make it run as a service, but I am surprised that there is 
> nothing about this in the bb wiki. There is also very little and incomplete 
> material on the elsewhere.

It has a built-in service mode and command-line options to install and 
remove the service:

http://www.boxbackup.org/wiki/CompilationOnWindows#WindowsService

> Before I got this far, I had upacked the distribution zip file in a path with 
> a space in the name: "C:\Local commands\boxbackup". This led to all sorts of 
> failures in bbackup-config, e.g. it assumes absolute path names begin with 
> '/'. I had to change the regexp to allow [A-Za-z]: between \A and /, eg. 
> m~\A(?:[A-Za-z]\:)?\/~, in two places.

I think it's easier to customise the configuration file from 
http://www.boxbackup.org/browser/box/trunk/bin/bbackupd/win32/bbackupd.conf 
instead of the standard Unix one.

> bbackupd-config calls system("...") with pathnames expanded in the double 
> quoted string. Since the path has spaces, the number of words is wrong. I 
> added \" around the variable expansion: system("openssl genrsa -out 
> \"$private_key\" 2048"). There are two instances of system() needing this 
> fix. There is also an open() whith a pipe argument that needs escaped quotes 
> around two of the arguments.

I'm afraid bbackupd-config doesn't work on Windows and probably never 
will. You might be able to use it with Cygwin to generate your keys, but 
you're still better off with the bbackupd.conf from the win32 subdirectory 
instead of the one generated by bbackupd-config.

> bbackupd-config also needs to be adapted to use NotifySysAdmin.vbs 
> instead of NotifySysAdmin.sh on windows. Even if a shell might be 
> available, sendmail is likely not.

That should already be done by win32/bbackupd.conf.

> There are many decisions that the user must make to get up and running. 
> Some of these are quite unimportant, as long as the setup is consistent. 
> A developer could make most of the decisions once and for all. I think 
> there should be a script to do the setup, installing all the files in 
> %PROGRAMFILES%\BoxBackup\*. (Using the PROGRAMFILES macro is necessary 
> because there may be no "C:/Program Files" in non-English environments.) 
> Use a template substitution mechanism like the one used by autoconf, 
> with template files, to write NotifySysAdmin.vbs and others. Or 
> NotifySysAdmin.vbs should be changed to read the configuration file to 
> get the email address and other data.

Can you help us to write that script? VBS might be a good language to 
write it in, with access to with Windows API for dialog boxes. There's 
also a Windows installer that can be built using InstallJammer, for which 
you can find the configuration files here:

http://www.boxbackup.org/browser/box/trunk/contrib/windows/installer

> Finally I would like if a win32 bbstored is far away. Is it? What would 
> be the major hurdles to port it?

There is an experimental port. It's good enough to make the tests pass on 
Windows. The main problem is that Windows' multi-process model is 
completely different to the Unix one, and the easiest workaround was to 
make bbstored single-threaded on Windows, which means it can only handle 
one client at a time.

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <chris+sig at qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |



More information about the Boxbackup mailing list