Bareos on FreeBSD

1,583 views
Skip to first unread message

Günter Gratzer

unread,
Aug 20, 2013, 10:03:11 AM8/20/13
to bareos...@googlegroups.com

Hi,

 

is there a Bareos package available for FreeBSD or must I build it from source?

 

Anyone has running bareos-sd on FreeBSD?

 

Regards

 

Günter

 

 

Jörg Steffens

unread,
Aug 21, 2013, 4:55:45 AM8/21/13
to bareos...@googlegroups.com
Hi G�nter,

Am 20.08.2013 16:03, schrieb G�nter Gratzer:
> is there a Bareos package available for FreeBSD or must I build it from
> source?

the Bareos project currently only provide binary packages for Linux
Distributions, Windows und MacOS (beta). The reasons that there are no
FreeBSD packages available are that:
- most of the project members working with Linux (and Solaris) most of
the time
- there hasn't been a customer requiring FreeBSD packages
- and that the Open Build Service which produces the packages does not
support FreeBSD.

However, I'm very curios about your findings regarding Bareos on FreeBSD.
Please let us (the mailinglist) know, if it works well for your
requirements or we need to adapt something for FreeBSD.

regards,
J�rg

--
J�rg Steffens joerg.s...@bareos.com
Bareos GmbH & Co. KG http://www.bareos.com

Sitz der Gesellschaft: K�ln | Amtsgericht K�ln: HRA 29646
Komplement�r: Bareos Verwaltungs-GmbH
Gesch�ftsf�hrer:
S. D�hr, M. Au�endorf, J�rg Steffens, P. Storz, M. v. Wieringen

Gour

unread,
Aug 21, 2013, 7:15:02 AM8/21/13
to bareos...@googlegroups.com
On Wed, 21 Aug 2013 10:55:45 +0200
Jörg Steffens <joerg.s...@bareos.com> wrote:

> However, I'm very curios about your findings regarding Bareos on
> FreeBSD. Please let us (the mailinglist) know, if it works well for
> your requirements or we need to adapt something for FreeBSD.

Let me just say that I'm also potentially interested for it.

At the moment I use Debian x86_64 (Sid) along with Amanda which is used
for storing my old video (hi8) and scanned (35mm) slides collection
along with backing up my desktop and netbook machines to LTO-2 tapes.

Amanda is not bad solution, but, similarly to Bacula, it sees that most
of the love is targetted at Enterprise and the core team is not very
big.

I did run Bacula in the past and considering it again (or Bareos) 'cause
if I need to do some quick restore sometime, Amanda is sloooow.

Otoh, I'm planning to migrate from Linux to Free/PC-BSD so having native
port would be great.


Sincerely,
Gour

--
You have a right to perform your prescribed duty, but you
are not entitled to the fruits of action. Never consider
yourself the cause of the results of your activities,
and never be attached to not doing your duty.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


Günter Gratzer

unread,
Aug 21, 2013, 9:30:03 AM8/21/13
to bareos...@googlegroups.com
Hi Jörg,

my plan is to create a FreeNAS storage for backups and I want to run bareos-sd on the FreeNAS System in a jail.
Well I'll keep you informed about my experiences, mybe I'll need some help to get the Bareos code compiled on FreeNAS ;-)
At the moment I also don't know to if it is possible to do this in the Jail because I'm new to FreeNAS.

Regards

Günter

Am Mittwoch, 21. August 2013 10:55:45 UTC+2 schrieb Jörg Steffens:
> Hi G�nter,
>
>
>
> Am 20.08.2013 16:03, schrieb G�nter Gratzer:
>
> > is there a Bareos package available for FreeBSD or must I build it from
>
> > source?
>
>
>
> the Bareos project currently only provide binary packages for Linux
>
> Distributions, Windows und MacOS (beta). The reasons that there are no
>
> FreeBSD packages available are that:
>
> - most of the project members working with Linux (and Solaris) most of
>
> the time
>
> - there hasn't been a customer requiring FreeBSD packages
>
> - and that the Open Build Service which produces the packages does not
>
> support FreeBSD.
>
>
>
> However, I'm very curios about your findings regarding Bareos on FreeBSD.
>
> Please let us (the mailinglist) know, if it works well for your
>
> requirements or we need to adapt something for FreeBSD.
>
>
>
> regards,
>
> J�rg
>
>
>
> --
>
> J�rg Steffens joerg.s...@bareos.com
>
> Bareos GmbH & Co. KG http://www.bareos.com
>
>
>
> Sitz der Gesellschaft: K�ln | Amtsgericht K�ln: HRA 29646
>
> Komplement�r: Bareos Verwaltungs-GmbH
>
> Gesch�ftsf�hrer:
>
> S. D�hr, M. Au�endorf, J�rg Steffens, P. Storz, M. v. Wieringen

