Re: [Bacula-users] Restore to Windows client fails if file is too big

2018-02-19 Thread Kenneth Garges
Thanks to everyone that responded. I’ve solved the problem. 

We had 4 10Gbs network interfaces aggregated together using LACP. Running some 
tests trying to send data to a Windows client we found the problem is not just 
Bacula. Even ftp failed if the file size was bigger than about 1300 bytes. 

Turns out FreeBSD has some issues with more than 2 interfaces in a LAGG. We 
disconnected two and everything works using 2 10Gbs interfaces. 



> On 18Feb 2018, at 10:20 AM, Tilman Schmidt <til...@imap.cc> wrote:
> 
> [resent since the list server seems to work again now]
> 
> Am 14.02.2018 um 03:00 schrieb Kenneth Garges:
>> 
>>> On 10Feb 2018, at 1:29 PM, Tilman Schmidt <til...@imap.cc> wrote:
>>> 
>>> Any chance of checking on the firewall what's happening with the connection?
>> 
>> Looking at the firewall rules show it will pass anything on ports 9101-9103 
>> between the hosts. I have no reason to doubt that since backups work; only 
>> restores (and only if the file is large) fail.
> 
> Ah, it seems I haven't expressed myself clearly.
> I was referring to the firewall's logging and tracing capabilities to
> analyze how, when and why the connection is broken.
> 
> Besides, firewalls are capable of doing much more than blocking or
> allowing traffic on certain ports. They may break connections which
> haven't passed any traffic for a given time and are therefore considered
> idle - a frequent problem with Bacula through firewalls. They may limit
> connections to a certain duration, bandwidth, or amount of data
> transferred. They may intercept the content of connections and check
> whether it conforms to their preconceived notion of how traffic on that
> port looks like, whether it contains data that looks like malware
> (inbound) or like trade secrets, credit card numbers or social security
> numbers (outbound). Plenty of possibilities for interfering with
> applications even though their ports are allowed in the policy.
> 
> -- 
> Tilman Schmidt  E-Mail: til...@imap.cc
> Bonn, Germany
> Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
> Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Restore to Windows client fails if file is too big

2018-02-15 Thread Kenneth Garges


> On 10Feb 2018, at 1:29 PM, Tilman Schmidt <til...@imap.cc> wrote:
> 
> Any chance of checking on the firewall what's happening with the connection?

Looking at the firewall rules show it will pass anything on ports 9101-9103 
between the hosts. I have no reason to doubt that since backups work; only 
restores (and only if the file is large) fail.


> 
> PS: I'd prefer to continue the discussion on the mailing list instead of
> privately so that others can participate.
> 

Oops I meant to reply to the whole list but clicked the wrong button.


> Am 10.02.2018 um 20:10 schrieb Kenneth Garges:
>> Yes there is a router and a firewall. I should also mention the Windows 
>> client is a VM. The director and storage daemon is a physical box with 10Gbs 
>> Ethernet.  
>> 
>> No other issues that would make me suspicious of the network 
>> 

I am suspecting a network issue as well. I’m going to try to put this machine 
on a different network and try it.
Thanks for your input.


>>> On Feb 10, 2018, at 7:43 AM, Tilman Schmidt <til...@imap.cc> wrote:
>>> 
>>>> Am 10.02.2018 um 01:01 schrieb Kenneth Garges:
>>>> Backups work fine. Restores work fine if the file I restore is small (I
>>>> have done 192 byte files as a test.) But if the file is bigger (20MB)
>>>> then I get a broken pipe error. 
>>> 
>>>> 09-Feb 13:38 core-prod-bkp-3-sd JobId 170: Error: bsock.c:649 Write error 
>>>> sending 32772 bytes to client:128.114.115.72:9103: ERR=Broken pipe
>>> 
>>> At first glance I would assume a network problem.
>>> Are the SD and FD on the same LAN or are there any routers or firewalls
>>> in the way?
>>> 
>>> -- 
>>> Tilman Schmidt  E-Mail: til...@imap.cc
>>> Bonn, Germany
>>> Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
>>> Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> Bacula-users mailing list
>>> Bacula-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> -- 
> Tilman Schmidt  E-Mail: til...@imap.cc
> Bonn, Germany
> Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
> Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Restore to Windows client fails if file is too big

2018-02-09 Thread Kenneth Garges
Running Bacula 9.0.6 on FreeBSD 10.3-RELEASE-p24 and Bacula 7.4.4 on Windows 
2012R2 server.

Backups work fine. Restores work fine if the file I restore is small (I have 
done 192 byte files as a test.) But if the file is bigger (20MB) then I get a 
broken pipe error. 

Log from a successful restore of a small file: 

09-Feb 13:10 core-prod-bkp-3.ucsc.edu-dir JobId 169: Start Restore Job 
RestoreFiles.2018-02-09_13.10.36_22
09-Feb 13:10 core-prod-bkp-3.ucsc.edu-dir JobId 169: Using Device 
"FileChgr1-Dev2" to read.
09-Feb 13:10 core-prod-bkp-3-sd JobId 169: Ready to read from volume "Vol-0003" 
on File device "FileChgr1-Dev2" (/backups).
09-Feb 13:10 core-prod-bkp-3-sd JobId 169: Forward spacing Volume "Vol-0003" to 
addr=20704536097
09-Feb 13:10 core-prod-bkp-3-sd JobId 169: Elapsed time=00:00:01, Transfer 
rate=344  Bytes/second
09-Feb 13:10 core-prod-bkp-3.ucsc.edu-dir JobId 169: Bacula 
core-prod-bkp-3.ucsc.edu-dir 9.0.6 (20Nov17):
  Build OS:   x86_64-unknown-freebsd10.3 freebsd 10.3-RELEASE-p24
  JobId:  169
  Job:RestoreFiles.2018-02-09_13.10.36_22
  Restore Client: bac-test-12r2
  Start time: 09-Feb-2018 13:10:39
  End time:   09-Feb-2018 13:10:42
  Files Expected: 1
  Files Restored: 1
  Bytes Restored: 192
  Rate:   0.1 KB/s
  FD Errors:  0
  FD termination status:  OK
  SD termination status:  OK
  Termination:Restore OK


Log from a failed restore of a larger file: 