Florian Ermisch

unread,
Aug 27, 2013, 1:53:35 PM8/27/13
to bareos...@googlegroups.com
Hi there,

running a SD in a FreeBSD-jail shouldn't be a problem as the daemon is
(in most cases) just opening a TCP-port and writing/reading files.
Might be a little tricky to let a jailed SD access something like a
tape drive.

According to [0] you should be able to create any of the jail types
available on FreeNAS and install the yet-to-create (or yet-to-derive-
from-the-Bacula-one) port for Bareos. And btw: deriving a port from the
Bacula one might be easier than building Bareos and all dependencies
from source.

I run Bacula on FreeBSD 9.1 at work and plan to switch to Bareos but
this won't happen until some time around january 2014. But if someone
publishes FreeBSD-port I may try to build and it on a VM ;)

Regards, FLorian

[0] http://doc.freenas.org/index.php/Jails

Am 21.08.2013 15:30, schrieb G�nter Gratzer:
> Hi J�rg,
>
> my plan is to create a FreeNAS storage for backups and I want to run bareos-sd on the FreeNAS System in a jail.
> Well I'll keep you informed about my experiences, mybe I'll need some help to get the Bareos code compiled on FreeNAS ;-)
> At the moment I also don't know to if it is possible to do this in the Jail because I'm new to FreeNAS.
>
> Regards
>
> G�nter
>
> Am Mittwoch, 21. August 2013 10:55:45 UTC+2 schrieb J�rg Steffens:
>> Hi G�nter,
>>
>>
>>
>> Am 20.08.2013 16:03, schrieb G�nter Gratzer:
>>
>>> is there a Bareos package available for FreeBSD or must I build it from
>>
>>> source?
>>
>>
>>
>> the Bareos project currently only provide binary packages for Linux
>>
>> Distributions, Windows und MacOS (beta). The reasons that there are no
>>
>> FreeBSD packages available are that:
>>
>> - most of the project members working with Linux (and Solaris) most of
>>
>> the time
>>
>> - there hasn't been a customer requiring FreeBSD packages
>>
>> - and that the Open Build Service which produces the packages does not
>>
>> support FreeBSD.
>>
>>
>>
>> However, I'm very curios about your findings regarding Bareos on FreeBSD.
>>
>> Please let us (the mailinglist) know, if it works well for your
>>
>> requirements or we need to adapt something for FreeBSD.
>>
>>
>>
>> regards,
>>
>> J�rg
>>
>>
>>
>> --
>>
>> J�rg Steffens joerg.s...@bareos.com
>>
>> Bareos GmbH & Co. KG http://www.bareos.com
>>
>>
>>
>> Sitz der Gesellschaft: K�ln | Amtsgericht K�ln: HRA 29646
>>
>> Komplement�r: Bareos Verwaltungs-GmbH
>>
>> Gesch�ftsf�hrer:
>>
>> S. D�hr, M. Au�endorf, J�rg Steffens, P. Storz, M. v. Wieringen
>

Günter Gratzer

unread,
Aug 28, 2013, 9:10:00 AM8/28/13
to bareos...@googlegroups.com, floh...@googlemail.com
Hi,

I just installed a Bacula-sd at the FreeNAS Jail. Was not so difficult for one who has no knowledge of FreeBSD/FreeNAS.