09-Feb 13:32 core-prod-bkp-3.ucsc.edu-dir JobId 170: Start Restore Job 
RestoreFiles.2018-02-09_13.32.35_24
09-Feb 13:32 core-prod-bkp-3.ucsc.edu-dir JobId 170: Using Device 
"FileChgr1-Dev2" to read.
09-Feb 13:32 core-prod-bkp-3-sd JobId 170: Ready to read from volume "Vol-0003" 
on File device "FileChgr1-Dev2" (/backups).
09-Feb 13:32 core-prod-bkp-3-sd JobId 170: Forward spacing Volume "Vol-0003" to 
addr=17704728433
09-Feb 13:38 core-prod-bkp-3-sd JobId 170: Error: bsock.c:649 Write error 
sending 32772 bytes to client:128.114.115.72:9103: ERR=Broken pipe
09-Feb 13:38 core-prod-bkp-3-sd JobId 170: Fatal error: read.c:176 Error 
sending data to Client. ERR=Broken pipe
09-Feb 13:38 core-prod-bkp-3-sd JobId 170: Elapsed time=00:05:13, Transfer 
rate=209  Bytes/second
09-Feb 13:38 core-prod-bkp-3-sd JobId 170: Error: bsock.c:537 Socket has 
errors=1 on call to client:128.114.115.72:9103
09-Feb 13:51 bac-test-12r2 JobId 170: Error: lib/bsock.c:918 Read error from 
Storage daemon:core-prod-bkp-3.ucsc.edu:9103: ERR=Input/output error
09-Feb 13:51 bac-test-12r2 JobId 170: Fatal error: filed/restore.c:479 Data 
record error. ERR=Input/output error
09-Feb 13:53 core-prod-bkp-3.ucsc.edu-dir JobId 170: Error: Bacula 
core-prod-bkp-3.ucsc.edu-dir 9.0.6 (20Nov17):
  Build OS:   x86_64-unknown-freebsd10.3 freebsd 10.3-RELEASE-p24
  JobId:  170
  Job:RestoreFiles.2018-02-09_13.32.35_24
  Restore Client: bac-test-12r2
  Start time: 09-Feb-2018 13:32:37
  End time:   09-Feb-2018 13:53:42
  Files Expected: 1
  Files Restored: 1
  Bytes Restored: 0
  Rate:   0.0 KB/s
  FD Errors:  1
  FD termination status:  Error
  SD termination status:  Error
  Termination:*** Restore Error ***


The bacula-sd.conf file on the Windows client: 

#
# UCSC Bacula File Daemon Configuration file
#
#  For Bacula release 7 -- Windows
#
# Change here except perhaps the File daemon Name to
# the fully qualified name of the host
#
# Copyright (C) 2000-2015 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
# Modified for UCSC 12 Dec 2017 Kenneth Garges

#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = core-prod-bkp-3.ucsc.edu <http://core-prod-bkp-3.ucsc.edu/>-dir
  Password = “"
}

#
# "Global" File daemon configuration specifications
#
FileDaemon {  # this is me
  Name = bac-tst-12r2.ucsc.edu <http://bac-tst-12r2.ucsc.edu/>
  FDport = 9102  # where we listen for the director
  WorkingDirectory = C:\WINDOWS\TEMP
  Pid Directory = C:\WINDOWS\TEMP
  Maximum Concurrent Jobs = 20
  Maximum Network Buffer Size = 32768
}

# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = core-prod-bkp-3-dir = all, !skipped, !restored
}


I’ve tried it with "Maximum Network Buffer Size" set to 32768, 32700, and not 
set at all. 

Any ideas?


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Problems getting a tape library to work under FreeBSD

2018-02-07 Thread Kenneth Garges
That might be the issue. Somebody does something in the web interface that 
takes the changer offline, clicks OK at the warning message. Then later when 
it’s back online FreeBSD doesn’t figure that out and needs a reboot. 

Probably an issue that should be addressed with FreeBSD rather than Bacula.




> On 6Feb 2018, at 6:50 PM, Alan Brown <a.br...@ucl.ac.uk> wrote:
> 
> On 07/02/18 02:01, Kenneth Garges wrote:
>> Permissions and ownership are ok. I think I figured out the problem.
>> 
>> Both mtx and chio would work for a while, then stop working returning only 
>> “Inappropriate ioctl for device” or other errors. The culprit I think is a 
>> library management tool by Quantum. The library provides a web interface 
>> that allows you to check status, move tapes around, and various utilities. 
>> 
>> Problem is if you use that web interface it gets the server (both Bacula SD 
>> and Director on the same FreeBSD box) wedged such that mtx and chio always 
>> fail.
> 
> Yes - and if it's about to do anything which takes the changer offline
> the web ui gives a warning message and asked if you want to continue.
> 
>> Unknown to me, the operations staff had been using that web interface while 
>> I was testing. After I asked them to stop my system seems to work reliably. 
> 
> I hope you changed the password and put the changer in its own IP subnet
> after that.
> 
> I wrote some kludgy shell scripts (originally for Neo4000, then Neo 8000
> and now Quantum i500 - portable as far as I know) which automate loading
> and unloading of the changer (imported tapes are scattered randomly
> around available slots to ensure even wear and tear) - these mean that
> all operations staff have to do is open the magazine to load/unload
> tapes when emailed to do so by Bacula.
> 
> Dan can probably improve them considerably.
> 
> As an adjunct to that another script works out which tapes are oldest
> (if in the scratch pool) or about to expire (if none are in the scratch
> pool) and asks staff to pull them out of the safe.
> 
> I also submitted some chages to the mtx-changer script a while ago which
> check that the changer's actually ready before attempting to send it
> commands. Kern's been sitting on them for a couple of years.
> 
> 
> There are some pretty whizzy things you can do to monitor tape health
> when a tape is in the changer using the sg_attr and sg_logs commands
> that go _far _ beyond Tapealart or smartmontools capabilities.
> 
> I've submitted a number of updates to sg_utils and am in the process of
> (slowly) reverse engineering what I can from the MAMs that's not well
> documented using text output provided by veritape (proprietary, windows
> tool from mptapes.com which reads MAMs).
> 
> Selfish motivation is (of course) to reduce the amount of time I have to
> spend manually scanning tapes with the windows program/standalone
> scanner then interpreting output. All of that information is available
> when the tape is in the drive and with appropriate MAM reads at
> load/unload it's possible to have the bacula server tell me when a tape
> is approaching end of life (this is far more accurate than the metrics
> bacula uses of simple load cycles.) - and more importantly, when tape
> drives are going bad.
> 
> Having spent several man-years dealing with the fallout of bad LTO tapes
> damaging drives and then those drives damaging tapes, I want to minimize
> the pain if it ever happens again.
> 
> (LTO drives even return detailed information about the condition of each
> of the heads if queried the right way. This data is interpreted by IBM
> or HP's proprietary tools to give reports but they use the same queries
> as sg_logs does to get it)
> 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Problems getting a tape library to work under FreeBSD

2018-02-06 Thread Kenneth Garges
Permissions and ownership are ok. I think I figured out the problem.