But I think the Problem I have now is that Bareos-dir and Bacula-sd are not compatible :-( Can any of the Bareos developers confirm this?

I Get the following error:

Fatal error: Storage daemon rejected Job command: 3915 Bad Job command. stat=-1 CMD: JobId=11600 job=abf022.2013-08-28_14.45.36_27 job_name=abf022 client_name=abf022-fd type=66 level=70 FileSet=LinuxAllFiles NoAttr=0 SpoolAttr=0 FileSetMD5=Oy/oa++LD9/eS0xdxj5hQC SpoolData=1 PreferMountedVols=1 SpoolSize=0 rerunning=0 VolSessionId=0 VolSessionTime=0 Quota=0 Protocol=0 BackupFormat=Native DumpLevel=0



Am Dienstag, 27. August 2013 19:53:35 UTC+2 schrieb Florian Ermisch:
> Hi there,
>
>
>
> running a SD in a FreeBSD-jail shouldn't be a problem as the daemon is
>
> (in most cases) just opening a TCP-port and writing/reading files.
>
> Might be a little tricky to let a jailed SD access something like a
>
> tape drive.
>
>
>
> According to [0] you should be able to create any of the jail types
>
> available on FreeNAS and install the yet-to-create (or yet-to-derive-
>
> from-the-Bacula-one) port for Bareos. And btw: deriving a port from the
>
> Bacula one might be easier than building Bareos and all dependencies
>
> from source.
>
>
>
> I run Bacula on FreeBSD 9.1 at work and plan to switch to Bareos but
>
> this won't happen until some time around january 2014. But if someone
>
> publishes FreeBSD-port I may try to build and it on a VM ;)
>
>
>
> Regards, FLorian
>
>
>
> [0] http://doc.freenas.org/index.php/Jails
>
>
>
> Am 21.08.2013 15:30, schrieb G�nter Gratzer:
>
> > Hi J�rg,
>
> >
>
> > my plan is to create a FreeNAS storage for backups and I want to run bareos-sd on the FreeNAS System in a jail.
>
> > Well I'll keep you informed about my experiences, mybe I'll need some help to get the Bareos code compiled on FreeNAS ;-)
>
> > At the moment I also don't know to if it is possible to do this in the Jail because I'm new to FreeNAS.
>
> >
>
> > Regards
>
> >
>
> > G�nter
>
> >
>
> > Am Mittwoch, 21. August 2013 10:55:45 UTC+2 schrieb J�rg Steffens:
>
> >> Hi G�nter,
>
> >>
>
> >>
>
> >>
>
> >> Am 20.08.2013 16:03, schrieb G�nter Gratzer:
>
> >>
>
> >>> is there a Bareos package available for FreeBSD or must I build it from
>
> >>
>
> >>> source?
>
> >>
>
> >>
>
> >>
>
> >> the Bareos project currently only provide binary packages for Linux
>
> >>
>
> >> Distributions, Windows und MacOS (beta). The reasons that there are no
>
> >>
>
> >> FreeBSD packages available are that:
>
> >>
>
> >> - most of the project members working with Linux (and Solaris) most of
>
> >>
>
> >> the time
>
> >>
>
> >> - there hasn't been a customer requiring FreeBSD packages
>
> >>
>
> >> - and that the Open Build Service which produces the packages does not
>
> >>
>
> >> support FreeBSD.
>
> >>
>
> >>
>
> >>
>
> >> However, I'm very curios about your findings regarding Bareos on FreeBSD.
>
> >>
>
> >> Please let us (the mailinglist) know, if it works well for your
>
> >>
>
> >> requirements or we need to adapt something for FreeBSD.
>
> >>
>
> >>
>
> >>
>
> >> regards,
>
> >>
>
> >> J�rg
>
> >>
>
> >>
>
> >>
>
> >> --
>
> >>
>
> >> J�rg Steffens joerg.s...@bareos.com
>
> >>
>
> >> Bareos GmbH & Co. KG http://www.bareos.com
>
> >>
>
> >>
>
> >>
>
> >> Sitz der Gesellschaft: K�ln | Amtsgericht K�ln: HRA 29646
>
> >>
>
> >> Komplement�r: Bareos Verwaltungs-GmbH
>
> >>
>
> >> Gesch�ftsf�hrer:
>
> >>
>
> >> S. D�hr, M. Au�endorf, J�rg Steffens, P. Storz, M. v. Wieringen
>
> >

Marco van Wieringen

unread,
Aug 28, 2013, 10:38:24 AM8/28/13
to bareos...@googlegroups.com
Günter Gratzer <guenter.gratzer <at> abf.co.at> writes:

>
> Hi,
>
> I just installed a Bacula-sd at the FreeNAS Jail. Was not so difficult for
one who has no knowledge of FreeBSD/FreeNAS.
>
> But I think the Problem I have now is that Bareos-dir and Bacula-sd are
not compatible Can any of the
> Bareos developers confirm this?
>
Its even a FAQ:

https://www.bareos.org/en/faq/items/bareos_bacula_compatibility.html

So NO you cannot run Bacula DIR against Bareos SD or Bareos DIR against
Bacula SD. The protocol between the DIR and SD is NOT versioned (never
has been in Bacula either.) So you need to install the same version
of the DIR and SD on components that talk to each other.

> I Get the following error:
>
> Fatal error: Storage daemon rejected Job command: 3915 Bad Job command.
stat=-1 CMD: JobId=11600
> job=abf022.2013-08-28_14.45.36_27 job_name=abf022 client_name=abf022-fd
type=66 level=70
> FileSet=LinuxAllFiles NoAttr=0 SpoolAttr=0
FileSetMD5=Oy/oa++LD9/eS0xdxj5hQC SpoolData=1
> PreferMountedVols=1 SpoolSize=0 rerunning=0 VolSessionId=0
VolSessionTime=0 Quota=0 Protocol=0
> BackupFormat=Native DumpLevel=0
>
>

Yes we have a much more extended DIR - SD protocol due to the many extra
things we support (like NDMP and SCSI crypto and a zillion more things.)

The bacula port is also kind of ugly as they rename the shared libs which
I think is insane. You probably should setup a FreeBSD VM with more
or less the same version used on FreeNAS and create an environment
there for building the source distribution. I installed one myself
and did a simple first test where the current master code compiles
right. But I have better things to do so don't expect packaged stuff
anytime soon.

--
Marco van Wieringen marco.van...@bareos.com
Bareos GmbH & Co. KG Phone: +49-221-63069389
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens,
P. Storz, M. v. Wieringen

Visit us at the Open Source Backup Conference, http://osbconf.org,
25th September 2013 in Cologne, Germany

Günter Gratzer

unread,
Aug 28, 2013, 10:49:05 AM8/28/13
to bareos...@googlegroups.com, marco.van...@bareos.com
Hi Marco,

thanks for your quick answer!

I have the same problem as you, lots of work, so I wanted to try a quick solution.

So the next step for me will be building Bareos from source distribution on a FreeBSD system.

regards

Günter

Günter Gratzer

unread,
Sep 3, 2013, 2:31:11 AM9/3/13
to bareos...@googlegroups.com, marco.van...@bareos.com
Hi Marco,

is there any documentation about how to compile/build bareos? I only found http://www.bareos.org/en/HOWTO/articles/how-to-contribute-to-bareos.html Howto Compile. Is this all I have to do?

I installed FreeBSD 9.1-RELEASE, downloaded the source code of Bareos and compiled it with the command found in Howto Compile.

You said you have already successfully compiled it on FreeBSD. Which version of FreeBSD do you use? Which additional packages did you install?

I get the following error:

Compiling scsi_lli.c
scsi_lli.c: In function 'bool do_scsi_cmd_page(int, const char*, void*, unsigned int, void*, unsigned int, int)':
scsi_lli.c:284: error: 'cam_getccv' was not declared in this scope
/usr/include/string.h:67: error: too few arguments to function 'void* memset(void*, int, size_t)'
scsi_lli.c:296: error: at this point in file
scsi_lli.c:296: error: expected `;' before ')' token
scsi_lli.c:302: error: expected primary-expression before ',' token
scsi_lli.c:308: error: 'SPP_SP_CMD_LEN' was not declared in this scope
scsi_lli.c:326: error: 'SAM_STAT_CHECK_CONDITION' was not declared in this scope
scsi_lli.c:327: error: 'SAM_STAT_COMMAND_TERMINATED' was not declared in this scope
*** [scsi_lli.lo] Error code 1

Stop in /usr/home/guenterg/bareos-Release-12.4.4/src/lib.


====== Error in /usr/home/guenterg/bareos-Release-12.4.4/src/lib ======


*** [all] Error code 1

Stop in /usr/home/guenterg/bareos-Release-12.4.4.

Do you know this error? I'm not sure if I did something wrong or if there is really a problem in the code because you said you compiled it without a problem.

Regards

Günter





Am Mittwoch, 28. August 2013 16:38:24 UTC+2 schrieb Marco van Wieringen:

Marco van Wieringen

unread,
Sep 3, 2013, 3:09:05 AM9/3/13
to bareos...@googlegroups.com
Günter Gratzer <guenter.gratzer <at> abf.co.at> writes:

>
> Hi Marco,
>
> is there any documentation about how to compile/build bareos? I only found
> http://www.bareos.org/en/HOWTO/articles/how-to-contribute-to-bareos.html >
Howto Compile. Is this all I have to do?
Each platform requires other configure flags. As you are only after
a working SD you should start with a minimum setting.

I came up with the following build script for my FreeBSD compile.

#!/bin/sh

CFLAGS="-O3"
CXXFLAGS="-O3"

export CFLAGS CXXFLAGS

./configure \
--prefix=/opt/bareos \
--with-plugindir=/opt/bareos/lib/plugins \
--with-sbin-perm=0555 \
--enable-lockmgr \
--enable-includes \
--enable-ipv6 \
--enable-dynamic-cats-backends \
--disable-bat \
--with-sqlite3=/usr/local \
--with-lzo=/usr/local \
--with-readline=/usr/local \
--disable-conio \
--enable-ndmp \
--enable-scsi-crypto

You probably can loose the last two e.g. change them to
--disable-ndmp
--disable-scsi-crypto

I install everything into /opt/bareos so I don't have to find all my
scripts and binaries all over the filesystem or in the already overcrouded
/usr/local dir.

>
> I installed FreeBSD 9.1-RELEASE, downloaded the source code of Bareos and
> compiled it with the command found in Howto Compile.
>
> You said you have already successfully compiled it on FreeBSD. Which
> version of FreeBSD do you use?
9.1

> Which additional packages did you install?
Quite some but that was mostly to get Gnome up and running in the VM.
I think you should make sure that at least readline, sqlite3 and lzo2
are installed of the ports as those are used in the above configure.

>
> I get the following error:
>
> Compiling scsi_lli.c
> scsi_lli.c: In function 'bool do_scsi_cmd_page(int, const char*, void*,
unsigned int, void*, unsigned
> int, int)':
> scsi_lli.c:284: error: 'cam_getccv' was not declared in this scope
> /usr/include/string.h:67: error: too few arguments to function 'void*
memset(void*, int, size_t)'
> scsi_lli.c:296: error: at this point in file
> scsi_lli.c:296: error: expected `;' before ')' token
> scsi_lli.c:302: error: expected primary-expression before ',' token
> scsi_lli.c:308: error: 'SPP_SP_CMD_LEN' was not declared in this scope
> scsi_lli.c:326: error: 'SAM_STAT_CHECK_CONDITION' was not declared in this
scope
> scsi_lli.c:327: error: 'SAM_STAT_COMMAND_TERMINATED' was not declared in
this scope
> *** [scsi_lli.lo] Error code 1
>
> Stop in /usr/home/guenterg/bareos-Release-12.4.4/src/lib.
>
> ====== Error in /usr/home/guenterg/bareos-Release-12.4.4/src/lib ======
>
> *** [all] Error code 1
>
> Stop in /usr/home/guenterg/bareos-Release-12.4.4.
>
> Do you know this error? I'm not sure if I did something wrong or if there
> is really a problem in the code because you said you compiled it without >
a problem.
It does when you don't enable SCSI crypto (which is not tested on FreeBSD
anyway.) But if you pull the latest 12.4/13.2 or master the above problem
is fixed just as is a problem in compiling the NDMP code. But as I said
above you can probably do without it for a SD only.

Günter Gratzer

unread,
Sep 3, 2013, 7:55:11 AM9/3/13
to bareos...@googlegroups.com, marco.van...@bareos.com
Hi Marco,