Both mtx and chio would work for a while, then stop working returning only 
“Inappropriate ioctl for device” or other errors. The culprit I think is a 
library management tool by Quantum. The library provides a web interface that 
allows you to check status, move tapes around, and various utilities. 

Problem is if you use that web interface it gets the server (both Bacula SD and 
Director on the same FreeBSD box) wedged such that mtx and chio always fail.

Unknown to me, the operations staff had been using that web interface while I 
was testing. After I asked them to stop my system seems to work reliably. 

Thanks to all that chimed in on this thread. It was very helpful.


> On 6Feb 2018, at 4:07 AM, Alan Brown  wrote:
> 
> On 03/02/18 13:45, Dan Langille wrote:
>>> *ahem*
>>> 
>>> MTX is _only_ designed to interface to scsi generic devices. Unless 
>>> /dev/pass42 is another name for the generic device you'll have problems.
>> Can confirm /dev/pass* devices on FreeBSD are the right thing to use. From 
>> https://dan.langille.org/2016/02/04/dell-tl4000-tape-library-running-btape-and-configuring-baculas-mtx-changer/
> 
> What about permissions and ownership vs what bacula-sd is running as?
> 
> 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Problems getting a tape library to work under FreeBSD

2018-02-02 Thread Kenneth Garges
Thanks for your help.

> On 2Feb 2018, at 4:07 AM, Alan Brown <a.br...@ucl.ac.uk> wrote:
> 
> On 31/01/18 03:23, Kenneth Garges wrote:
>> I’m having trouble getting a tape library to work. Individual tape drive 
>> seems ok but the library sometimes makes btape hang requiring a reboot. Or 
>> it fails.
> 
> 
> >  # Define a Virtual autochanger
> 
> Remove anything you're not actually using.  They're just going to add 
> confusion.

We’re using the virtual auto changer. Works fine. I’m trying to add a tape 
library to a running system.


> 
>> # Quantum Scalar i80 tape library at UCSC
>> # Hostname of library: core-prod-jb-2
>> #
>> Autochanger {
>>   Name = "core-prod-jb-2"
>>   Device = "Drive1"
>> # Device = "Drive2"
>>   Changer Command = "/usr/local/etc/bacula/mtx-changer %c %o %S %a %d"
>> #  Changer Device = /dev/ch0
>>   Changer Device = /dev/pass42
>> }
> 
> *ahem*
> 
> MTX is _only_ designed to interface to scsi generic devices. Unless 
> /dev/pass42 is another name for the generic device you'll have problems.

I believe that /dev/pass42 is the generic SCSI device. /dev/ch0 is also 
provided. That’s what this implies:

# camcontrol devlist
…
   at scbus8 target 0 lun 0 (pass41,sa0)
  at scbus8 target 0 lun 1 (pass42,ch0)



> 
> What do "tapeinfo -f /dev/pass42" and "loaderinfo -f /dev/pass42" give you?
> 
> You should see something like this:
> 
> # tapeinfo -f /etc/bacula/DEVICES/MSSLYF-changer
> Product Type: Medium Changer
> Vendor ID: 'QUANTUM '
> Product ID: 'Scalar i500 '
> Revision: '690G'
> Attached Changer API: No
> SerialNumber: 'QUANTUMA0C0xx_LLA   '
> SCSI ID: 2
> SCSI LUN: 1
> Ready: yes
> 
> # loaderinfo -f /etc/bacula/DEVICES/MSSLYF-changer
> Product Type: Medium Changer
> Vendor ID: 'QUANTUM '
> Product ID: 'Scalar i500 '
> Revision: '690G'
> Attached Changer: No
> Bar Code Reader: Yes
> EAAP: Yes
> Number of Medium Transport Elements: 1
> Number of Storage Elements: 83
> Number of Import/Export Elements: 18
> Number of Data Transfer Elements: 6
> Transport Geometry Descriptor Page: Yes
> Invertable: No
> Device Configuration Page: Yes
> Storage: Data Transfer, Import/Export, Storage
> SCSI Media Changer (rev 2): No
> Transfer Medium Transport: ->Import/Export, ->Storage
> Transfer Storage: ->Data Transfer, ->Import/Export, ->Storage
> Transfer Import/Export: ->Data Transfer, ->Import/Export, ->Storage
> Transfer Data Transfer: ->Data Transfer, ->Import/Export, ->Storage
> Exchange Medium Transport: None
> Exchange Storage: None
> Exchange Import/Export: None
> Exchange Data Transfer: None
> 
> 

Yes I think these are good:

# tapeinfo -f /dev/pass42
Product Type: Medium Changer
Vendor ID: 'QUANTUM '
Product ID: 'Scalar i40-i80  '
Revision: '180G'
Attached Changer API: No
SerialNumber: 'QUANTUMD1H0420126_LLB   '
Ready: yes

# loaderinfo -f /dev/pass42
Product Type: Medium Changer
Vendor ID: 'QUANTUM '
Product ID: 'Scalar i40-i80  '
Revision: '180G'
Attached Changer: No
Bar Code Reader: Yes
EAAP: Yes
Number of Medium Transport Elements: 1
Number of Storage Elements: 49
Number of Import/Export Elements: 5
Number of Data Transfer Elements: 2
Transport Geometry Descriptor Page: Yes
Invertable: No
Device Configuration Page: Yes
Storage: Data Transfer, Import/Export, Storage
SCSI Media Changer (rev 2): No
Transfer Medium Transport: ->Import/Export, ->Storage
Transfer Storage: ->Data Transfer, ->Import/Export, ->Storage
Transfer Import/Export: ->Data Transfer, ->Import/Export, ->Storage
Transfer Data Transfer: ->Data Transfer, ->Import/Export, ->Storage
Exchange Medium Transport: None
Exchange Storage: None
Exchange Import/Export: None
Exchange Data Transfer: None

> Operating systems may provide a /dev/changer or /dev/chio device but that 
> doesn't mean it's the same thing as the generic.
> 
> The other thing to check is that the device is readable _and writable_ by the 
> UID that's running bacula-sd - the default for the /dev/pass devices on the 
> BSD systems here is 0600:root:operator and bacula-sd runs as user bacula.
> 

I set that up this way:
# ls -l /dev/pass41 /dev/pass42 /dev/ch0 /dev/nsa0
crw-rw  1 root  operator  0x77 Feb  1 16:03 /dev/ch0
crw-rw  1 root  operator  0x72 Feb  1 16:19 /dev/nsa0
crw-rw  1 root  operator  0xa2 Feb  1 16:03 /dev/pass41
crw-rw  1 root  operator  0xa3 Feb  1 16:03 /dev/pass42

UID bacula is in the operator group.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Problems getting a tape library to work under FreeBSD

2018-02-01 Thread Kenneth Garges

> On 31Jan 2018, at 12:57 AM, Cejka Rudolf <cej...@fit.vutbr.cz> wrote:
> 
> Kenneth Garges wrote (2018/01/30):
>> I???m having trouble getting a tape library to work.
> 
> Hello, try chio status -v or mtx status. Both should return
> status of your autochanger including tape labels. If they both
> do return an error, do you have correct permissons on /dev/ch*?
> I have the following (please note the operator group):
> 
> bacula> ls -l /dev/ch*
> crw-rw  1 root  operator  0x9e 11 led 11:31 /dev/ch0
> bacula> id bacula
> uid=366(bacula) gid=366(bacula) groups=366(bacula),0(wheel),5(operator)
> 
> If mtx returns an error but chio does work, please try chio-changer-freebsd,
> which uses FreeBSD's native chio instead of mtx from ports.
> 
> -- 
> Rudolf Cejka  http://www.fit.vutbr.cz/~cejkar
> Brno University of Technology, Faculty of Information Technology
> Bozetechova 2, 612 66  Brno, Czech Republic



I tried chio but gave up on it because anything I did gave an "Inappropriate 
ioctl for device" error. Now that a reboot seems to have gotten mtx working I 
found that chio works too. 
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Problems getting a tape library to work under FreeBSD

2018-02-01 Thread Kenneth Garges
Thanks for all the suggestions.

> On 30Jan 2018, at 8:03 PM, Dan Langille <d...@langille.org> wrote:
> 
>> On Jan 30, 2018, at 10:23 PM, Kenneth Garges <gar...@ucsc.edu 
>> <mailto:gar...@ucsc.edu>> wrote:
>> 
>> I’m having trouble getting a tape library to work. Individual tape drive 
>> seems ok but the library sometimes makes btape hang requiring a reboot. Or 
>> it fails.
> 
> Fix that first.

I’m not sure how to fix it. Sometimes it just gets wedged into this state where 
even running mtx status will fail with Inquiry Command failed. Then a reboot 
and it works. For a while. Then something happens and it’s wedged again.



>> 
>> My system is FreeBSD 10.3-RELEASE-p24. I compiled bacula-9.0.6 from source. 
>> I have a Quantum Scalar i80 tape library with an LTO-4 drive attached via 
>> fiber channel. 
> 
> If you can I suggest using the packages.  It's what I do.  I am also the 
> FreeBSD packager.
> 
> I do not think this is the cause of the issues.
> 

I wanted to use a package but could not find any that had both psql and openssl 
options. 

>> 
>> #
>> # Define a Virtual autochanger
>> #
>> Autochanger {
>>  Name = FileChgr1
>>  Device = FileChgr1-Dev1, FileChgr1-Dev2
>>  Changer Command = ""
>>  Changer Device = /dev/null
>> }
> 
> I suggest trying must one Device in here for now.

Yes that’s what I’m doing with the tape library device. The second tape drive 
is commented out.


>> 
>> # btape -c /etc/bacula/bacula-sd.conf -v -d 99 /dev/nsa0
>> Tape block granularity is 1024 bytes.
>> btape: address_conf.c:274-0 Initaddr 0.0.0.0:9103 
>> btape: butil.c:290-0 Using device: "/dev/nsa0" for writing.
>> btape: autochanger.c:328-0 Locking changer core-prod-jb-2
>> 30-Jan 19:08 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0" 
>> command.
>> btape: autochanger.c:284-0 Run program=/usr/local/etc/bacula/mtx-changer 
>> /dev/pass42 loaded 0 /dev/nsa0 0
>> btape: autochanger.c:286-0 run_prog: /usr/local/etc/bacula/mtx-changer 
>> /dev/pass42 loaded 0 /dev/nsa0 0 stat=268435457 result=RequestSense (0x03) 
>> failed
> 
> I think you need more testing on the command line with mtx-changer. See below.
> …

Yeah all those errors happened when it was wedged. I didn’t realize it. After a 
reboot they work. 


> 
> I have documented most of my setup procedure on FreeBSD.
> 
> Getting mtx working first.  Then mtx-changers.  Verify permissions on devices 
> for the bacula user.
> 
> These might help, based on 
> https://dan.langille.org/?s=mtx-changer= 
> <https://dan.langille.org/?s=mtx-changer=>
> 
> https://dan.langille.org/2016/02/04/dell-tl4000-tape-library-running-btape-and-configuring-baculas-mtx-changer/
>  
> <https://dan.langille.org/2016/02/04/dell-tl4000-tape-library-running-btape-and-configuring-baculas-mtx-changer/>
> 
> This example has more on permissions:
> 
> https://www.freebsddiary.org/tape-library-integration.php 
> <https://www.freebsddiary.org/tape-library-integration.php>
> 
> Hope that gets you started.
> 
> -- 
> Dan Langille - BSDCan / PGCon
> d...@langille.org <mailto:d...@langille.org>

Thanks for your efforts documenting all this. I have read most if not all of it.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Restores to Windows client: Little files work but big ones do not

2018-01-23 Thread Kenneth Garges
I just set up Bacula with a couple test hosts. Backups and restores are working 
for a test UNIX host. Backups for a test Windows 2012r2 host work. Restores of 
small files to the Windows host work. But restores of large files fail. 

Here’s a restore of a small file (192 bytes): 

# bconsole
Connecting to Director localhost:9101
1000 OK: 103 core-prod-bkp-3.ucsc.edu-dir Version: 9.0.6 (20 November 2017)
Enter a period to cancel a command.
*restore
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"

First you select one or more JobIds that contain files
to be restored. You will be presented several methods
of specifying the JobIds. Then you will be allowed to
select which files from those JobIds are to be restored.

To select the JobIds, you have the following choices:
 1: List last 20 Jobs run
 2: List Jobs where a given File is saved
 3: Enter list of comma separated JobIds to select
 4: Enter SQL list command
 5: Select the most recent backup for a client
 6: Select backup for a client before a specified time
 7: Enter a list of files to restore
 8: Enter a list of files to restore before a specified time
 9: Find the JobIds of the most recent backup for a client
10: Find the JobIds for a backup for a client before a specified time
11: Enter a list of directories to restore for found JobIds
12: Select full restore to a specified Job date
13: Cancel
Select item:  (1-13): 5
Defined Clients:
 1: apm-dev-tools-1
 2: bac-test-12r2
 3: core-prod-bkp-3
 4: core-prod-bkp-3.ucsc.edu-fd