thank you for your help! I made it!
The Bareos SD is running and I did my first backup, about 150GB, without any problem.

I used the following script for compiling:

#!/bin/sh

CFLAGS="-O3"
CXXFLAGS="-O3"

export CFLAGS CXXFLAGS

./configure \
--prefix=/opt/bareos \
--with-plugindir=/opt/bareos/lib/plugins \
--with-sbin-perm=0555 \
--enable-lockmgr \
--enable-includes \
--disable-ipv6 \
--enable-dynamic-cats-backends \
--disable-bat \
--with-mysql \
--with-lzo=/usr/local \
--with-readline=/usr/local \
--disable-conio \
--disable-ndmp \
--disable-scsi-crypto


Regards

Günter
Message has been deleted

Günter Gratzer

unread,
Sep 5, 2013, 3:23:46 AM9/5/13
to bareos...@googlegroups.com, marco.van...@bareos.com
Hi,

I installed bareos-fd as well and it's working so fare without a problem.

The only thing which was a big problem is to start bareos at system startup. FreeBSD shell has a problem with "-". See my post at the FreeBSD forum http://forums.freebsd.org/showthread.php?t=41738
Maybe a FreeBSD expert find a solution how to keep the "-" in bareos-fd, bareos-sd and bareos-dir.

Regards

Günter

Jorgen Boberg

unread,
Feb 24, 2014, 6:00:46 PM2/24/14
to bareos...@googlegroups.com, marco.van...@bareos.com
Hello Gunter,
Do you have any notes of how you went about this. I want to connect my Dell TL4000 LTO-6 drive to FreeNAS and backup the two zfs volumes on it.

BR,
jorgen

Günter Gratzer

unread,
Mar 20, 2014, 11:12:26 AM3/20/14
to Jorgen Boberg, bareos...@googlegroups.com, marco.van...@bareos.com
Hello Jorgen,

I compiled bareos-fd on a FreeBSD system and installed it in a freenas pluginjail.

What do you like to know?

BR,

Günter
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To post to this group, send email to bareos...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Message has been deleted

stephen hoos

unread,
May 15, 2014, 4:14:17 PM5/15/14
to bareos...@googlegroups.com, Jorgen Boberg, marco.van...@bareos.com
Hello all,

I am very excited about this progress. This is exactly what I am looking for. According to the FreeNAS folks it is straight forward to make a ported program into a plugin. http://doc.freenas.org/index.php/Creating_your_own_PBIs
If someone creates a plugin it can be submitted to the FreeNAS folks, and then anyone can use it, and it will show up in the list of available plugins. That would give some great publicity to BAREOS, and could increase it adoption.
I am not a coder, but a sysadmin. I can help in testing it if need be.


Steve

Xinity

unread,
May 26, 2014, 4:54:54 PM5/26/14
to bareos...@googlegroups.com
Hi gunter,

Do you mind explaning how you achieved that?
As a heavy freenas user that would ease our migration process to bareos.

Thanks a lot,

Regards

Marco van Wieringen

unread,
May 27, 2014, 4:36:17 AM5/27/14
to bareos...@googlegroups.com
On 05/26/14 10:54 PM, Xinity wrote:
> Hi gunter,
>
> Do you mind explaning how you achieved that?
> As a heavy freenas user that would ease our migration process to bareos.
>
I think he installed only the storage daemon but you should be able to
compile
all daemons on FreeBSD. Keep in mind its not a port and we have not put any
effort into creating a port and the bacula port is kind of gross with
renaming
the shared libs etc.

There was a recipe posted by me and Gunter to build using sqlite3.

http://article.gmane.org/gmane.comp.sysutils.backup.bareos.user/207
http://article.gmane.org/gmane.comp.sysutils.backup.bareos.user/208

Xinity

unread,
May 27, 2014, 6:42:36 AM5/27/14
to bareos...@googlegroups.com, marco.van...@bareos.com
Thanks a lot

for our own usage, we only need the SD daemon :)
we plan on having director and SD seperated

i'll take a look at the recipe

many thanks,

Regards,
Reply all
Reply to author
Forward
0 new messages