Select the Client (1-4): 2
Automatically selected FileSet: WindowsStandardDirective
+---+---+--++-++
| jobid | level | jobfiles | jobbytes   | starttime   | volumename |
+---+---+--++-++
|10 | F |  212,928 | 22,851,436,475 | 2018-01-05 19:00:03 | Vol-0001   |
|10 | F |  212,928 | 22,851,436,475 | 2018-01-05 19:00:03 | Vol-0002   |
|42 | D |3,520 |  6,605,441,137 | 2018-01-12 19:00:03 | Vol-0002   |
|46 | I |2,402 |  3,425,386,771 | 2018-01-13 19:00:03 | Vol-0002   |
|50 | I |  274 |  3,063,170,936 | 2018-01-14 19:00:03 | Vol-0002   |
|54 | I |  267 |  2,973,663,925 | 2018-01-15 19:00:03 | Vol-0002   |
|59 | I |  255 |  2,950,254,100 | 2018-01-16 19:00:03 | Vol-0002   |
|63 | I |  338 |  2,926,837,546 | 2018-01-17 19:00:03 | Vol-0002   |
|67 | I |  570 |  3,675,542,094 | 2018-01-18 19:00:02 | Vol-0003   |
|67 | I |  570 |  3,675,542,094 | 2018-01-18 19:00:02 | Vol-0002   |
|86 | I |  374 |  3,270,550,109 | 2018-01-22 19:00:03 | Vol-0003   |
+---+---+--++-++
You have selected the following JobIds: 10,42,46,50,54,59,63,67,86

Building directory tree for JobId(s) 10,42,46,50,54,59,63,67,86 ...  
+++
185,212 files inserted into the tree.

You are now entering file selection mode where you add (mark) and
remove (unmark) files to be restored. No files are initially added, unless
you used the "all" keyword on the command line.
Enter "done" to leave this mode.

cwd is: /
$ ls
C:/
D:/
$ cd C:/
cwd is: C:/
$ cd Users
cwd is: C:/Users/
$ cd admin.jjendrea
cwd is: C:/Users/admin.jjendrea/
$ mark ntuser.ini
1 file marked.
$ done
Bootstrap records written to 
/var/db/bacula/core-prod-bkp-3.ucsc.edu-dir.restore.2.bsr

The Job will require the following (*=>InChanger):
   Volume(s) Storage(s)SD Device(s)
===
   
Vol-0001  FileChgr1-Dev1FileChgr1   
 

Volumes marked with "*" are in the Autochanger.


1 file selected to be restored.

Using Catalog "MyCatalog"
Run Restore job
JobName: RestoreFiles
Bootstrap:   /var/db/bacula/core-prod-bkp-3.ucsc.edu-dir.restore.2.bsr
Where:   /tmp/bacula-restores
Replace: Always
FileSet: Testing Set
Backup Client:   bac-test-12r2
Restore Client:  bac-test-12r2
Storage: FileChgr1-Dev1
When:2018-01-23 16:28:14
Catalog: MyCatalog
Priority:10
Plugin Options:  *None*
OK to run? (yes/mod/no): mod
Parameters to modify:
 1: Level
 2: Storage
 3: Job
 4: FileSet
 5: Restore Client
 6: When
 7: Priority
 8: Bootstrap
 9: Where
10: File Relocation
11: Replace
12: JobId
13: Plugin Options
Select parameter to modify (1-13): 9
Please enter the full path prefix for restore (/ for none): C:/WINDOWS/TEMP
Run Restore job
JobName: RestoreFiles
Bootstrap:   /var/db/bacula/core-prod-bkp-3.ucsc.edu-dir.restore.2.bsr
Where:   C:/WINDOWS/TEMP
Replace: Always
FileSet: Testing Set
Backup 

Re: [Bacula-users] Problem installing bacula on Solaris 10

2014-10-31 Thread Kenneth Garges
Thanks for the suggestion. I avoided it because everyone in the office here 
said stay away from SunStudio, gcc is way better, Solaris compilers are evil, 
blah blah.

But I tried it and it did clear up that error. Got past the configure stage and 
most of make ran. Still not all the way there but further.


Kenneth Garges
gar...@ucsc.edu



On 25Oct 2014, at 9:03 AM, Phil Stracchino ph...@caerllewys.net wrote:

 
 Ken,
 For what it's worth, I have found it to be better on Solaris to compile
 Bacula using Sun Studio.  The last release Sun Studio packages for
 Solaris 10 are, to the best of my knowledge, still a free download.
 
 This is my Solaris 10 configure line.  At this point, the Solaris 10
 machine runs only a client and an SD, but this may help you.
 
 
 CC=/usr/bin/CC CXX=${CC} LDFLAGS=-m64 CFLAGS='-fast -xarch=generic
 -xtarget=generic -xcache=generic -m64' CPPFLAGS=${CFLAGS} ./configure
 --prefix=/opt/bacula --with-dump-email=r...@caerllewys.net
 --with-job-email=r...@caerllewys.net
 --with-smtp-host=smtp.caerllewys.net --with-subsys-dir=/opt/bacula/var
 --with-working-dir=/opt/bacula/var --disable-build-dird
 --with-mysql=/opt/mysql/mysql
 
 
 Make is gmake 3.81.
 
 
 -- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: 603.293.8485
 
 --
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Problem installing bacula on Solaris 10

2014-10-27 Thread Kenneth Garges
Thanks for the suggestion. I tried it by changing the SHELL = /bin/sh line to 
SHELL = /usr/bin/bash in the Makefile. Unfortunately I get the same error 
although with a different code number:

-bash-3.2$ /opt/csw/bin/gmake DESTDIR= depend
/usr/bin/bash: # DO NOT DELETE: nice dependency list follows: command not found
gmake: *** [depend] Error 127




Kenneth Garges
gar...@ucsc.edu



On 25Oct 2014, at 5:21 AM, Ana Emília M. Arruda emiliaarr...@gmail.com wrote:

 Hi Kenneth,
 
 I'm not a Solaris expert, but have you tried using bash instead of Bourne 
 shell (sh)?
 
 Best regards,
 Ana
 
 On Fri, Oct 24, 2014 at 9:45 PM, Kenneth Garges gar...@ucsc.edu wrote:
 I’m trying to build  Bacula 7.0.4 on a Solaris 10 box (Sun T5220) but am 
 getting this error during the configure:
 
 Doing make of dependencies
 ==Entering directory /home/garges/bacula-7.0.4/src
 ==Entering directory /home/garges/bacula-7.0.4/scripts
 ==Entering directory /home/garges/bacula-7.0.4/src/lib
 mksh: Fatal error in reader: = missing from replacement macro reference
 Current working directory /home/garges/bacula-7.0.4/src/lib
 *** Error code 1
 The following command caused the error:
 for I in src scripts src/lib src/findlib src/filed  src/console 
 src/plugins/fd src/cats src/dird src/stored src/tools manpages; \
   do (cd $I; echo ==Entering directory `pwd`; make DESTDIR= depend || exit 
 1); done
 make: Fatal error: Command failed for target `depend'
 chmod: WARNING: can't access storage-ctl
 chmod: WARNING: can't access bsg_persist
 
 Following a suggestion I read on the net I changed line 52 of Makefile.in to 
 force configure to use gmake instead of the Solaris make:
 
 -bash-3.2$ more +52 -1 Makefile.in
   do (cd $$I; echo ==Entering directory `pwd`; /opt/csw/bin/gmake 
 DESTDIR=$(DESTDIR) $@ || exit 1); done
 
 That changes the error to:
 
 Doing make of dependencies
 ==Entering directory /home/garges/bacula-7.0.4/src
 gmake[1]: Entering directory `/home/garges/bacula-7.0.4/src'
 gmake[1]: Nothing to be done for `depend'.
 gmake[1]: Leaving directory `/home/garges/bacula-7.0.4/src'
 ==Entering directory /home/garges/bacula-7.0.4/scripts
 gmake[1]: Entering directory `/home/garges/bacula-7.0.4/scripts'
 gmake[1]: `depend' is up to date.
 gmake[1]: Leaving directory `/home/garges/bacula-7.0.4/scripts'
 ==Entering directory /home/garges/bacula-7.0.4/src/lib
 gmake[1]: Entering directory `/home/garges/bacula-7.0.4/src/lib'
 /bin/sh: # DO NOT DELETE: nice dependency list follows: not found
 gmake[1]: *** [depend] Error 1
 gmake[1]: Leaving directory `/home/garges/bacula-7.0.4/src/lib'
 *** Error code 1
 The following command caused the error:
 for I in src scripts src/lib src/findlib src/filed  src/console 
 src/plugins/fd src/cats src/dird src/stored src/tools manpages; \
   do (cd $I; echo ==Entering directory `pwd`; /opt/csw/bin/gmake DESTDIR= 
 depend || exit 1); done
 make: Fatal error: Command failed for target `depend'
 chmod: WARNING: can't access storage-ctl
 chmod: WARNING: can't access bsg_persist
 
 Trying to run it manually gives the same error:
 
 -bash-3.2$ cd src/lib
 -bash-3.2$ /opt/csw/bin/gmake DESTDIR= depend
 /bin/sh: # DO NOT DELETE: nice dependency list follows: not found
 gmake: *** [depend] Error 1
 
 The error seems to imply the shell is trying to execute the last line of the 
 Makefile.in which is a comment!
 -bash-3.2$ tail -2 Makefile.in
 # DO NOT DELETE: nice dependency list follows
 
 -bash-3.2$ tail -2 Makefile
 
 # ---
 
 
 
 So I’m stumped. What should I try next?
 
 
 
 
 Here’s the whole dialog:
 
 PATH=/opt/csw/bin:/usr/bin:/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/ucb:/usr/sbin
 export PATH
 
 LDFLAGS=-L/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib/openssl 
 -R/opt/csw/lib/openssl -I/opt/csw/include -I/opt/csw/include/openssl
 export LDFLAGS
 
 CFLAGS=-g -I/opt/csw/include -lcrypto -lssl -L/opt/csw/lib -R/opt/csw/lib
 export CFLAGS
 
 ./configure \
   --sbindir=/usr/local/bin \
   --sysconfdir=/etc/bacula \
   --with-postgresql=/opt/csw \
   --enable-smartalloc \
   --with-pid-dir=/var/bacula/working \
   --with-subsys-dir=/var/bacula/subsys \
   --with-working-dir=/var/bacula/working \
   --with-dir-user=bacula \
   --with-dir-group=backup \
   --with-sd-user=bacula \
   --with-sd-group=backup \
   --with-fd-user=root \
   --with-fd-group=backup \
   --with-dump-email=gar...@ucsc.edu \
   --with-job-email=gar...@ucsc.edu \
   --with-smtp-host=smtp.ucsc.edu \
   --with-openssl=/opt/csw \
   --disable-ipv6 --disable-batch-insert
 
 checking for true... /usr/bin/true
 checking for false... /usr/bin/false
 configuring for Bacula 7.0.4 (04 June 2014)
 checking for gcc... gcc
 checking whether the C compiler works... yes
 checking for C compiler default output file name... a.out
 checking for suffix of executables... 
 checking whether we are cross compiling... no
 checking for suffix of object files... o
 checking

Re: [Bacula-users] Problem installing bacula on Solaris 10

2014-10-27 Thread Kenneth Garges
`; /opt/csw/bin/gmake DESTDIR= 
depend || exit 1); done
make: Fatal error: Command failed for target `depend'
chmod: WARNING: can't access storage-ctl
chmod: WARNING: can't access bsg_persist
 
Cleaning up
 
==Entering directory /home/garges/bacula-7.0.4/src
==Entering directory /home/garges/bacula-7.0.4/scripts
==Entering directory /home/garges/bacula-7.0.4/src/lib
==Entering directory /home/garges/bacula-7.0.4/src/findlib
==Entering directory /home/garges/bacula-7.0.4/src/filed
==Entering directory /home/garges/bacula-7.0.4/src/console
==Entering directory /home/garges/bacula-7.0.4/src/plugins/fd
==Entering directory /home/garges/bacula-7.0.4/src/cats
==Entering directory /home/garges/bacula-7.0.4/src/dird
==Entering directory /home/garges/bacula-7.0.4/src/stored
==Entering directory /home/garges/bacula-7.0.4/src/tools
==Entering directory /home/garges/bacula-7.0.4/manpages
==Entering directory /home/garges/bacula-7.0.4/platforms

Configuration on Mon Oct 27 17:00:08 PDT 2014:

   Host:sparc-sun-solaris2.10 -- solaris 5.10
   Bacula version:  Bacula 7.0.4 (04 June 2014)
   Source code location:.
   Install binaries:/usr/local/bin
   Install libraries:   /usr/local/lib
   Install config files:/etc/bacula
   Scripts directory:   /usr/local/scripts
   Archive directory:   /tmp
   Working directory:   /var/bacula/working
   PID directory:   /var/bacula/working
   Subsys directory:/var/run/subsys
   Man directory:   ${datarootdir}/man
   Data directory:  /usr/share
   Plugin directory:/usr/local/plugins
   C Compiler:  gcc 3.3.2
   C++ Compiler:/usr/local/bin/g++ 3.3.2
   Compiler flags:   -g -O2 -Wall -fno-strict-aliasing -fno-exceptions 
-fno-rtti
   Linker flags: 
   Libraries:   -lpthread -lresolv -lnsl -lsocket -lxnet  -lintl 
-lresolv -lrt
   Statically Linked Tools: no
   Statically Linked FD:no
   Statically Linked SD:no
   Statically Linked DIR:   no
   Statically Linked CONS:  no
   Database backends:   PostgreSQL
   Database port:
   Database name:   bacula
   Database user:   bacula

   Job Output Email:gar...@ucsc.edu
   Traceback Email: gar...@ucsc.edu
   SMTP Host Address:   smtp.ucsc.edu

   Director Port:   9101
   File daemon Port:9102
   Storage daemon Port: 9103

   Director User:   
   Director Group:  
   Storage Daemon User: 
   Storage DaemonGroup: 
   File Daemon User:
   File Daemon Group:   

   Large file support:  yes
   Bacula conio support:no 
   readline support:no 
   TCP Wrappers support:no 
   TLS support: no
   Encryption support:  no
   ZLIB support:yes
   LZO support: no
   enable-smartalloc:   yes
   enable-lockmgr:  no
   bat support: no
   client-only: no
   build-dird:  yes
   build-stored:yes
   Plugin support:  yes
   AFS support: no
   ACL support: yes
   XATTR support:   yes
   systemd support: no 
   Batch insert enabled:PostgreSQL



Kenneth Garges
gar...@ucsc.edu



On 25Oct 2014, at 7:15 AM, Kern Sibbald k...@sibbald.com wrote:

 You might want to start with the following configuration options and modify 
 it to suit your needs.  For some reason the configure does not seem to be 
 finding your destination directory, so what it outputs is null and that 
 causes failures. Your compile options should be different for the Solaris 
 compiler, of course.  Also I cannot imagine why one would disable 
 batch-insert as you have done.  If you have any reasonable size (50 or more 
 clients) you could have serious catalog bottlenecks without batch insert.  
 Note, I install in a single directory, because then it is trivial to backup 
 all of bacula -- less the working directory.  You also might not want to 
 build bat on Solaris as I do.
 
 #!/bin/sh
 # This is Kern's configure script for Bacula
 PREFIX=/opt/bacula
 CFLAGS=-g -O2 -Wall \
   ./configure \
 --sbindir=${PREFIX}/bin \
 --sysconfdir=${PREFIX}/etc \
 --docdir=${PREFIX}/html \
 --htmldir=${PREFIX}/html \
 --with-working-dir=${PREFIX}/working \
 --with-pid-dir=${PREFIX}/working \
 --with-scriptdir=${PREFIX}/scripts \
 --with-plugindir=${PREFIX}/plugins \
 --libdir=${PREFIX}/lib \
 --enable-smartalloc \
 --disable-conio \
 --enable-readline \
 --enable-bat \
 --with-postgresql \
 --with-dump-email=k...@sibbald.com \
 --with-job-email=k...@sibbald.com \
 --with-smtp-host=mail.sibbald.com \
 --with-baseport=9101
 
 exit 0
 



signature.asc
Description: Message signed with OpenPGP using GPGMail

[Bacula-users] Problem installing bacula on Solaris 10

2014-10-24 Thread Kenneth Garges
:yes
   Plugin support:  yes
   AFS support: no
   ACL support: yes
   XATTR support:   yes
   systemd support: no 
   Batch insert enabled:None

  

Kenneth Garges
gar...@ucsc.edu





signature.asc
Description: Message signed with OpenPGP using GPGMail
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Trouble compiling bacula 5.0.3 under Solaris 10

2011-01-20 Thread Kenneth Garges
Bingo! Thanks for your sharp eyes on this one. After this fix it configured and 
made (with only a few compiler warnings).

I'm celebrating by eating a chocolate chip cookie. I'd offer one to both of you 
if you were nearby. Instead I'll just encourage you to do something nice for 
yourself.

Thanks again.



On 20Jan 2011, at 2:53 AM, Martin Simmons wrote:

 On Wed, 19 Jan 2011 17:16:47 -0800, Kenneth Garges said:
 
 Thanks for your tips. Unfortunately still no joy. 
 
 Switched to the latest Sun Studio compiler instead of gcc. 
 
 I made my config script close to yours changing only a couple paths. 
 #! /bin/sh
 # Script from Gary Schmidt for compiling bacula under Solaris 10
 # Entered Wednesday, January 19, 2011 Kenneth Garges 
 # Was
 #PATH=/opt/webstack/bin:/opt/webstack/mysql/bin:/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/bin:$HOME/src/bacula/depkgs-qt/qt-x11-opensource-src-4.3.4/bin
 # Modified for us
 PATH=/opt/mysql/mysql/bin:/bin:/usr/bin:/opt/SUNWexpo/bin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/bin
 export PATH
 ./configure --build=sparc64-sun-solaris2.10 --host=sparc64-sun-solaris2.10 \
 CC=cc CXX=CC \
 CFLAGS=-g -O \
 LDFLAGS=-L/opt/mysql/lib/mysql -R/opt/mysql/lib/mysql -L/usr/sfw/lib 
 -R/usr/sfw/lib \ 
 
 The problem is that LDFLAGS=... line has a space at the end, so the newline
 isn't escaped.  It therefore loses all of the remaining arguments and also
 causes the build, host and target warnings.
 
 You shouldn't need the --build and --host arguments when this is fixed.
 
 __Martin
 
 --
 Protect Your Site and Customers from Malware Attacks
 Learn about various malware tactics and how to avoid them. Understand 
 malware threats, the impact they can have on your business, and how you 
 can protect your company and customers by using code signing.
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Trouble compiling bacula 5.0.3 under Solaris 10

2011-01-19 Thread Kenneth Garges
Thanks for your tips. Unfortunately still no joy. 

Switched to the latest Sun Studio compiler instead of gcc. 

I made my config script close to yours changing only a couple paths. 
#! /bin/sh
# Script from Gary Schmidt for compiling bacula under Solaris 10
# Entered Wednesday, January 19, 2011 Kenneth Garges 
# Was
#PATH=/opt/webstack/bin:/opt/webstack/mysql/bin:/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/bin:$HOME/src/bacula/depkgs-qt/qt-x11-opensource-src-4.3.4/bin
# Modified for us
PATH=/opt/mysql/mysql/bin:/bin:/usr/bin:/opt/SUNWexpo/bin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/bin
export PATH
./configure --build=sparc64-sun-solaris2.10 --host=sparc64-sun-solaris2.10 \
 CC=cc CXX=CC \
 CFLAGS=-g -O \
 LDFLAGS=-L/opt/mysql/lib/mysql -R/opt/mysql/lib/mysql -L/usr/sfw/lib 
-R/usr/sfw/lib \ 
 --disable-build-dir --enable-build-sd \
 --prefix=/opt/app/bacula \
 --datarootdir=/opt/app/bacula/share \
 --mandir=/opt/app/bacula/man \
 --with-archivedir=/opt/app/bacula/archive \
 --with-working-dir=/var/bacula/working \
 --with-plugindir=/opt/app/bacula/plugins \
 --with-scriptdir=/opt/app/bacula/scripts \
 --with-subsys-dir=/opt/var/bacula/subsys \
 --with-mysql=/opt/mysql/mysql \
 --with-dir-user=bacula \
 --with-dir-group=backup \
 --with-sd-user=bacula \
 --with-sd-group=backup \
 --with-fd-user=root \
 --with-fd-group=backup \
 --enable-smartalloc \
 --enable-batch-insert \
 --enable-smartalloc \
 --with-dump-email=me \
 --with-job-email=me \
 --with-smtp-host=our-mail-server

Configure produced:
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:  
and aborted. 

So I added the line
--build=sparc64-sun-solaris2.10 --host=sparc64-sun-solaris2.10 
and that got it mostly working. 

It goes all the way through making scripts and cleaning up then:
==Entering directory /home/garges/bacula-5.0.3/platforms
You have not specified either --enable-client-only or one of the
  supported databases: MySQL, PostgreSQL, Ingres, SQLite3 or DBI.
  This is not permitted. Please reconfigure.
Aborting the configuration ...

This despite the entry --with-mysql=path.

Thinking the error might be spurious I  tried make anyway. Got some parts made 
but then:
 Make of lib is good  snip
 Make of findlib is good snip
 Make of filed is good snip
 Make of console is good 
==Entering directory /home/garges/bacula-5.0.3/src/plugins/fd
snip
Compiling bvfs.c
bvfs.c, line 202: Error: path is not a member of B_DB.
bvfs.c, line 220: Error: The function sql_num_rows must have a prototype.
bvfs.c, line 229: Error: path is not a member of B_DB.
bvfs.c, line 230: Error: pnl is not a member of B_DB.
bvfs.c, line 230: Error: path is not a member of B_DB.
bvfs.c, line 244: Error: path is not a member of B_DB.
bvfs.c, line 255: Error: path is not a member of B_DB.
bvfs.c, line 256: Error: fnl is not a member of B_DB.
bvfs.c, line 278: Error: The function sql_num_rows must have a prototype.
bvfs.c, line 310: Error: The function sql_num_rows must have a prototype.
bvfs.c, line 314: Error: SQL_ROW is not defined.
bvfs.c, line 316: Error: The function sql_fetch_row must have a prototype.
bvfs.c, line 317: Error: Pointer type needed instead of int.
bvfs.c, line 317: Error: Pointer type needed instead of int.
bvfs.c, line 318: Error: Pointer type needed instead of int.
bvfs.c, line 318: Error: Pointer type needed instead of int.
bvfs.c, line 346: Error: The function sql_affected_rows must have a 
prototype.
bvfs.c, line 477: Error: path is not a member of B_DB.
bvfs.c, line 478: Error: pnl is not a member of B_DB.
bvfs.c, line 478: Error: path is not a member of B_DB.
bvfs.c, line 523: Error: path is not a member of B_DB.
bvfs.c, line 598: Error: SQL_MATCH is not defined.
bvfs.c, line 653: Error: num_rows is not a member of B_DB.
bvfs.c, line 674: Error: SQL_MATCH is not defined.
bvfs.c, line 702: Error: num_rows is not a member of B_DB.
Compilation aborted, too many Error messages.
*** Error code 1
The following command caused the error:
/home/garges/bacula-5.0.3/libtool --silent --tag=CXX --mode=compile /bin/CC   
-c  -DBUILDING_CATS -I. -I..   -g -O bvfs.c
make: Fatal error: Command failed for target `bvfs.lo'
Current working directory /home/garges/bacula-5.0.3/src/cats
  == Error in /home/garges/bacula-5.0.3/src/cats ==
*** Error code 1
The following command caused the error:
for I in src scripts src/lib src/findlib src/filed   src/console src/plugins/fd 
src/cats src/dird src/stored src/tools manpages; \
  do (cd $I; echo ==Entering directory `pwd`; \
  make DESTDIR= all || (echo ; echo ; echo   == Error in `pwd` 
==; \
echo ; echo ; exit 1;)); \
done
make: Fatal error: Command failed for target `all'

Tried 3 different versions of mysql, 4.1.21, 5.1.54, and 5.5.8. Same result.

Thanks in advance for any light you can shed on this.





On 18Jan 2011, at 7:18 PM, Gary R. Schmidt wrote:

 On Wed, January

[Bacula-users] Trouble compiling bacula 5.0.3 under Solaris 10

2011-01-18 Thread Kenneth Garges
Yet another with problems compiling bacula 5.0.3 under Solaris. I'm only trying 
to compile the storage daemon.

LDFLAGS=-L/usr/sfw/lib -R/usr/sfw/lib
CFLAGS=-g

./configure --prefix=/opt/app --sbindir=/opt/app/bacula/sbin 
datarootdir=/usr/share --oldincludedir=/usr/include 
--includedir=/usr/local/include --sysconfdir=/opt/app/bacula/etc --disable-ipv6 
--enable-smartalloc --enable-static-sd --disable-build-dir 
--disable-build-filed --enable-build-stored --with-openssl 
--with-working-dir=/var/bacula --with-subsys-dir=/var/bacula/working 
--with-sd-user=bacula --with-sd-group=bacula --disable-libtool --with-mysql


Configure works fine, but make produces this error:

inflateInit_../lib/libbac.a(bsys.o)
ld: fatal: Symbol referencing errors. No output written to bconsole
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `bconsole'
Current working directory /home/garges/bacula-5.0.3/src/console


  == Error in /home/garges/bacula-5.0.3/src/console ==


*** Error code 1
The following command caused the error:
for I in src scripts src/lib src/findlib src/filed   src/console src/cats 
src/dird src/stored src/tools manpages; \
  do (cd $I; echo ==Entering directory `pwd`; \
  make DESTDIR= all || (echo ; echo ; echo   == Error in `pwd` 
==; \
echo ; echo ; exit 1;)); \
done
make: Fatal error: Command failed for target `all'


Any help appreciated.
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users