[Bacula-users] bacula selinux problem

2016-11-06 Thread Tim Dunphy
hey guys,

Running into an issue with SELinux on my bacula server.

With selinux turned on, I can't write to the backup directory.

This is what I get when I try:

[root@ops:~] #getenforce
Enforcing

Connecting to Storage daemon File at ops.example.com:9103 ...
Sending label command for Volume "jf-backup-tape-0002" Slot 0 ...
3910 Unable to open device ""FileStorage" (/backup/tapes)":
ERR=file_dev.c:172 Could not
open(/backup/tapes/jf-backup-tape-0002,CREATE_READ_WRITE,0640):
ERR=Permission denied

Label command failed for Volume jf-backup-tape-0002.
Do not forget to mount the drive!!!

With selinux turned off it's no problem:

[root@ops:~] #getenforce
Permissive

Connecting to Storage daemon File at ops.example.com:9103 ...
Sending label command for Volume "jf-backup-tape-0002" Slot 0 ...
3000 OK label. VolBytes=208 DVD=0 Volume="jf-backup-tape-0002"
Device="FileStorage" (/backup/tapes)
Catalog record for Volume "jf-backup-tape-0002", Slot 0  successfully
created.
Requesting to mount FileStorage ...
3001 OK mount requested. Device="FileStorage" (/backup/tapes)
You have messages.

I tried running these commands to leave SELinux on in order to get backups
working properly:

semanage fcontext -a -t bacula_var_run_t '/backup/tapes(/.*)?'

restorecon -R -v /backup/tapes

However that made no difference. Still can't write to the directory after
running those commands.

Any thoughts?

Thanks,
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] can't start bacula director as service

2016-03-13 Thread Tim Dunphy
Hey guys,

 Not long after I mailed you I was able to correct this problem. When
looking through the debug outlook I saw this line:

bacula-dir: mysql.c:202-0 Error 2002 (HY000): Can't connect to local MySQL
server through socket '/var/lib/mysql/mysql.sock' (13 "Permission denied")

And I thought it was odd that bacula-dir was trying to connect through a
local mysql socket connection. So I tried switching it up to connect to
'127.0.0.1' instead of localhost. And that got it to connect fine!

The weird part of this is, is that I've been using the same connection
string in my bacula director config for years at this point.  So I'm not
sure why it wasn't connecting properly until I tried connecting to the
localhost IP of 127.0.0.1.

Just thought I'd let you know. You've all been so helpful in the past.

Thanks,
Tim

On Sun, Mar 13, 2016 at 3:49 PM, Tim Dunphy <bluethu...@gmail.com> wrote:

> Hey guys,
>
> I'm having an odd issue with bacula 7.0.5 (on CentOS 7) in that I can
> start it manually in debug mode. However it doesn't start correctly either
> using the config script. And it doesn't work if I try to start up bacula
> using the same flags as the init script.
>
> If I try to start up bacula director using the service, it claims that
> it's running, but there's nothing listening on the default port of 9101:
>
> #systemctl status bacula-dir
> ● bacula-dir.service - Bacula-Director, the Backup-server
>Loaded: loaded (/usr/lib/systemd/system/bacula-dir.service; enabled;
> vendor preset: disabled)
>Active: active (running) since Sun 2016-03-13 19:31:03 UTC; 8s ago
>  Docs: man:bacula-dir(8)
>  Main PID: 413 (bacula-dir)
>CGroup: /system.slice/bacula-dir.service
>└─413 /usr/sbin/bacula-dir -f -c /etc/bacula/bacula-dir.conf -u
> bacula -g bacula
>
> Mar 13 19:31:03 ops systemd[1]: Started Bacula-Director, the Backup-server.
> Mar 13 19:31:03 ops systemd[1]: Starting Bacula-Director, the
> Backup-server...
>
>
> After that I can confirm that bacula director is "running" but not
> listening:
>
> [root@ops:/etc/bacula] #ps -ef|grep bacula-dir |grep -v grep | grep -v -i
> screen
> bacula 522 1  0 19:34 ?00:00:00 /usr/sbin/bacula-dir -f -c
> /etc/bacula/bacula-dir.conf -u bacula -g bacula
>
> Nothing listening on port 9101:
>
> [root@ops:/etc/bacula] #netstat -tulpn | grep -i listen |grep bacula
> tcp0  0 0.0.0.0:91020.0.0.0:*
> LISTEN  30659/bacula-fd
> tcp0  0 0.0.0.0:91030.0.0.0:*
> LISTEN  30820/bacula-sd
>
> [root@ops:/etc/bacula] #lsof -i :9101
> [root@ops:/etc/bacula] #
>
> And bconsole can't connect:
>
> [root@ops:/etc/bacula] #bconsole
> Connecting to Director ops.jokefire.com:9101
>
> If I start bacula-director manually using the same command as the init
> script, I get this error:
>
> [root@ops:/etc/bacula] #/usr/sbin/bacula-dir -f -c
> /etc/bacula/bacula-dir.conf -u bacula -g bacula
> bacula-dir: dird.c:972-0 Could not open Catalog "JokefireCatalog",
> database "bacula".
> bacula-dir: dird.c:977-0 mysql.c:198 Unable to connect to MySQL server.
> Database=bacula User=admin
> MySQL connect failed either server not running or your authorization is
> incorrect.
> 13-Mar 19:36 bacula-dir ERROR TERMINATION
> Please correct configuration file: /etc/bacula/bacula-dir.conf
>
> I'm also seeing the same messages in the bacula log.
>
> Here it's saying that the username or password is incorrect! However that
> can't be, because I am able to connect to the database using the same
> information from the bacula-dir.conf:
>
> # Generic catalog service
> Catalog {
>   Name = JokefireCatalog
> # Uncomment the following line if you want the dbi driver
> #  dbdriver = "dbi:mysql"; dbaddress = localhost; dbport = 3306
>dbname = "bacula"; dbuser = "admin"; dbpassword = "secret" ; dbaddress
> = "localhost"
> }
>
> And if I copy and paste the authorization from the conf into the command
> line i can connect without any problem:
>
> [root@ops:/etc/bacula] #mysql -uadmin -psecret -h localhost -D bacula
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Welcome to the MariaDB monitor.  Commands end with ; or \g.
> Your MariaDB connection id is 58
> Server version: 10.0.24-MariaDB MariaDB Server
>
> Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input
> statement.
>
> MariaDB [bacula]>
>
> And the most puzzling piece to this whole thing is, if I start up bacula
>

[Bacula-users] can't start bacula director as service

2016-03-13 Thread Tim Dunphy
Hey guys,

I'm having an odd issue with bacula 7.0.5 (on CentOS 7) in that I can start
it manually in debug mode. However it doesn't start correctly either using
the config script. And it doesn't work if I try to start up bacula using
the same flags as the init script.

If I try to start up bacula director using the service, it claims that it's
running, but there's nothing listening on the default port of 9101:

#systemctl status bacula-dir
● bacula-dir.service - Bacula-Director, the Backup-server
   Loaded: loaded (/usr/lib/systemd/system/bacula-dir.service; enabled;
vendor preset: disabled)
   Active: active (running) since Sun 2016-03-13 19:31:03 UTC; 8s ago
 Docs: man:bacula-dir(8)
 Main PID: 413 (bacula-dir)
   CGroup: /system.slice/bacula-dir.service
   └─413 /usr/sbin/bacula-dir -f -c /etc/bacula/bacula-dir.conf -u
bacula -g bacula

Mar 13 19:31:03 ops systemd[1]: Started Bacula-Director, the Backup-server.
Mar 13 19:31:03 ops systemd[1]: Starting Bacula-Director, the
Backup-server...


After that I can confirm that bacula director is "running" but not
listening:

[root@ops:/etc/bacula] #ps -ef|grep bacula-dir |grep -v grep | grep -v -i
screen
bacula 522 1  0 19:34 ?00:00:00 /usr/sbin/bacula-dir -f -c
/etc/bacula/bacula-dir.conf -u bacula -g bacula

Nothing listening on port 9101:

[root@ops:/etc/bacula] #netstat -tulpn | grep -i listen |grep bacula
tcp0  0 0.0.0.0:91020.0.0.0:*   LISTEN
 30659/bacula-fd
tcp0  0 0.0.0.0:91030.0.0.0:*   LISTEN
 30820/bacula-sd

[root@ops:/etc/bacula] #lsof -i :9101
[root@ops:/etc/bacula] #

And bconsole can't connect:

[root@ops:/etc/bacula] #bconsole
Connecting to Director ops.jokefire.com:9101

If I start bacula-director manually using the same command as the init
script, I get this error:

[root@ops:/etc/bacula] #/usr/sbin/bacula-dir -f -c
/etc/bacula/bacula-dir.conf -u bacula -g bacula
bacula-dir: dird.c:972-0 Could not open Catalog "JokefireCatalog", database
"bacula".
bacula-dir: dird.c:977-0 mysql.c:198 Unable to connect to MySQL server.
Database=bacula User=admin
MySQL connect failed either server not running or your authorization is
incorrect.
13-Mar 19:36 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

I'm also seeing the same messages in the bacula log.

Here it's saying that the username or password is incorrect! However that
can't be, because I am able to connect to the database using the same
information from the bacula-dir.conf:

# Generic catalog service
Catalog {
  Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
#  dbdriver = "dbi:mysql"; dbaddress = localhost; dbport = 3306
   dbname = "bacula"; dbuser = "admin"; dbpassword = "secret" ; dbaddress =
"localhost"
}

And if I copy and paste the authorization from the conf into the command
line i can connect without any problem:

[root@ops:/etc/bacula] #mysql -uadmin -psecret -h localhost -D bacula
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 58
Server version: 10.0.24-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

MariaDB [bacula]>

And the most puzzling piece to this whole thing is, if I start up bacula
director in debug mode with the -d100 flag and the -c flag pointing to the
same config that the init script is using, everything works just fine!

[root@ops:~] #bacula-dir -d100 -c /etc/bacula/bacula-dir.conf &
[1] 910
[root@ops:~] #bacula-dir: dird.c:194-0 Debug level = 100
bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
bacula-dir: jcr.c:128-0 read_last_jobs seek to 192
bacula-dir: jcr.c:135-0 Read num_items=10
bacula-dir: dir_plugins.c:148-0 Load dir plugins
bacula-dir: dir_plugins.c:150-0 No dir plugin dir!
bacula-dir: mysql.c:697-0 db_init_database first time
bacula-dir: mysql.c:165-0 mysql_init done
bacula-dir: mysql.c:190-0 mysql_real_connect done
bacula-dir: mysql.c:192-0 db_user=admin db_name=bacula db_password=secret
bacula-dir: mysql.c:215-0 opendb ref=1 connected=1 db=1ad8750
bacula-dir: mysql.c:237-0 closedb ref=0 connected=1 db=1ad8750
bacula-dir: mysql.c:244-0 close db=1ad8750
ops.jokefire.com: bnet_server.c:87-0 Addresses 0.0.0.0:9101
ops.jokefire.com: job.c:1528-0 wstorage=File
ops.jokefire.com: job.c:1537-0 wstore=File where=Job resource
ops.jokefire.com: job.c:1211-0 JobId=0 created
Job=*JobMonitor*.2016-03-13_19.43.56_01

Only at that point, when I run in debug mode everything is working and I
can use bacula as I normally would:

[root@ops:~] #bconsole
Connecting to Director ops.jokefire.com:9101
ops.jokefire.com: bnet.c:566-0 who=client host=104.130.30.247 port=9101
ops.jokefire.com: 

Re: [Bacula-users] bconsole won't connect to director

2015-11-08 Thread Tim Dunphy
Hey Heitor,

 Doing well thanks! I appreciate the help as always. So here's what I
tried:

I added the directives you suggested to the director conf. From
bacula-dir.conf:

Director {# define myself

  Name = bacula1.example.com

  DIRport = 9101# where we listen for UA connections

  QueryFile = "/etc/bacula/query.sql"

  WorkingDirectory = "/var/spool/bacula"

  PidDirectory = "/var/run"

  Maximum Concurrent Jobs = 1

  Password = "Duk30fZh0u" # Console password

  Messages = Daemon

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

  TLS Verify Peer = no

  TLS Allowed CN = "bacula1.example.com"

}


And I made the TLS Allowed CN match the FQDN of the bacula1 host. And
here's a better paste of my bconsole.conf:


Director {

  Name = bacula1.example.com

  DIRport = 9101

  address = bacula1.example.com

  Password = "secret"

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


I tried setting   TLS Verify Peer = no  and TLS Allowed CN = "
bacula1.example.com" in the bconsole.conf, but those weren't valid there.

And then I tried running bconsole in debug mode, and this is what I got:

[root@bacula1:~] #bconsole -d100 -c /etc/bacula/bconsole.conf

Connecting to Director bacula1.example.com:9101

bconsole: bsock.c:208-0 Current 52.5.117.61:9101 All 52.5.117.61:9101

bconsole: bsock.c:283-0 Could not connect to server Director daemon
bacula1.example.com:9101. ERR=Interrupted system call

bconsole: bsock.c:106-0 Unable to connect to Director daemon on
bacula1.example.com:9101. ERR=Interrupted system call

I'm definitely open to suggestion at this point!

Thanks!

Tim







On Sun, Nov 8, 2015 at 10:24 AM, Heitor Faria <hei...@bacula.com.br> wrote:

> Just in time: your certificate Complete Name (CN) that you are prompted
> during its creation must match the TLS Allowed CN value.
> ===
> Heitor Medrado de Faria - LPIC-III | ITIL-F |  Bacula Systems Certified
> Administrator II
> Do you need Bacula training? http://bacula.us/video-classes/
> I do Bacula training and deploy in any city of the world. More
> information: http://bacula.us/
> +55 61 <%2B55%2061%202021-8260>8268-4220 <%2B55%2061%208268-4220>
> Site: http://bacula.us FB: heitor.faria
> <http://www.facebook.com/heitor.faria>
> =======
>
> --
>
> *From: *"Heitor Faria" <hei...@bacula.com.br>
> *To: *"Tim Dunphy" <bluethu...@gmail.com>
> *Cc: *bacula-users@lists.sourceforge.net
> *Sent: *Sunday, November 8, 2015 1:15:04 PM
> *Subject: *Re: [Bacula-users] bconsole won't connect to director
>
> Hey guys,
>
> Hello Tim, how are you?
>
>  I've had to rebuild my bacula server recently. And everything seemed to
> go okay with the install, but for some reason the bconsole can't conect to
> the director.
>
> This is all I see when I try:
>
>
> [root@bacula1:~] #bconsole
>
> Connecting to Director bacula1.example.com:9101
>
>
> I tried running my bacula-director in debug mode to get an idea of what
> the problem is, however it isn't providing any clues:
>
> In this case running bconsole in debug mode would be more fruitful.
>
> I made sure the bacula director definition matched the bconsole config.
> From bacula-dir.conf:
>
>
> Director {# define myself
>
>   Name = bacula1.example.com
>
>   DIRport = 9101# where we listen for UA connections
>
>   QueryFile = "/etc/bacula/query.sql"
>
>   WorkingDirectory = "/var/spool/bacula"
>
>   PidDirectory = "/var/run"
>
>   Maximum Concurrent Jobs = 1
>
>   Password = "secret" # Console password
>
>   Messages = Daemon
>
>   TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt
>
>   TLS Key = /etc/pki/tls/private/bacula1.example.com.key
>
>   TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
>
>   TLS Enable = yes
>
>   TLS Require = yes
>
> }
>
> If you are using self-signed certificates it is very likely you would have
> to use the following settings:
>
> TLS Verify Peer = no
> TLS Allowed CN = "192.168.0.50" # Or name
>
> From

[Bacula-users] bconsole won't connect to director

2015-11-07 Thread Tim Dunphy
Hey guys,


 I've had to rebuild my bacula server recently. And everything seemed to go
okay with the install, but for some reason the bconsole can't conect to the
director.


This is all I see when I try:


[root@bacula1:~] #bconsole

Connecting to Director bacula1.example.com:9101


I tried running my bacula-director in debug mode to get an idea of what the
problem is, however it isn't providing any clues:


[root@bacula1:~] #bacula-dir: jcr.c:128-0 read_last_jobs seek to 192

bacula-dir: jcr.c:135-0 Read num_items=0

bacula-dir: dir_plugins.c:148-0 Load dir plugins

bacula-dir: dir_plugins.c:150-0 No dir plugin dir!

bacula-dir: mysql.c:697-0 db_init_database first time

bacula-dir: mysql.c:165-0 mysql_init done

bacula-dir: mysql.c:190-0 mysql_real_connect done

bacula-dir: mysql.c:192-0 db_user=admin db_name=bacula db_password=secret

bacula-dir: mysql.c:215-0 opendb ref=1 connected=1 db=1126330

bacula-dir: mysql.c:237-0 closedb ref=0 connected=1 db=1126330

bacula-dir: mysql.c:244-0 close db=1126330

bacula1.example.com: bnet_server.c:87-0 Addresses 0.0.0.0:9101

bacula1.example.com: job.c:1528-0 wstorage=File

bacula1.example.com: job.c:1537-0 wstore=File where=Job resource

bacula1.example.com: job.c:1211-0 JobId=0 created
Job=*JobMonitor*.2015-11-08_03.51.15_01


I made sure the bacula director definition matched the bconsole config.
>From bacula-dir.conf:


Director {# define myself

  Name = bacula1.example.com

  DIRport = 9101# where we listen for UA connections

  QueryFile = "/etc/bacula/query.sql"

  WorkingDirectory = "/var/spool/bacula"

  PidDirectory = "/var/run"

  Maximum Concurrent Jobs = 1

  Password = "secret" # Console password

  Messages = Daemon

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}



>From bconsole.conf


Director {

  Name = bacula1.example.com

  DIRport = 9101

  address = bacula1.example.com

  Password = "secret"

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TL

}


I also made sure that the Storage definition in bacula-dir.conf matched the
config in bacula-sd.conf


>From bacula-dir.conf:


Storage {

  Name = File

# Do not use "localhost" here

  Address = bacula1.example.com# N.B. Use a fully qualified name here

  SDPort = 9103

  Password = "secret"

  Device = FileStorage

  Media Type = File

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}



And from the bacula-sd.conf:


Storage { # definition of myself

  Name = bacula1.example.com

  SDPort = 9103  # Director's port

  WorkingDirectory = "/var/spool/bacula"

  Pid Directory = "/var/run"

  Maximum Concurrent Jobs = 20

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


Director {

  Name = bacula1.example.com

  Password = "secret"

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

  #Monitor = yes

}


And from the client section of bacula-dir.conf to the director in
bacula-fd.conf:



# Client (File Services) to backup

Client {

  Name = bacula1.example.com

  Address = bacula1.example.com

  FDPort = 9102

  Catalog = exampleCatalog

  Password = "secret"  # password for

  File Retention = 14d# 14 days

  Job Retention = 14d# 14 days

  AutoPrune = yes # Prune expired Jobs/Files

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


Director {

  Name = bacula1.example.com

  Password = secret

  TLS Certificate = /etc/pki/tls/certs/bacula1.example.com.crt

  TLS Key = /etc/pki/tls/private/bacula1.example.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


#

# "Global" File daemon configuration specifications

#

FileDaemon {  # this is me

  Name = bacula1.example.com

  FDport = 9102  # where we listen for the director

  WorkingDirectory = /var/bacula

  Pid Directory = /var/run

  Maximum Concurrent Jobs = 20

  TLS Certificate = 

Re: [Bacula-users] waiting for client to connect to storage file

2015-10-19 Thread Tim Dunphy
>
>
> This message means that a client (bacula-fd) is unable to connect to the
> storage (bacula-sd). So it is probably that you bacula-sd is firewalled or
> something (a wrong Address in Storage resource, etc.). Check if you can
> connect from any of your clients to the backup server on 9103 (it is a SD
> port).



That was it!! Thanks. Not sure why I keep forgetting this. I'll make a note
to myself next time.

Thanks,
Tim


On Mon, Oct 19, 2015 at 3:40 AM, Radosław Korzeniewski <
rados...@korzeniewski.net> wrote:

> Hello,
>
> 2015-10-19 4:25 GMT+02:00 Tim Dunphy <bluethu...@gmail.com>:
>
>> Hey guys,
>>
>>  I've got a new problem on my bacula setup. Not sure what changed
>> recently, but now for some reason when I go to backup any client I get this
>> message when I check st dir:
>>
>> Running Jobs:
>> Console connected at 19-Oct-15 01:03
>>  JobId  Type Level Files Bytes  Name  Status
>> ==
>>  5  Back Full  0 0  d*b1.jokefire.com
>> <http://b1.jokefire.com>  is waiting for Client db1.jokefire.com
>> <http://db1.jokefire.com> to connect to Storage File*
>> 
>>
>>
> This message means that a client (bacula-fd) is unable to connect to the
> storage (bacula-sd). So it is probably that you bacula-sd is firewalled or
> something (a wrong Address in Storage resource, etc.). Check if you can
> connect from any of your clients to the backup server on 9103 (it is a SD
> port).
>
> best regards
> --
> Radosław Korzeniewski
> rados...@korzeniewski.net
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] waiting for client to connect to storage file

2015-10-18 Thread Tim Dunphy
Hey guys,

 I've got a new problem on my bacula setup. Not sure what changed recently,
but now for some reason when I go to backup any client I get this message
when I check st dir:

Running Jobs:
Console connected at 19-Oct-15 01:03
 JobId  Type Level Files Bytes  Name  Status
==
 5  Back Full  0 0  d*b1.jokefire.com
  is waiting for Client db1.jokefire.com
 to connect to Storage File*


That happens for every client I have configured to be backed up.

But if I check st client, I can connect to that host from the bacula server
in bconsole:

*st client
The defined Client resources are:
 1: lb1.jokefire.com
 2: varnish1.jokefire.com
 3: ops.jokefire.com
 4: ops1.jokefire.com
 5: ops2.jokefire.com
 6: ops3.jokefire.com
 7: web1.jokefire.com
 8: db1.jokefire.com
 9: db2.jokefire.com
10: db3.jokefire.com
11: db4.jokefire.com
12: puppet.jokefire.com
13: time1.jokefire.com
Select Client (File daemon) resource (1-13): 8
*Connecting to Client db1.jokefire.com  at
db1.jokefire.com:9102 *

*db1.jokefire.com  Version: 7.0.5 (28 July 2014)
 x86_64-redhat-linux-gnu redhat Enterprise release*
*Daemon started 19-Oct-15 00:13. Jobs: run=0 running=0.*
* Heap: heap=135,168 smbytes=156,980 max_bytes=205,348 bufs=68 max_bufs=100*
* Sizes: boffset_t=8 size_t=8 debug=0 trace=0 mode=0,0 bwlimit=0kB/s*

Running Jobs:
Director connected at: 19-Oct-15 02:23
No Jobs running.


Terminated Jobs:

*


And I've confirmed that bacula-fd is listening on the sever I'm trying to
backup:

[root@db1:~] #lsof -i :9102
COMMAND PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
bacula-fd 32592 root3u  IPv4 27094367  0t0  TCP *:bacula-fd (LISTEN)


And all 3 bacula services are running on the bacula server:

[root@ops:~] #ps -ef | grep bacula | grep -v grep
bacula   10624 1  0 01:03 ?00:00:02 /usr/sbin/bacula-dir -f -c
/etc/bacula/bacula-dir.conf -u bacula -g bacula
root 10646 1  0 01:03 ?00:00:15 /usr/sbin/bacula-fd -f -c
/etc/bacula/bacula-fd.conf -u root -g root
bacula   10665 1  0 01:03 ?00:00:15 /usr/sbin/bacula-sd -f -c
/etc/bacula/bacula-sd.conf -u bacula -g tape

I haven't been able to find any info pertaining to this problem in the
bacula log on the bacula server and there was no bacula log created at all
on the client.

Could I get some help to troubleshoot and solve this problem?

Thanks,
Tim
-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] error connecting to database

2015-08-20 Thread Tim Dunphy
Hi Ana,


 Thanks a lot for your response! So I was able to run your command that you
were suggesting, and it was a success! I can connect to the database using
the ssl enabled user and specifying the certs and keys on the command line:

#mysql -uadmin_ssl -p --ssl-ca=/opt/mysql/ca.crt
--ssl-cert=/opt/mysql/ops.example.com.crt
--ssl-key=/opt/mysql/ops.example.com.key -h db.example.com

Enter password:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 1353569

Server version: 10.0.20-MariaDB-log MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

MariaDB [(none)] use bacula

No connection. Trying to reconnect...

Connection id:1374537

Current database: *** NONE ***

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

And when I run the \s command this is what I can tell:

MariaDB [bacula] \s

ERROR 2006 (HY000): MySQL server has gone away

No connection. Trying to reconnect...

Connection id:1374633

Current database: bacula

--

mysql  Ver 15.1 Distrib 10.0.21-MariaDB, for Linux (x86_64) using readline
5.1

Connection id:  1374633

Current database:   bacula

Current user:   admin_...@ec2-54-86-143-49.compute-1.amazonaws.com

SSL:Cipher in use is DHE-RSA-AES256-SHA

Current pager:  stdout

Using outfile:  ''

Using delimiter:;

Server: MariaDB

Server version: 10.0.20-MariaDB-log MariaDB Server

Protocol version:   10

Connection: db.example.com via TCP/IP

Server characterset:latin1

Db characterset:latin1

Client characterset:utf8

Conn.  characterset:utf8

TCP port:   3306

Uptime: 15 days 14 hours 13 min 47 sec


Threads: 3  Questions: 2024374  Slow queries: 0  Opens: 289  Flush tables:
1  Open tables: 215  Queries per second avg: 1.502

--

Not sure what all those 'database has gone away' messags are all about.
However they don't seem that terribly important to me. But using the
admin_ssl user in my databas settings in the catalog section of bacula-dir,
I still am having no luck getting this to work:

# Generic catalog service

Catalog {

  Name = JokefireCatalog

# Uncomment the following line if you want the dbi driver

#  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306

   dbname = bacula; dbuser = admin_ssl; dbpassword = secret ;
dbaddress = db.example.com

}

[root@ops:/etc/bacula] #systemctl start bacula-dir

[root@ops:/etc/bacula] #lsof -i :9101

[root@ops:/etc/bacula] #


And this is what I'm seeing in the bacula logs on the bacula server:

#tail /var/log/bacula/bacula.log

20-Aug 15:24 bacula-dir JobId 0: Fatal error: Could not open Catalog
JokefireCatalog, database bacula.

20-Aug 15:24 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to connect
to MySQL server.

Database=bacula User=admin_ssl

MySQL connect failed either server not running or your authorization is
incorrect.

20-Aug 15:24 bacula-dir ERROR TERMINATION

Please correct configuration file: /etc/bacula/bacula-dir.conf


And I still have absolutely no clue where the problem may lie. I still feel
that there may be more to this problem than just setting up the SSL enabled
user in the catalog section of the conf. But I will leave that up to the
bacula experts on the list to tell me! :)

Thanks for all the help!

Tim



On Wed, Aug 19, 2015 at 2:36 PM, Ana Emília M. Arruda 
emiliaarr...@gmail.com wrote:

Hello Tim,


Could you check if you are able to connect to the database using the bellow
command (please replace the .pem certificates with your server certificate
-  db.example.com - and client certificate -  ops.example.com
http://ops.jokefire.com/)?


#mysql -uadmin_ssl -p --ssl-ca=server-ca.pem --ssl-cert=client-cert.pem
--ssl-key=client-key.pem -h db.example.com -e use bacula;show tables |
head -5


If this works, could you check with a \s command in which port mysql
daemon is listening?


Best regards,

Ana


On Sun, Aug 16, 2015 at 11:23 PM, Tim Dunphy bluethu...@gmail.com wrote:

Hey guys,


I finally have some progress to report! Not all the way there yet, but some
good progress has been made. As of now I am able to use the external (load
balanced) database from within bacula. However I still can't use the SSL
enabled database user.


Here's my catalog config:


# Generic catalog service

Catalog {

  Name = exampleCatalog

# Uncomment the following line if you want the dbi driver

#  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306

  #dbname = bacula; dbuser = admin; dbpassword = secret

  dbname = bacula;  dbuser = admin; dbpassword = secret; dbaddress = 
db.example.com; dbport = 3306

}


With the non ssl enabled database user in the config I can verify

Re: [Bacula-users] error connecting to database

2015-08-16 Thread Tim Dunphy
Hey guys,

I finally have some progress to report! Not all the way there yet, but some
good progress has been made. As of now I am able to use the external (load
balanced) database from within bacula. However I still can't use the SSL
enabled database user.

Here's my catalog config:

# Generic catalog service
Catalog {
  Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
#  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306
  #dbname = bacula; dbuser = admin; dbpassword = secret
  dbname = bacula;  dbuser = admin; dbpassword = secret; dbaddress = 
db.example.com; dbport = 3306
}

With the non ssl enabled database user in the config I can verify that the
director is listening:

[root@ops:/etc/bacula] #lsof -i :9101
COMMAND PID   USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
bacula-di 15357 bacula5u  IPv4 4789422  0t0  TCP *:bacula-dir
(LISTEN)

And I can get into the console.

[root@ops:/etc/bacula] #bconsole
Connecting to Director ops.jokefire.com:9101
1000 OK: ops.jokefire.com Version: 5.2.13 (19 February 2013)
Enter a period to cancel a command.
*

But with the ssl database user in the config, none of that can happen.

I've verified once again that I can connect with the ssl database user:

 #mysql -uadmin_ssl -p -h db.example.com -e use bacula;show tables | head
-5
Enter password:
Tables_in_bacula
BaseFiles
CDImages
Client
Counters

But starting the bacula director with the ssl enabled user in the config,
I'm getting an error in the logs and I can no longer user the director with
bconsole:


#tail -f /var/log/bacula/bacula.log
17-Aug 02:17 bacula-dir JobId 0: Fatal error: Could not open Catalog
JokefireCatalog, database bacula.
17-Aug 02:17 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to connect
to MySQL server.
Database=bacula User=admin_ssl
MySQL connect failed either server not running or your authorization is
incorrect.
17-Aug 02:17 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf


This is my catalog definition with the ssl user in the config:

# Generic catalog service
Catalog {
  Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
#  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306
  #dbname = bacula; dbuser = admin; dbpassword = secret
  dbname = bacula;  dbuser = admin_ssl; dbpassword = secret;
dbaddress = db.example.com; dbport = 3306
}

I've gained a little experience in using SSL database users with a couple
different apps. I've setup both mediawiki and wordpress to use SSL database
connections. But for both of those apps you had to go through extra steps
to get an SSL database user to work. Simply adding the user to the config
wouldn't allow them to work. You would have to go through extra
configuration steps to make them work correctly.

So what I'm wondering is if this might be a similar similar situation with
bacula. That maybe just adding an ssl enabled user to the connection string
isn't enough. And maybe there's some other configuration that has to happen
to get this to work. It's just a guess on my part, but based on my recent
experiences I think it may be a good one!

I'd appreciate hearing your thoughts on this!

Thanks,
Tim

On Thu, Aug 6, 2015 at 9:19 AM, Alex Domoradov alex@gmail.com wrote:

 You could find out with which version of mysql client has been compiled
 your bacula with the following command

 # ldd /usr/sbin/bacula-dir | grep mysql
 libmysqlclient.so.18 = /lib64/libmysqlclient.so.18
 (0x7f07abe3d000)


 # rpm -qf /lib64/libmysqlclient.so.18
 Percona-Server-shared-55-5.5.43-rel37.2.el7.x86_64

 On Thu, Aug 6, 2015 at 3:47 PM, Heitor Faria hei...@bacula.com.br wrote:

 Hey Heitor,

  Actually to 1, no they are not. I have mariadb-5.5.41 on the bacula
 server (client side) and mariadb 10 on the db server. I might try upgrading
 the client on the bacula server tomorrow. I don't have SELinux enabled
 anywhere currently. I probably will enable that tho once I get everything
 working.

 Most important of all is to know what MySQL / MariaDB development
 libraries were used to build you Bacula binaries. You may want / need to
 update Bacula with binaries built from source:
 http://bacula.us/compilation/

 Regards,

 ===
 Heitor Medrado de Faria - LPIC-III | ITIL-F |  Bacula Systems Certified
 Administrator II
 Do you need Bacula training?
 https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list
 +55 61 %2B55%2061%202021-82608268-4220 %2B55%2061%208268-4220
 Site: http://bacula.us FB: heitor.faria
 http://www.facebook.com/heitor.faria

 ===


 I'll try to update you guys tomorrow.

 Thanks for all your input!

 Tim

 On Wed, Aug 5, 2015 at 8:45 AM, Heitor Faria hei...@bacula.com.br
 wrote:


 Em ter, 4 de ago de 2015 às 23:01, Tim Dunphy bluethu...@gmail.com
 escreveu

Re: [Bacula-users] error connecting to database

2015-08-05 Thread Tim Dunphy
Hey Heitor,

 Actually to 1, no they are not. I have mariadb-5.5.41 on the bacula server
(client side) and mariadb 10 on the db server. I might try upgrading the
client on the bacula server tomorrow. I don't have SELinux enabled anywhere
currently. I probably will enable that tho once I get everything working.

I'll try to update you guys tomorrow.

Thanks for all your input!

Tim

On Wed, Aug 5, 2015 at 8:45 AM, Heitor Faria hei...@bacula.com.br wrote:


 Em ter, 4 de ago de 2015 às 23:01, Tim Dunphy bluethu...@gmail.com
 escreveu:

 Hey Ana,
  Nice to hear from you!

 Tried that:


 Catalog {
   Name = MyCatalog
 # Uncomment the following line if you want the dbi driver
   #dbdriver = dbi:mysql; dbaddress = db.example.com; dbport = 3306
   dbname = bacula;  dbuser = admin_ssl; dbpassword = secret;
 dbaddress = db.example.com; dbport = 3306
 }

 And restarted. Same result unfortunately! :(

 [root@ops:~] #tail -f /var/log/bacula/bacula.log
 Database=bacula User=admin_ssl
 MySQL connect failed either server not running or your authorization is
 incorrect.
 05-Aug 01:59 bacula-dir ERROR TERMINATION
 Please correct configuration file: /etc/bacula/bacula-dir.conf
 05-Aug 01:59 bacula-dir JobId 0: Fatal error: Could not open Catalog
 MyCatalog, database bacula.
 05-Aug 01:59 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to
 connect to MySQL server.
 Database=bacula User=admin_ssl
 MySQL connect failed either server not running or your authorization is
 incorrect.
 05-Aug 01:59 bacula-dir ERROR TERMINATION
 Please correct configuration file: /etc/bacula/bacula-dir.conf

 1. Is your remote MySQL server version the same installed in your Bacula
 Server?
 2. From your Bacula server can you telnet ip_address 3306 your MySQL
 server?
 3. Do you have selinux or iptables enabled at MySQL Server? Someone
 wrote that never had problems with selinux. Neither do I, since I always
 disable it. =)

 Just ignore 2 and 3. I forgot you can connect with calling the client
 directly.


 Any more ideas?

 Thanks,
 Tim





-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] error connecting to database

2015-08-04 Thread Tim Dunphy
Hey Ana,

​Nice to hear from you too!​


:-D




 Is this the same?

 dbname = bacula; dbuser = admin_ssl; dbpassword = secret; dbaddress
 = db.example.com; dbport = 3306


 Yep! It's exactly the same in my config:

bname = bacula; dbuser = admin_ssl; dbpassword = secret; dbaddress = 
db.example.com; dbport = 3306




 ​This is your second try (from your first post), including dbport
 directive (I just saw this in your first try).​

 ​Also, could you try the mysql this way?

 #mysql -uadmin_ssl -p -h db.example.com -P 3306 -D bacula -e show tables


Sure! And that works!

[root@ops:~] #mysql -uadmin_ssl -p -h db.example.com -P 3306 -D bacula -e
show tables | head -5
Enter password:
Tables_in_bacula
BaseFiles
CDImages
Client
Counters

Still unclear as to why this isn't working unfortunately. Still open to
more ideas. :-)

Tim


On Tue, Aug 4, 2015 at 10:14 PM, Ana Emília M. Arruda 
emiliaarr...@gmail.com wrote:

 Hello Tim,

 ​Nice to hear from you too!​

 Is this the same?

 dbname = bacula; dbuser = admin_ssl; dbpassword = secret; dbaddress
 = db.example.com; dbport = 3306

 ​This is your second try (from your first post), including dbport
 directive (I just saw this in your first try).​

 ​Also, could you try the mysql this way?

 #mysql -uadmin_ssl -p -h db.example.com -P 3306 -D bacula -e show tables

 Regards,
 Ana​


 Em ter, 4 de ago de 2015 às 23:01, Tim Dunphy bluethu...@gmail.com
 escreveu:

 Hey Ana,

  Nice to hear from you!

 Tried that:


 Catalog {
   Name = MyCatalog
 # Uncomment the following line if you want the dbi driver
   #dbdriver = dbi:mysql; dbaddress = db.example.com; dbport = 3306
   dbname = bacula;  dbuser = admin_ssl; dbpassword = secret;
 dbaddress = db.example.com; dbport = 3306
 }

 And restarted. Same result unfortunately! :(

 [root@ops:~] #tail -f /var/log/bacula/bacula.log
 Database=bacula User=admin_ssl
 MySQL connect failed either server not running or your authorization is
 incorrect.
 05-Aug 01:59 bacula-dir ERROR TERMINATION
 Please correct configuration file: /etc/bacula/bacula-dir.conf
 05-Aug 01:59 bacula-dir JobId 0: Fatal error: Could not open Catalog
 MyCatalog, database bacula.
 05-Aug 01:59 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to
 connect to MySQL server.
 Database=bacula User=admin_ssl
 MySQL connect failed either server not running or your authorization is
 incorrect.
 05-Aug 01:59 bacula-dir ERROR TERMINATION
 Please correct configuration file: /etc/bacula/bacula-dir.conf

 Any more ideas?

 Thanks,
 Tim

 On Tue, Aug 4, 2015 at 9:42 PM, Ana Emília M. Arruda 
 emiliaarr...@gmail.com wrote:

 Hello Tim,

 Try this:

 Catalog {
   Name = MyCatalog
   dbname = bacula;  dbuser = admin_ssl; dbpassword = secret;
 dbaddress = db.example.com; dbport = 3306
 }

 Best regards,
 Ana

 On Tue, Aug 4, 2015 at 10:21 PM, Tim Dunphy bluethu...@gmail.com
 wrote:

 Hey guys,

 I have no trouble at all getting the bacula director running if I
 connect to a local datbase running on the bacula server itself.

 However if I try connecting to a database living on another host is
 where I run into an isssue.

 If I try to setup a database that's not running on localhost, this is
 what I get in the logs:

 05-Aug 01:14 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to
 connect to MySQL server.
 Database=bacula User=admin_ssl
 MySQL connect failed either server not running or your authorization is
 incorrect.
 05-Aug 01:14 bacula-dir ERROR TERMINATION
 Please correct configuration file: /etc/bacula/bacula-dir.conf

 This is how I tried to specify this in the director config:

 # Generic catalog service
 Catalog {
   Name = MyCatalog
 # Uncomment the following line if you want the dbi driver
   dbdriver = dbi:mysql; dbaddress = db.example.com; dbport = 3306
   dbname = bacula;  dbuser = admin_ssl; dbpassword = secret
 }

 I also tried specifying it this way:

 # Generic catalog service
 Catalog {
   Name = MyCatalog
 # Uncomment the following line if you want the dbi driver
   #dbdriver = dbi:mysql; dbaddress = db.jokefire.com; dbport = 3306
   dbname = bacula;  dbuser = admin_ssl; dbpassword = secret ;
 dbaddress = db.example.com
 }

 With the exact same result in the logs.

 I have verified that I can connect to the database I'm trying to
 specify in the config on the command line using the same credentials:

 #mysql -uadmin_ssl -p -h db.example.com -e show databases
 Enter password:
 ++
 | Database   |
 ++
 | bacula |
 | certs  |
 | information_schema |
 | mysql  |
 | performance_schema |
 ++

 Can someone please let me know where I am going wrong in the config?

 Thanks!
 Tim

 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B



 --

 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https

[Bacula-users] error connecting to database

2015-08-04 Thread Tim Dunphy
Hey guys,

I have no trouble at all getting the bacula director running if I connect
to a local datbase running on the bacula server itself.

However if I try connecting to a database living on another host is where I
run into an isssue.

If I try to setup a database that's not running on localhost, this is what
I get in the logs:

05-Aug 01:14 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to connect
to MySQL server.
Database=bacula User=admin_ssl
MySQL connect failed either server not running or your authorization is
incorrect.
05-Aug 01:14 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

This is how I tried to specify this in the director config:

# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
  dbdriver = dbi:mysql; dbaddress = db.example.com; dbport = 3306
  dbname = bacula;  dbuser = admin_ssl; dbpassword = secret
}

I also tried specifying it this way:

# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
  #dbdriver = dbi:mysql; dbaddress = db.jokefire.com; dbport = 3306
  dbname = bacula;  dbuser = admin_ssl; dbpassword = secret ;
dbaddress = db.example.com
}

With the exact same result in the logs.

I have verified that I can connect to the database I'm trying to specify in
the config on the command line using the same credentials:

#mysql -uadmin_ssl -p -h db.example.com -e show databases
Enter password:
++
| Database   |
++
| bacula |
| certs  |
| information_schema |
| mysql  |
| performance_schema |
++

Can someone please let me know where I am going wrong in the config?

Thanks!
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] trouble adding TLS client

2015-06-15 Thread Tim Dunphy
Hi Ana,

 Have you configured TLS for this client at bacula-dir.conf?



That was it!! Somehow I missed configuring TLS for this client in
bacula-dir.conf. It's working now.

Thank you!!

Cheers,
Tim

On Mon, Jun 15, 2015 at 8:36 PM, Ana Emília M. Arruda 
emiliaarr...@gmail.com wrote:

 Hi Tim,

 Have you configured TLS for this client at bacula-dir.conf?

 Best regards,
 Ana

 On Mon, Jun 15, 2015 at 10:47 AM, Heitor Faria hei...@bacula.com.br
 wrote:

 Hey all,

 Hello Tim,


  I'm adding some new servers to the backup pool now that I'm successfully
 backing up to S3. Now that space to keep my tapes on is less of an issue,
 it'll be nice to get some more hosts into the backup pool that were
 previously neglected.

 I added one host to the pool without any issue at all. But I keep getting
 stuck on the second host I'm trying to add. Bacula keeps complaining about
 a TLS issue, even tho the cert and key appears to be completely kosher.

 When I test the second new client with 'st client' this is the response I
 get from bacula:

 Select Client (File daemon) resource (1-4): 4
 Connecting to Client logs.jokefire.com at logs.jokefire.com:9102
 Failed to connect to Client logs.jokefire.com.

 I've verified that the port is open from the client to the bacula server:

 [root@ops:~] #telnet logs.jokefire.com 9102
 Trying 216.120.248.98...
 Connected to logs.jokefire.com.
 Escape character is '^]'.

 And I've been able to verify that the cert and key on the new client are
 ok using this tool:

 https://www.sslshopper.com/certificate-key-matcher.html

 Which does the checking for you and seems reliable.

 These are the ownership and permissions on the cert and key on the client
 host:

 [root@logs:~] #ls -l /etc/pki/tls/{certs,private}/logs.jokefire.com.*
 -r. 1 bacula bacula 1444 Jun 14 22:33
 /etc/pki/tls/certs/logs.jokefire.com.crt
 -r. 1 bacula bacula 1708 Jun 14 22:33
 /etc/pki/tls/private/logs.jokefire.com.key

 And this is the config file I'm using for bacula-fd on the client:

 [root@logs:~] #grep -v '#' /etc/bacula/bacula-fd.conf

 Director {
   Name = ops.jokefire.com
   Password = secret
   TLS Certificate = /etc/pki/tls/certs/logs.jokefire.com.crt
   TLS Key = /etc/pki/tls/private/logs.jokefire.com.key
   TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
   TLS Enable = yes
   TLS Require = yes
 }

   Name = logs.jokefire.com
   WorkingDirectory = /var/bacula
   Pid Directory = /var/run
   Maximum Concurrent Jobs = 20
   TLS Certificate = /etc/pki/tls/certs/logs.jokefire.com.crt
   TLS Key = /etc/pki/tls/private/logs.jokefire.com.key
   TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
   TLS Enable = yes
   TLS Require = yes
 }

 Messages {
   Name = Standard
   director = cloud-dir = all, !skipped, !restored
 }


 I basically followed these exact steps to create the key, csr and cert
 that were provided to my by Ana on the list some ages ago!

  Create CA key
 1) openssl genrsa -des3 -out ca.key 4096

 Create CA cert
 2) openssl req -new -x509 -days 3650 -key ca.key -out ca.crt

 Create director1 key and certificate signing request
 3) openssl genrsa -des3 -out director1key.key 4096
 4) openssl req -new -key director1.key -out director1.csr

 Sign the director1 certificate
 5) openssl x509 -req -days 3650 -in director1.csr -CA ca.crt -CAkey
 ca.key -set_serial 01 -out director1.crt

 Don´t know if it is necessary, but converted .crt to .pem
 6) openssl x509 -in director1.crt -out director1.pem
 7) openssl x509 -in ca.crt -out ca.pem

 Really important! Remove the password from the director1 private key
 8) openssl rsa -in director1key.key -out director1.key

 These steps have always worked for me. Until now!!

 Maybe openssl configuration files? It is very tricky. E.g.: you need to
 use a different nsCertType if you are self signing your certificates.
 I just use the key and cert in the same files. This is my procedure:
 http://www.bacula.com.br/criptografia-das-comunicacoes-do-bacula-tls/?lang=en

 Regards,

 ===
 Heitor Medrado de Faria - LPIC-III | ITIL-F |  Bacula Systems Certified
 Administrator II
 I'm a Bacula/SysAdmin looking for a job in USA or Europe. Please
 recommend me.
 Need Bacula training?
 https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list
 +55 61 %2B55%2061%202021-82608268-4220 %2B55%2061%208268-4220
 Site: www.bacula.com.br | FB: heitor.faria
 http://www.facebook.com/heitor.faria

 ===


 To make matters even more confusing is that I have a really nice bacula
 puppet module that I created myself which does a nice job of getting bacula
 clients to work with a bacula server. It's never failed me. Until now!

 I'm wondering if there's something I missed that could get this working
 correctly.

 Thanks!
 Tim
 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B



 

[Bacula-users] trouble adding TLS client

2015-06-14 Thread Tim Dunphy
Hey all,

 I'm adding some new servers to the backup pool now that I'm successfully
backing up to S3. Now that space to keep my tapes on is less of an issue,
it'll be nice to get some more hosts into the backup pool that were
previously neglected.

I added one host to the pool without any issue at all. But I keep getting
stuck on the second host I'm trying to add. Bacula keeps complaining about
a TLS issue, even tho the cert and key appears to be completely kosher.

When I test the second new client with 'st client' this is the response I
get from bacula:

Select Client (File daemon) resource (1-4): 4
Connecting to Client logs.jokefire.com at logs.jokefire.com:9102
Failed to connect to Client logs.jokefire.com.

I've verified that the port is open from the client to the bacula server:

[root@ops:~] #telnet logs.jokefire.com 9102
Trying 216.120.248.98...
Connected to logs.jokefire.com.
Escape character is '^]'.

And I've been able to verify that the cert and key on the new client are ok
using this tool:

https://www.sslshopper.com/certificate-key-matcher.html

Which does the checking for you and seems reliable.

These are the ownership and permissions on the cert and key on the client
host:

[root@logs:~] #ls -l /etc/pki/tls/{certs,private}/logs.jokefire.com.*
-r. 1 bacula bacula 1444 Jun 14 22:33
/etc/pki/tls/certs/logs.jokefire.com.crt
-r. 1 bacula bacula 1708 Jun 14 22:33
/etc/pki/tls/private/logs.jokefire.com.key

And this is the config file I'm using for bacula-fd on the client:

[root@logs:~] #grep -v '#' /etc/bacula/bacula-fd.conf

Director {
  Name = ops.jokefire.com
  Password = secret
  TLS Certificate = /etc/pki/tls/certs/logs.jokefire.com.crt
  TLS Key = /etc/pki/tls/private/logs.jokefire.com.key
  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
  TLS Enable = yes
  TLS Require = yes
}

  Name = logs.jokefire.com
  WorkingDirectory = /var/bacula
  Pid Directory = /var/run
  Maximum Concurrent Jobs = 20
  TLS Certificate = /etc/pki/tls/certs/logs.jokefire.com.crt
  TLS Key = /etc/pki/tls/private/logs.jokefire.com.key
  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
  TLS Enable = yes
  TLS Require = yes
}

Messages {
  Name = Standard
  director = cloud-dir = all, !skipped, !restored
}


I basically followed these exact steps to create the key, csr and cert that
were provided to my by Ana on the list some ages ago!

 Create CA key
1) openssl genrsa -des3 -out ca.key 4096

Create CA cert
2) openssl req -new -x509 -days 3650 -key ca.key -out ca.crt

Create director1 key and certificate signing request
3) openssl genrsa -des3 -out director1key.key 4096
4) openssl req -new -key director1.key -out director1.csr

Sign the director1 certificate
5) openssl x509 -req -days 3650 -in director1.csr -CA ca.crt -CAkey ca.key
-set_serial 01 -out director1.crt

Don´t know if it is necessary, but converted .crt to .pem
6) openssl x509 -in director1.crt -out director1.pem
7) openssl x509 -in ca.crt -out ca.pem

Really important! Remove the password from the director1 private key
8) openssl rsa -in director1key.key -out director1.key

These steps have always worked for me. Until now!!

To make matters even more confusing is that I have a really nice bacula
puppet module that I created myself which does a nice job of getting bacula
clients to work with a bacula server. It's never failed me. Until now!

I'm wondering if there's something I missed that could get this working
correctly.

Thanks!
Tim
-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] backing up to S3

2015-06-10 Thread Tim Dunphy
Hey guys,

 I was really excited when I upgraded my bacula server to CentOS 7 and
installed the latest version of s3fs. Because I found that I was able to
mount an s3 bucket to my local file system with the right user id and
permissions to use with bacula.

 My old server was a centos 5.9 host and that version of s3fs wouldn't
allow you to set the uid/gid for the directory you're mounting to.

 And what I've found is that backing up to S3 with these latest versions
works GREAT!! I am able to create tapes on my S3 mounted backup directory.
And the backups complete without any complaint from the bacula system.

However the problem comes in restoring files. Because what I've found is
that the restores will fail even if you are restoring just one tiny file. I
tried restoring a resolv.conf file.

What happens is that the s3fs directory disconnects from s3 and bacula
gives a 'waiting for mount request' that seems to go on forever.

If I do a listing of the directory at this point, on the command line
outside the bacula environment I get a 'transport disconnected' error. I'm
not sure why backing up to S3 is fine but restoring is not.

What I'd like to know is if there are any other alternatives to S3FS out
there that would allow you to mount an S3 bucket on your local file systems
and use it for backups and restores.

Also I'm wondering if there's any optimizations or changes that anyone may
know about that I can do to S3FS to allow this to work?

Thanks,
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] backing up to S3

2015-06-10 Thread Tim Dunphy
Hey there Heitor!

Nice to hear from ya bud!! I actually did get this to work. The key that
lead to success was to add a 'use_cache' option. I basically assigned a
10GB EBS volume just to use as a cache. It was just an experiment, and I
planned on getting did of the 10GB EBS and get one much smaller to use
later.

But what I found is that the 10GB volume filled up to 8.5GB during backups
and restores! Everything worked, but it appears that a large cache is the
only answer. Almost defeats the purpose of using S3, but not quite I hope.

I think what was happening previously was that S3FS was hitting some sort
of default cache limit and dying out.

It'll be interesting to see how this pans out. Cuz I was planning on adding
a number of new hosts to backups that I previously couldn't afford to due
to the expense of storing my backup tapes on EBS. S3 is way cheaper.

I can let you guys know how it goes if you're intetested.

Thanks,
Tim

On Wed, Jun 10, 2015 at 4:40 PM, Heitor Faria hei...@bacula.com.br wrote:

 Also I'm wondering if there's any optimizations or changes that anyone may
 know about that I can do to S3FS to allow this to work?

 Just in time: you can always try to download your volumes using AWS web
 interface.

 Thanks,
 Tim

 Cheers,
 ===
 Heitor Medrado de Faria - LPIC-III | ITIL-F |  Bacula Systems Certified
 Administrator II
 I'm a Bacula/SysAdmin looking for a job in USA or Europe. Please recommend
 me.
 Need Bacula training?
 https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list
 +55 61 %2B55%2061%202021-82608268-4220 %2B55%2061%208268-4220
 Site: www.bacula.com.br | FB: heitor.faria
 http://www.facebook.com/heitor.faria
 ===


 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B



 --

 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users





-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] backups fail with attribute create error

2015-05-11 Thread Tim Dunphy
Hey guys,

 I'm only backing up a couple of VM instances right now. But last night
both of them failed with this error:

11-May 04:01 ops.jokefire.com JobId 58: Fatal error: catreq.c:587 attribute
create error.

That's what I saw with the messages command. However I did not find a
corresponding error in the bacula log located at /var/log/bacula/bacula.log

This is what I saw when I went to check on the backups for today:

Running Jobs:
Console connected at 11-May-15 10:09
 JobId Level   Name   Status
==
58 Increme  web1.jokefire.com.2015-05-11_03.05.04_05 has a fatal error
59 FullJokefire_BackupCatalog.2015-05-11_03.10.00_06 is waiting for
higher priority jobs to finish

Can anyone let me know what I'll need to do to get rid of this error and
start taking backups again?

Thanks,
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] (no subject)

2015-04-25 Thread Tim Dunphy
Hey all,

 I have one host that seems to be erroring out whenever I try to take a
backup of it:


Running Jobs:
Console connected at 25-Apr-15 19:23
 JobId Level   Name   Status
==
 3 Fullweb1.jokefire.com.2015-04-25_19.23.56_09 has a fatal error

And when I run messages I see this:

*messages
25-Apr 20:40 ops.jokefire.com JobId 3: Fatal error: catreq.c:587 attribute
create error.

Can anyone tell me how I can get around this error?

Thanks!
TIm


-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy
Hi Heitor,


 Hey Tim: it seems that the make_mysql_tables scripts isn't creating the
 Version table for some reason. I would suggest you to download Bacula
 5.2.13 code and run the database creation scripts from there.
 Ps.: I really like your posts at US Govmnt list.
 Regards,



Thanks for your input. However, the tables are there in the database. I can
do the select that the error is complaining about, with no isse!

The error from the log is saying:

27-Mar 00:14 bacula-dir JobId 0: Fatal error: Query failed: SELECT
VersionId FROM Version: ERR=no such table: Version

And yet, I can connect to the database, and do the select:

mysql use bacula
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql SELECT VersionId FROM Version;
+---+
| VersionId |
+---+
|14 |
+---+
1 row in set (0.00 sec)




Here's a list of the tables:

mysql show tables;
+--+
| Tables_in_bacula |
+--+
| BaseFiles|
| CDImages |
| Client   |
| Counters |
| Device   |
| File |
| FileSet  |
| Filename |
| Job  |
| JobHisto |
| JobMedia |
| Location |
| LocationLog  |
| Log  |
| Media|
| MediaType|
| Path |
| PathHierarchy|
| PathVisibility   |
| Pool |
| RestoreObject|
| Status   |
| Storage  |
| UnsavedFiles |
| Version  |
+--+
25 rows in set (0.00 sec)


It also seems that most of the tables are empty at this stage. However I
can do a select on this table as well:

mysql select * from Status;
+---+-+--+
| JobStatus | JobStatusLong   | Severity |
+---+-+--+
| A | Canceled by user|   90 |
| B | Blocked |   15 |
| C | Created, not yet running|   15 |
| D | Verify found differences|   15 |
| E | Terminated with errors  |   25 |
| F | Waiting for Client  |   15 |
| M | Waiting for media mount |   15 |
| R | Running |   15 |
| S | Waiting for Storage daemon  |   15 |
| T | Completed successfully  |   10 |
| a | SD despooling attributes|   15 |
| c | Waiting for client resource |   15 |
| d | Waiting on maximum jobs |   15 |
| e | Non-fatal error |   20 |
| f | Fatal error |  100 |
| i | Doing batch insert file records |   15 |
| j | Waiting for job resource|   15 |
| m | Waiting for new media   |   15 |
| p | Waiting on higher priority jobs |   15 |
| s | Waiting for storage resource|   15 |
| t | Waiting on start time   |   15 |
+---+-+--+
21 rows in set (0.00 sec)

Any other thoughts?

Thanks,
Tim

On Fri, Mar 27, 2015 at 9:13 AM, Heitor Faria hei...@bacula.com.br wrote:

 So, just to be thorough, I dropped the database again and ran these
 commands again!

 [root@ops:/etc/bacula] #./create_mysql_database
 Creation of bacula database succeeded.

 [root@ops:/etc/bacula] #./make_mysql_tables
 Creation of Bacula MySQL tables succeeded.

 [root@ops:/etc/bacula] #./grant_mysql_privileges
 
 Privileges for user bacula granted on database bacula.

 And went to start the director again!

 [root@ops:~] #service bacula-dir start
 Starting bacula-dir:   [  OK  ]

 Checked to see if it was running:

 [root@ops:~] #service bacula-dir status
 bacula-dir dead but subsys locked

 Hmmm... NOPE!!

 And checked the log file:

 [root@ops:~] #tail /var/log/bacula/bacula.log
 27-Mar 00:14 bacula-dir JobId 0: Fatal error: Query failed: SELECT
 VersionId FROM Version: ERR=no such table: Version
 27-Mar 00:14 bacula-dir JobId 0: Fatal error: Could not open Catalog
 JokefireCatalog, database bacula.
 27-Mar 00:14 bacula-dir JobId 0: Fatal error: Query failed: SELECT
 VersionId FROM Version: ERR=no such table: Version
 27-Mar 00:14 bacula-dir ERROR TERMINATION
 Please correct configuration file: /etc/bacula/bacula-dir.conf
 You have new mail in /var/spool/mail/root

 Hey Tim: it seems that the make_mysql_tables scripts isn't creating the
 Version table for some reason. I would suggest you to download Bacula
 5.2.13 code and run the database creation scripts from there.
 Ps.: I really like your posts at US Govmnt list.

 Regards,
 
 Heitor Medrado de Faria - LPIC-III | ITIL-F
 Need Bacula 

Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy
Hello Heitor,

I can see in your dir.conf that you are using an admin user to connect to
 your database.
 Did you try the bacula user? This is the one created by the
 grant_x_privileges script.


I took a look at the grant_mysql_privileges script. And noticed that the
password entry wasn't set. So I set the password to the one I use and ran
the script again.

And I was able to connect and run a query against the database:

[root@ops:/etc/bacula] #mysql -ubacula -p -e use bacula; select * from
Version
Enter password:
+---+
| VersionId |
+---+
|14 |
+---+

Then I tried changing the DB login information in the director conf to
match what was in the mysql grant script:

# Generic catalog service
Catalog {
  Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
#  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306
  dbname = bacula; dbuser = bacula; dbpassword = secret
}

Then tried to startup the director again:

[root@ops:/etc/bacula] #service bacula-dir start
Starting bacula-dir:   [  OK  ]

[root@ops:/etc/bacula] #service bacula-dir status
bacula-dir dead but subsys locked

But no luck, unfortunately. :(

Same errors are turning up in the logs:

[root@ops:/etc/bacula] #tail /var/log/bacula/bacula.log
27-Mar 11:00 bacula-dir JobId 0: Fatal error: Query failed: SELECT
VersionId FROM Version: ERR=no such table: Version
27-Mar 11:00 bacula-dir JobId 0: Fatal error: Could not open Catalog
JokefireCatalog, database bacula.
27-Mar 11:00 bacula-dir JobId 0: Fatal error: Query failed: SELECT
VersionId FROM Version: ERR=no such table: Version
27-Mar 11:00 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

Any other ideas?

Thanks,
Tim



On Fri, Mar 27, 2015 at 10:36 AM, Heitor Faria hei...@bacula.com.br wrote:

 Hi Heitor,

 Hey Tim: it seems that the make_mysql_tables scripts isn't creating the
 Version table for some reason. I would suggest you to download Bacula
 5.2.13 code and run the database creation scripts from there.
 Ps.: I really like your posts at US Govmnt list.
 Regards,



 Thanks for your input. However, the tables are there in the database. I
 can do the select that the error is complaining about, with no isse!

 The error from the log is saying:

 27-Mar 00:14 bacula-dir JobId 0: Fatal error: Query failed: SELECT
 VersionId FROM Version: ERR=no such table: Version

 And yet, I can connect to the database, and do the select:

 mysql use bacula
 Reading table information for completion of table and column names
 You can turn off this feature to get a quicker startup with -A

 Database changed
 mysql SELECT VersionId FROM Version;
 +---+
 | VersionId |
 +---+
 |14 |
 +---+
 1 row in set (0.00 sec)




 Here's a list of the tables:

 mysql show tables;
 +--+
 | Tables_in_bacula |
 +--+
 | BaseFiles|
 | CDImages |
 | Client   |
 | Counters |
 | Device   |
 | File |
 | FileSet  |
 | Filename |
 | Job  |
 | JobHisto |
 | JobMedia |
 | Location |
 | LocationLog  |
 | Log  |
 | Media|
 | MediaType|
 | Path |
 | PathHierarchy|
 | PathVisibility   |
 | Pool |
 | RestoreObject|
 | Status   |
 | Storage  |
 | UnsavedFiles |
 | Version  |
 +--+
 25 rows in set (0.00 sec)


 It also seems that most of the tables are empty at this stage. However I
 can do a select on this table as well:

 mysql select * from Status;
 +---+-+--+
 | JobStatus | JobStatusLong   | Severity |
 +---+-+--+
 | A | Canceled by user|   90 |
 | B | Blocked |   15 |
 | C | Created, not yet running|   15 |
 | D | Verify found differences|   15 |
 | E | Terminated with errors  |   25 |
 | F | Waiting for Client  |   15 |
 | M | Waiting for media mount |   15 |
 | R | Running |   15 |
 | S | Waiting for Storage daemon  |   15 |
 | T | Completed successfully  |   10 |
 | a | SD despooling attributes|   15 |
 | c | Waiting for client resource |   15 |
 | d | Waiting on maximum jobs |   15 |
 | e | Non-fatal error |   20 |
 | f | Fatal error |  100 |
 | i | Doing batch insert file records |   15 |
 | j | Waiting for job resource|   15 |
 | m | Waiting for new media   |   15 |
 | p | Waiting on higher priority 

Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy
Hi Dmitri,


That sounds familiar... do you need to do what the
 /usr/share/doc/bacula-.../quickstart_mysql.txt says?


Yep! I ran the following commands from the mysql quickstart:

[root@ops:~] #alternatives --set libbaccats.so
/usr/lib64/libbaccats-mysql.so
You have new mail in /var/spool/mail/root

[root@ops:~] #chmod +r /etc/bacula/bconsole.conf /etc/bacula/bat.conf

Made sure that my passwords all matched up in the config files:

[root@ops:/etc/bacula] #grep -i 'secret' *.conf
bacula-dir.conf:  Password = secret # Console password
bacula-dir.conf:  Password = secret  # password for FileDaemon
bacula-dir.conf:#  Password = secret# password for FileDaemon 2
bacula-dir.conf:  Password = secret
bacula-dir.conf:  Password = secret
bacula-dir.conf:#  Password = secret # password for Storage daemon
bacula-dir.conf:  Password = secret
bacula-fd.conf:  Password = secret
bacula-sd.conf:  Password = secret
bconsole.conf:  Password = secret

(changed so as to not give away the password).

And after taking those steps, I still find find no MySQL  support in the
bacula-dir binary!!

[root@ops:/etc/bacula] #ldd $(which bacula-dir) | grep mysql
[root@ops:/etc/bacula] #

[root@ops:/etc/bacula] #ldd $(which bacula-dir)
libbacfind-7.0.5.so = /usr/lib64/libbacfind-7.0.5.so
(0x2aab8000)
libbacsql-7.0.5.so = /usr/lib64/libbacsql-7.0.5.so
(0x2acc5000)
libbaccats-7.0.5.so = /usr/lib64/libbaccats-7.0.5.so
(0x2aeee000)
libbaccfg-7.0.5.so = /usr/lib64/libbaccfg-7.0.5.so
(0x2b0f5000)
libbac-7.0.5.so = /usr/lib64/libbac-7.0.5.so (0x2b2ff000)
libpthread.so.0 = /lib64/libpthread.so.0 (0x2b568000)
libdl.so.2 = /lib64/libdl.so.2 (0x2b785000)
libwrap.so.0 = /lib64/libwrap.so.0 (0x2b989000)
libssl.so.6 = /lib64/libssl.so.6 (0x2bb92000)
libcrypto.so.6 = /lib64/libcrypto.so.6 (0x2bde1000)
libcap.so.1 = /lib64/libcap.so.1 (0x2c132000)
libstdc++.so.6 = /usr/lib64/libstdc++.so.6 (0x2c336000)
libm.so.6 = /lib64/libm.so.6 (0x2c637000)
libgcc_s.so.1 = /lib64/libgcc_s.so.1 (0x2c8ba000)
libc.so.6 = /lib64/libc.so.6 (0x2cac8000)
libsqlite3.so.0 = /usr/lib64/libsqlite3.so.0 (0x2ce22000)
libz.so.1 = /lib64/libz.so.1 (0x2d07d000)
/lib64/ld-linux-x86-64.so.2 (0x4000)
libnsl.so.1 = /lib64/libnsl.so.1 (0x2d292000)
libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2
(0x2d4aa000)
libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x2d6d8000)
libcom_err.so.2 = /lib64/libcom_err.so.2 (0x2d96e000)
libk5crypto.so.3 = /usr/lib64/libk5crypto.so.3 (0x2db7)
libkrb5support.so.0 = /usr/lib64/libkrb5support.so.0
(0x2dd96000)
libkeyutils.so.1 = /lib64/libkeyutils.so.1 (0x2df9e000)
libresolv.so.2 = /lib64/libresolv.so.2 (0x2e1a)
libselinux.so.1 = /lib64/libselinux.so.1 (0x2e3b6000)
libsepol.so.1 = /lib64/libsepol.so.1 (0x2e5ce000)


Thanks for the suggestions. Wondering where to go from here.. ! :)

Tim


On Fri, Mar 27, 2015 at 1:28 PM, Dimitri Maziuk dmaz...@bmrb.wisc.edu
wrote:

 On 03/27/2015 11:52 AM, Tim Dunphy wrote:

  Ok I think you're right about this!

  No mention of MySQL!!!

 That sounds familiar... do you need to do what the
 /usr/share/doc/bacula-.../quickstart_mysql.txt says?

 --
 Dimitri Maziuk
 Programmer/sysadmin
 BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy
Hi Josip,



I am pretty much sure that after the two lines that contain
 dir_plugins.c, you should see several lines mentioning mysql.c

 Are you sure that your bacula-dir has been compiled with mysql support?
 You could probably check that with the command such as:
  ldd /path/to/your/bacula-dir | grep mysql



Ok I think you're right about this! Here's what I get when I do an ldd
 against the binary:

  [root@ops:~] #ldd $(which bacula-dir)
 libbacfind-7.0.5.so = /usr/lib64/libbacfind-7.0.5.so
 (0x2aab8000)
 libbacsql-7.0.5.so = /usr/lib64/libbacsql-7.0.5.so
 (0x2acc5000)
 libbaccats-7.0.5.so = /usr/lib64/libbaccats-7.0.5.so
 (0x2aeee000)
 libbaccfg-7.0.5.so = /usr/lib64/libbaccfg-7.0.5.so
 (0x2b0f5000)
 libbac-7.0.5.so = /usr/lib64/libbac-7.0.5.so (0x2b2ff000)
 libpthread.so.0 = /lib64/libpthread.so.0 (0x2b568000)
 libdl.so.2 = /lib64/libdl.so.2 (0x2b785000)
 libwrap.so.0 = /lib64/libwrap.so.0 (0x2b989000)
 libssl.so.6 = /lib64/libssl.so.6 (0x2bb92000)
 libcrypto.so.6 = /lib64/libcrypto.so.6 (0x2bde1000)
 libcap.so.1 = /lib64/libcap.so.1 (0x2c132000)
 libstdc++.so.6 = /usr/lib64/libstdc++.so.6 (0x2c336000)
 libm.so.6 = /lib64/libm.so.6 (0x2c637000)
 libgcc_s.so.1 = /lib64/libgcc_s.so.1 (0x2c8ba000)
 libc.so.6 = /lib64/libc.so.6 (0x2cac8000)
 libsqlite3.so.0 = /usr/lib64/libsqlite3.so.0 (0x2ce22000)
 libz.so.1 = /lib64/libz.so.1 (0x2d07d000)
 /lib64/ld-linux-x86-64.so.2 (0x4000)
 libnsl.so.1 = /lib64/libnsl.so.1 (0x2d292000)
 libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2
 (0x2d4aa000)
 libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x2d6d8000)
 libcom_err.so.2 = /lib64/libcom_err.so.2 (0x2d96e000)
 libk5crypto.so.3 = /usr/lib64/libk5crypto.so.3
 (0x2db7)
 libkrb5support.so.0 = /usr/lib64/libkrb5support.so.0
 (0x2dd96000)
 libkeyutils.so.1 = /lib64/libkeyutils.so.1 (0x2df9e000)
 libresolv.so.2 = /lib64/libresolv.so.2 (0x2e1a)
 libselinux.so.1 = /lib64/libselinux.so.1 (0x2e3b6000)
 libsepol.so.1 = /lib64/libsepol.so.1 (0x2e5ce000)



No mention of MySQL!!!

If I do a yum search for references to mysql and bacula:

[root@ops:~] #yum search bacula| grep mysql
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Repository kbs-CentOS-Extras is listed more than once in the configuration
Repository kbs-CentOS-Testing is listed more than once in the configuration
bacula-director-mysql.x86_64 : Bacula Director with MySQL database support
bacula-storage-mysql.x86_64 : MySQL Bacula storage daemon files

That's what I get.

If I go:

[root@ops:~] #yum install bacula-director-mysql.x86_64

I get:

Package bacula-director-mysql is obsoleted by bacula-director, trying to
install bacula-director-7.0.5-1.el5.x86_64 instead
Package bacula-director-7.0.5-1.el5.x86_64 already installed and latest
version
Nothing to do


I used this yum repo to install bacula 7

[root@ops:~] #cat /etc/yum.repos.d/slaanesh-Bacula-epel-5.repo
[slaanesh-Bacula]
name=Copr repo for Bacula owned by slaanesh
baseurl=
http://copr-be.cloud.fedoraproject.org/results/slaanesh/Bacula/epel-5-$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=
http://copr-be.cloud.fedoraproject.org/results/slaanesh/Bacula/pubkey.gpg
enabled=1

Maybe this is some sort of funky repo that's not giving me what I need? Any
thoughts?

Thanks!

Tim
On Fri, Mar 27, 2015 at 12:34 PM, Josip Deanovic djosip+n...@linuxpages.net
 wrote:

 Quoting message written on Friday 2015-03-27 12:08:27:
  Ok, I've verified that director is down, only storage and file daemons
  are running:
 
  [root@ops:~] #ps -ef | grep bacula | grep -v grep
  root 12915 1  0 Mar26 ?00:00:00 bacula-fd -c
  /etc/bacula/bacula-fd.conf -u root -g root
  bacula   26664 1  0 00:21 ?00:00:00 bacula-sd -c
  /etc/bacula/bacula-sd.conf -u bacula -g disk
 
  And this is what I get when I run that command:
 
  [root@ops:~] #bacula-dir -c /etc/bacula/bacula-dir.conf -d 200 -f
  bacula-dir: dird.c:194-0 Debug level = 200
  bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
  bacula-dir: runscript.c:284-0 runscript: debug
  bacula-dir: runscript.c:285-0  -- RunScript
  bacula-dir: runscript.c:286-0   -- Command=/etc/bacula/
  make_catalog_backup.pl JokefireCatalog
  bacula-dir: runscript.c:287-0   -- Target=
  bacula-dir: runscript.c:288-0   -- RunOnSuccess=1
  

Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy
Josip,


I uninstalled bacula-director as you suggested. And went through the
install again. It seems to only offer me the bacula-dir that does'nt
directly support mysql, if I'm understanding everything correctly:


[root@ops:~] #yum install bacula-director-mysql.x86_64
Loaded plugins: downloadonly, fastestmirror, priorities
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Repository kbs-CentOS-Extras is listed more than once in the configuration
Repository kbs-CentOS-Testing is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * addons: mirror.symnds.com
 * base: mirror.metrocast.net
 * extras: mirror.us.leaseweb.net
 * remi: mirrors.mediatemple.net
 * rpmforge: mirror.us.leaseweb.net
 * updates: mirrors.mit.edu
Excluding Packages in global exclude list
Finished
Setting up Install Process
*Package bacula-director-mysql is obsoleted by bacula-director, trying to
install bacula-director-7.0.5-1.el5.x86_64 instead*
Resolving Dependencies
There are unfinished transactions remaining. You might consider running
yum-complete-transaction first to finish them.
-- Running transaction check
--- Package bacula-director.x86_64 0:7.0.5-1.el5 set to be updated
-- Finished Dependency Resolution

Dependencies Resolved

=
 Package   Arch Version
 Repository Size
=
Installing:
* bacula-director   x86_64   7.0.5-1.el5
   slaanesh-Bacula   337 k*

Transaction Summary
=
Install   1 Package(s)
Upgrade   0 Package(s)

Total download size: 337 k
Is this ok [y/N]:

Thanks for your help so far. Further suggestions would be appreciated!

On Fri, Mar 27, 2015 at 1:06 PM, Josip Deanovic djosip+n...@linuxpages.net
wrote:

 Quoting message written on Friday 2015-03-27 12:52:13:
  No mention of MySQL!!!
 
  If I do a yum search for references to mysql and bacula:
 
  [root@ops:~] #yum search bacula| grep mysql
  Repository base is listed more than once in the configuration
  Repository updates is listed more than once in the configuration
  Repository extras is listed more than once in the configuration
  Repository centosplus is listed more than once in the configuration
  Repository contrib is listed more than once in the configuration
  Repository kbs-CentOS-Extras is listed more than once in the
  configuration Repository kbs-CentOS-Testing is listed more than once in
  the configuration bacula-director-mysql.x86_64 : Bacula Director with
  MySQL database support bacula-storage-mysql.x86_64 : MySQL Bacula
  storage daemon files
 
  That's what I get.
 
  If I go:
 
  [root@ops:~] #yum install bacula-director-mysql.x86_64
 
  I get:
 
  Package bacula-director-mysql is obsoleted by bacula-director, trying to
  install bacula-director-7.0.5-1.el5.x86_64 instead
  Package bacula-director-7.0.5-1.el5.x86_64 already installed and latest
  version
  Nothing to do

 I think that bacula-director package brings you the bacula-director with
 the support for sqlite library.

 You want to use mysql therefore you need to uninstall that package and
 install the appropriate one:

 yum remove bacula-director
 yum install bacula-director-mysql.x86_64

 And than continue with your bacula setup.


  I used this yum repo to install bacula 7
 
  [root@ops:~] #cat /etc/yum.repos.d/slaanesh-Bacula-epel-5.repo
  [slaanesh-Bacula]
  name=Copr repo for Bacula owned by slaanesh
  baseurl=
  http://copr-be.cloud.fedoraproject.org/results/slaanesh/Bacula/epel-5-$b
  asearch/ skip_if_unavailable=True
  gpgcheck=1
  gpgkey=
  http://copr-be.cloud.fedoraproject.org/results/slaanesh/Bacula/pubkey.gp
  g enabled=1
 
  Maybe this is some sort of funky repo that's not giving me what I need?
  Any thoughts?

 I wouldn't call it funky repo. Its maintainer is also reading this list.
 I intend to use this repo on some servers.

 --
 Josip Deanovic


 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 

Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy
Hi Josip,

I wonder if your bacula director is reading the correct config file.
 Could you check that your bacula-dir is down and try to start the
 bacula-dir manually with the debug set?
 For example:
 bacula-dir -c /etc/bacula/bacula.dir.conf -d 200 -f
 That should show some debug output including the lines where the bacula
 is trying to connect to the database.
 It might be helpful to see your last 25 lines of the output but note
 that it will write out the database password so you might want to
 replace it with something else.



Ok, I've verified that director is down, only storage and file daemons are
running:

[root@ops:~] #ps -ef | grep bacula | grep -v grep
root 12915 1  0 Mar26 ?00:00:00 bacula-fd -c
/etc/bacula/bacula-fd.conf -u root -g root
bacula   26664 1  0 00:21 ?00:00:00 bacula-sd -c
/etc/bacula/bacula-sd.conf -u bacula -g disk

And this is what I get when I run that command:

[root@ops:~] #bacula-dir -c /etc/bacula/bacula-dir.conf -d 200 -f
bacula-dir: dird.c:194-0 Debug level = 200
bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
bacula-dir: runscript.c:284-0 runscript: debug
bacula-dir: runscript.c:285-0  -- RunScript
bacula-dir: runscript.c:286-0   -- Command=/etc/bacula/
make_catalog_backup.pl JokefireCatalog
bacula-dir: runscript.c:287-0   -- Target=
bacula-dir: runscript.c:288-0   -- RunOnSuccess=1
bacula-dir: runscript.c:289-0   -- RunOnFailure=0
bacula-dir: runscript.c:290-0   -- FailJobOnError=1
bacula-dir: runscript.c:291-0   -- RunWhen=2
bacula-dir: runscript.c:284-0 runscript: debug
bacula-dir: runscript.c:285-0  -- RunScript
bacula-dir: runscript.c:286-0   --
Command=/etc/bacula/delete_catalog_backup
bacula-dir: runscript.c:287-0   -- Target=
bacula-dir: runscript.c:288-0   -- RunOnSuccess=1
bacula-dir: runscript.c:289-0   -- RunOnFailure=0
bacula-dir: runscript.c:290-0   -- FailJobOnError=1
bacula-dir: runscript.c:291-0   -- RunWhen=1
bacula-dir: jcr.c:128-0 read_last_jobs seek to 192
bacula-dir: jcr.c:135-0 Read num_items=10
bacula-dir: dir_plugins.c:148-0 Load dir plugins
bacula-dir: dir_plugins.c:150-0 No dir plugin dir!
bacula-dir: dird.c:972-0 Could not open Catalog JokefireCatalog, database
bacula.
bacula-dir: dird.c:977-0 Query failed: SELECT VersionId FROM Version:
ERR=no such table: Version
27-Mar 12:04 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

It looks like it can't find a catalog by the name JokefireCatalog. But it
used to be there before some data got deleted.

So is this a physical file on the file system that it's not finding?  Or is
this an entry in the database that it's not finding? Any ideas how to
correct this?

Thanks!!
Tim



On Fri, Mar 27, 2015 at 11:47 AM, Josip Deanovic djosip+n...@linuxpages.net
 wrote:

 Quoting message written on Friday 2015-03-27 11:34:29:
  Yep! that works!
 
  [root@ops:~] #mysql -ubacula -p -h localhost
  Enter password:
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 32
  Server version: 5.5.42 MySQL Community Server (GPL) by Remi
 
  Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights
  reserved.
 
  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective
  owners.
 
  Type 'help;' or '\h' for help. Type '\c' to clear the current input
  statement.
 
  mysql
 
 
 
  Still need some ideas, unfortunately! :(

 I wonder if your bacula director is reading the correct config file.
 Could you check that your bacula-dir is down and try to start the
 bacula-dir manually with the debug set?

 For example:
 bacula-dir -c /etc/bacula/bacula.dir.conf -d 200 -f

 That should show some debug output including the lines where the bacula
 is trying to connect to the database.

 It might be helpful to see your last 25 lines of the output but note
 that it will write out the database password so you might want to
 replace it with something else.

 --
 Josip Deanovic


 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from 

Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy
Hi Josip,


Are you able to connect to the mysql using the same credentials as
 bacula but using mysql client with -h localhost option, e.g.
   mysql -h localhost -u bacula -p bacula


Yep! that works!

[root@ops:~] #mysql -ubacula -p -h localhost
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 32
Server version: 5.5.42 MySQL Community Server (GPL) by Remi

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql



Still need some ideas, unfortunately! :(

Thanks!!!
Tim





On Fri, Mar 27, 2015 at 11:13 AM, Josip Deanovic djosip+n...@linuxpages.net
 wrote:

 Quoting message written on Friday 2015-03-27 11:01:52:
  Hello Heitor,
 
  I can see in your dir.conf that you are using an admin user to connect
  to
   your database.
   Did you try the bacula user? This is the one created by the
   grant_x_privileges script.
 
  I took a look at the grant_mysql_privileges script. And noticed that the
  password entry wasn't set. So I set the password to the one I use and
  ran the script again.
 
  And I was able to connect and run a query against the database:
 
  [root@ops:/etc/bacula] #mysql -ubacula -p -e use bacula; select * from
  Version
  Enter password:
  +---+
 
  | VersionId |
 
  +---+
 
  |14 |
 
  +---+
 
  Then I tried changing the DB login information in the director conf to
  match what was in the mysql grant script:
 
  # Generic catalog service
  Catalog {
Name = JokefireCatalog
  # Uncomment the following line if you want the dbi driver
  #  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306
dbname = bacula; dbuser = bacula; dbpassword = secret
  }
 
  Then tried to startup the director again:
 
  [root@ops:/etc/bacula] #service bacula-dir start
  Starting bacula-dir:   [  OK  ]
 
  [root@ops:/etc/bacula] #service bacula-dir status
  bacula-dir dead but subsys locked
 
  But no luck, unfortunately. :(
 
  Same errors are turning up in the logs:
 
  [root@ops:/etc/bacula] #tail /var/log/bacula/bacula.log
  27-Mar 11:00 bacula-dir JobId 0: Fatal error: Query failed: SELECT
  VersionId FROM Version: ERR=no such table: Version
  27-Mar 11:00 bacula-dir JobId 0: Fatal error: Could not open Catalog
  JokefireCatalog, database bacula.
  27-Mar 11:00 bacula-dir JobId 0: Fatal error: Query failed: SELECT
  VersionId FROM Version: ERR=no such table: Version
  27-Mar 11:00 bacula-dir ERROR TERMINATION
  Please correct configuration file: /etc/bacula/bacula-dir.conf
 
  Any other ideas?

 Are you able to connect to the mysql using the same credentials as
 bacula but using mysql client with -h localhost option, e.g.
   mysql -h localhost -u bacula -p bacula


 --
 Josip Deanovic


 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy

 So I'd trace those !@#$ing alternatives symlinks and see which libbaccat
 your director is actually finding.


Ah-HA!!!

[root@ops:/etc/bacula] #ls -l /usr/lib64/libbaccats-7.0.5.so
lrwxrwxrwx 1 root root 21 Mar 25 22:33 /usr/lib64/libbaccats-7.0.5.so -
libbaccats-sqlite3.so

OK so that libbacats file is looking at sqlite! Not mysql.

So these are the libbacats files I have in /usr/lib64

[root@ops:/etc/bacula] #ls -l /usr/lib64/libbaccats*
*lrwxrwxrwx 1 root root26 Mar 25 21:50 /usr/lib64/libbaccats-5.2.13.so
http://libbaccats-5.2.13.so - libbaccats-mysql-5.2.13.so
http://libbaccats-mysql-5.2.13.so*
lrwxrwxrwx 1 root root21 Mar 25 22:33 /usr/lib64/libbaccats-7.0.5.so -
libbaccats-sqlite3.so
-rwxr-xr-x 1 root root   931 Mar 19  2013 /usr/lib64/libbaccats.la
*-rwxr-xr-x 1 root root 86149 Mar 19  2013
/usr/lib64/libbaccats-mysql-5.2.13.so http://libbaccats-mysql-5.2.13.so*
*-rwxr-xr-x 1 root root 25016 Sep 10  2014
/usr/lib64/libbaccats-mysql-7.0.5.so http://libbaccats-mysql-7.0.5.so*
-rwxr-xr-x 1 root root  1000 Mar 19  2013 /usr/lib64/libbaccats-mysql.la
*lrwxrwxrwx 1 root root25 Mar 26 13:54 /usr/lib64/libbaccats-mysql.so
- libbaccats-mysql-7.0.5.so http://libbaccats-mysql-7.0.5.so*
-rwxr-xr-x 1 root root 32752 Sep 10  2014 /usr/lib64/
libbaccats-postgresql-7.0.5.so
lrwxrwxrwx 1 root root30 Mar 26 13:54
/usr/lib64/libbaccats-postgresql.so - libbaccats-postgresql-7.0.5.so
-rwxr-xr-x 1 root root 23976 Sep 10  2014 /usr/lib64/
libbaccats-sqlite3-7.0.5.so
lrwxrwxrwx 1 root root27 Mar 26 13:54 /usr/lib64/libbaccats-sqlite3.so
- libbaccats-sqlite3-7.0.5.so


I tried setting the alternatives this way:

[root@ops:/etc/bacula] #alternatives --set libbaccats-mysql-7.0.5.so
 /usr/lib64/libbaccats-mysql.so

So I guess I'm still not doing this quite right, because it looks like the
mysql libraries are still not linked to the bacula director:

[root@ops:/etc/bacula] #ldd $(which bacula-dir)| grep -i mysql
[root@ops:/etc/bacula] #

Nothing shows up. So what do I need to do to get this working correctly?

Thanks
Tim





On Fri, Mar 27, 2015 at 2:29 PM, Dimitri Maziuk dmaz...@bmrb.wisc.edu
wrote:

 On 03/27/2015 01:22 PM, Tim Dunphy wrote:

  Hmmm...ok well if I do a ldd on that libcats file I see no mysql support
 is
  listed:

 Well, keeping in mind the different everything, here's what I got on a
 working 5.2.13/postgres 9.2:

  # ldd /usr/sbin/bacula-dir
  linux-vdso.so.1 =  (0x7fff28abe000)
  libbacfind-5.2.13.so = /usr/lib64/libbacfind-5.2.13.so
 (0x0039dee0)
  libbacsql-5.2.13.so = /usr/lib64/libbacsql-5.2.13.so
 (0x0039e4e0)
  libbaccats-5.2.13.so = /usr/lib64/libbaccats-5.2.13.so
 (0x7facfc951000)
  ...

  # ldd /usr/lib64/libbaccats-5.2.13.so
  linux-vdso.so.1 =  (0x7fff84932000)
  libpq.so.5 = /usr/pgsql-9.2/lib/libpq.so.5 (0x7f5e651de000)
 ^

 libpq is the postgres library.

 So I'd trace those !@#$ing alternatives symlinks and see which libbaccat
 your director is actually finding.

 --
 Dimitri Maziuk
 Programmer/sysadmin
 BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy


 That's fine b/c it's in
  libbaccats-7.0.5.so = /usr/lib64/libbaccats-7.0.5.so
  (0x2aeee000)


You could ldd libbaccats just to double-check.
 Hmm. I don't use mysql so about the only other thing I can think of is
 lower_case_table_names or whatever it's called in my.cnf (that's one of
 the reasons I don't do mysql). No idea if it matters to bacula though.
 :(



Hmmm...ok well if I do a ldd on that libcats file I see no mysql support is
listed:


[root@ops:/etc/bacula] #ldd /usr/lib64/libbaccats-7.0.5.so
libsqlite3.so.0 = /usr/lib64/libsqlite3.so.0 (0x2acbe000)
libstdc++.so.6 = /usr/lib64/libstdc++.so.6 (0x2af19000)
libm.so.6 = /lib64/libm.so.6 (0x2b219000)
libc.so.6 = /lib64/libc.so.6 (0x2b49d000)
libgcc_s.so.1 = /lib64/libgcc_s.so.1 (0x2b7f6000)
libpthread.so.0 = /lib64/libpthread.so.0 (0x2ba04000)
/lib64/ld-linux-x86-64.so.2 (0x4000)


So is the issue that we need to get libcats to support mysql? If so how do
we do that?

Thanks
Tim

On Fri, Mar 27, 2015 at 2:10 PM, Dimitri Maziuk dmaz...@bmrb.wisc.edu
wrote:

 On 03/27/2015 12:56 PM, Tim Dunphy wrote:

  /usr/share/doc/bacula-.../quickstart_mysql.txt
 
 
  Yep!
  And after taking those steps, I still find find no MySQL  support in the
  bacula-dir binary!!

 That's fine b/c it's in

  libbaccats-7.0.5.so = /usr/lib64/libbaccats-7.0.5.so
  (0x2aeee000)

 You could ldd libbaccats just to double-check.

 Hmm. I don't use mysql so about the only other thing I can think of is
 lower_case_table_names or whatever it's called in my.cnf (that's one of
 the reasons I don't do mysql). No idea if it matters to bacula though.
 :(
 --
 Dimitri Maziuk
 Programmer/sysadmin
 BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy

 What the fine manual sez, literally:
 alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so
 You might want to --remove libbaccats-mysql-7.0.5.so while you're at it.
 The long story is /usr/lib[64]/libfoo.so is a symlink to
 /etc/alternatives/libfoo.so which is a symlink to
 /someplace/libactual.so which is usually a symlink to something else
 like /someplace/libactual-1.2.3.so.
 So from the above the command line you're supposed to use is obviously
 --set libfoo.so /someplace/libactual.so -- how could you not see that
 plain as day./sarcasm


OK! Well sarcasm perhaps deserved. But that is what I tried initially.
Literally what was in the mysql quickstart, at first. But when that didn't
work is when I tried using  libbaccats-mysql-7.0.5.so.

At any rate, I used alternatives to remove what I had done with
libbaccats-mysql-7.0.5.so and then ran the original command again:

[root@ops:/etc/bacula] #alternatives --set libbaccats.so
/usr/lib64/libbaccats-mysql.so

Which has always worked for me in the past. But for this time it's not.
Wish I knew why. :)

I'm still running into this problem whenever I try to start the director

[root@ops:/etc/bacula] #service bacula-dir start
Starting bacula-dir:   [  OK  ]
[root@ops:/etc/bacula] #service bacula-dir status
bacula-dir dead but subsys locked

Even after running that command.

I am not huge fan of alternatives but I think that you are not using it
 properly in this case. I believe the command might look like this:
  alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so
 In order to check the mysql support you might use the command from
 previous post (while you were doing debugging). For example:
   bacula-dir -c /etc/bacula/bacula-dir.conf -f -d 200
 In the last 25 lines you should see whether mysql.c is mentioned or not.
 If you see mysq.c lines following the dir_plugins.c lines then you
 can be sure that your bacula-dir now supports mysql.



Ok I tried running that debug command again. And I'm still not seeing any
mention of mysql in the output.

[root@ops:/etc/bacula] #bacula-dir -c /etc/bacula/bacula-dir.conf -f -d 200
bacula-dir: dird.c:194-0 Debug level = 200
bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
bacula-dir: runscript.c:284-0 runscript: debug
bacula-dir: runscript.c:285-0  -- RunScript
bacula-dir: runscript.c:286-0   -- Command=/etc/bacula/
make_catalog_backup.pl JokefireCatalog
bacula-dir: runscript.c:287-0   -- Target=
bacula-dir: runscript.c:288-0   -- RunOnSuccess=1
bacula-dir: runscript.c:289-0   -- RunOnFailure=0
bacula-dir: runscript.c:290-0   -- FailJobOnError=1
bacula-dir: runscript.c:291-0   -- RunWhen=2
bacula-dir: runscript.c:284-0 runscript: debug
bacula-dir: runscript.c:285-0  -- RunScript
bacula-dir: runscript.c:286-0   --
Command=/etc/bacula/delete_catalog_backup
bacula-dir: runscript.c:287-0   -- Target=
bacula-dir: runscript.c:288-0   -- RunOnSuccess=1
bacula-dir: runscript.c:289-0   -- RunOnFailure=0
bacula-dir: runscript.c:290-0   -- FailJobOnError=1
bacula-dir: runscript.c:291-0   -- RunWhen=1
bacula-dir: jcr.c:128-0 read_last_jobs seek to 192
bacula-dir: jcr.c:135-0 Read num_items=10
bacula-dir: dir_plugins.c:148-0 Load dir plugins
bacula-dir: dir_plugins.c:150-0 No dir plugin dir!
bacula-dir: dird.c:972-0 Could not open Catalog JokefireCatalog, database
bacula.
bacula-dir: dird.c:977-0 Query failed: SELECT VersionId FROM Version:
ERR=no such table: Version
27-Mar 17:50 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf


These are the binaries I have installed:

[root@ops:/etc/yum.repos.d] #rpm -qa | grep bacula
bacula-client-7.0.5-1.el5.x86_64
bacula-storage-7.0.5-1.el5.x86_64
bacula-director-7.0.5-1.el5.x86_64
bacula-libs-sql-7.0.5-1.el5.x86_64
bacula-libs-7.0.5-1.el5.x86_64
bacula-console-7.0.5-1.el5.x86_64
bacula-common-7.0.5-1.el5.x86_64

And those are from the slaanesh-Bacula repository.

I'm still thinking that my bacula director is just not supporting mysql.

I would think by this message I'm getting when trying to install bacula
mysql:

Package bacula-director-mysql is obsoleted by bacula-director, trying to
install bacula-director-7.0.5-1.el5.x86_64 instead
Package bacula-director-7.0.5-1.el5.x86_64 already installed and latest
version
Nothing to do

That the new bacula director would support mysql.

But that doesn't appear to be the case. That alternatives command is pretty
straight forward and usually works. Not really sure why it's not working
this time around.

I hope I can get to the bottom of this. I'll keep digging. And I appreciate
all your responses, and any help offered.

Thanks
Tim

On Fri, Mar 27, 2015 at 5:25 PM, Josip Deanovic djosip+n...@linuxpages.net
wrote:

 Quoting message written on Friday 2015-03-27 16:16:53:
  I tried setting the alternatives this way:
 
  [root@ops:/etc/bacula] #alternatives --set libbaccats-mysql-7.0.5.so
   /usr/lib64/libbaccats-mysql.so
 
  So I guess I'm still not 

Re: [Bacula-users] director won't start

2015-03-27 Thread Tim Dunphy
Hey Josip,

 FINALLY we have success!

[root@ops:/etc/bacula] #service bacula-dir start
Starting bacula-dir:   [  OK  ]


[root@ops:/etc/bacula] #service bacula-dir status
bacula-dir (pid 3547) is running...

And the test results are good:

[root@ops:/etc/bacula] #bacula-dir -c /etc/bacula/bacula-dir.conf -f -d 200
bacula-dir: dird.c:194-0 Debug level = 200
bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
bacula-dir: runscript.c:284-0 runscript: debug
bacula-dir: runscript.c:285-0  -- RunScript
bacula-dir: runscript.c:286-0   -- Command=/usr/libexec/bacula/
make_catalog_backup.pl MyCatalog
bacula-dir: runscript.c:287-0   -- Target=
bacula-dir: runscript.c:288-0   -- RunOnSuccess=1
bacula-dir: runscript.c:289-0   -- RunOnFailure=0
bacula-dir: runscript.c:290-0   -- FailJobOnError=1
bacula-dir: runscript.c:291-0   -- RunWhen=2
bacula-dir: runscript.c:284-0 runscript: debug
bacula-dir: runscript.c:285-0  -- RunScript
bacula-dir: runscript.c:286-0   --
Command=/usr/libexec/bacula/delete_catalog_backup
bacula-dir: runscript.c:287-0   -- Target=
bacula-dir: runscript.c:288-0   -- RunOnSuccess=1
bacula-dir: runscript.c:289-0   -- RunOnFailure=0
bacula-dir: runscript.c:290-0   -- FailJobOnError=1
bacula-dir: runscript.c:291-0   -- RunWhen=1
27-Mar 19:31 bacula-dir: ERROR TERMINATION at bsys.c:556
bacula-dir is already running. pid=4090
Check file /var/run/bacula-dir.9101.pid

And I can connect to the console!!

[root@ops:/etc/bacula] #bconsole
Connecting to Director localhost:9101
1000 OK: 1 bacula-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*

And even tried it out on my own config and all was right with the world:

[root@ops:~] #bconsole
Connecting to Director ops.jokefire.com:9101
1000 OK: 1 ops.jokefire.com Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*st dir
ops.jokefire.com Version: 7.0.5 (28 July 2014) x86_64-redhat-linux-gnu
redhat Enterprise release
Daemon started 27-Mar-15 19:36. Jobs: run=0, running=0 mode=0,0
 Heap: heap=679,936 smbytes=270,726 max_bytes=271,793 bufs=245 max_bufs=254

Scheduled Jobs:
Level  Type Pri  Scheduled  Job Name   Volume
===
IncrementalBackup10  28-Mar-15 03:05ops.jokefire.com   *unknown*
IncrementalBackup10  28-Mar-15 03:05web1.jokefire.com  *unknown*
Full   Backup11  28-Mar-15 03:10Jokefire BackupCatalog
*unknown*


Running Jobs:
Console connected at 27-Mar-15 19:41
No Jobs running.


Terminated Jobs:
 JobId  LevelFiles  Bytes   Status   FinishedName

   716  Incr 63,2081.543 G  OK   28-Sep-13 14:47
beta.jokefire.com
   717  Incr114259.7 M  OK   28-Sep-13 14:50
mail.jokefire.com
   718  Incr114259.7 M  OK   28-Sep-13 14:51
mail.jokefire.com
   719  Incr142335.8 M  OK   28-Sep-13 14:52
chef.jokefire.com
   720  Full  1257.6 M  OK   28-Sep-13 14:53
Jokefire_BackupCatalog
   721  Diff  3,4011.800 G  OK   29-Sep-13 03:09
cloud.jokefire.com
   722  Diff150,7087.741 G  OK   29-Sep-13 03:59
beta.jokefire.com
   723  Diff 20,4271.108 G  OK   29-Sep-13 04:09
mail.jokefire.com
   724  Diff 44,2171.282 G  OK   29-Sep-13 04:42
chef.jokefire.com
   725  Full  1264.4 M  OK   29-Sep-13 04:44
Jokefire_BackupCatalog


*


One thing I neglected to mention was that my backup tapes were at all
points fine and not affected by the incident that had wrecked my bacula
system. So it looks like I'm good to go!

The bacula community is absolutely phenomenal and a pleasure to deal with.
As always!!

Thanks so much for everyone's help!

Tim

On Fri, Mar 27, 2015 at 6:28 PM, Josip Deanovic djosip+n...@linuxpages.net
wrote:

 Quoting message written on Friday 2015-03-27 17:55:52:
  These are the binaries I have installed:
 
  [root@ops:/etc/yum.repos.d] #rpm -qa | grep bacula
  bacula-client-7.0.5-1.el5.x86_64
  bacula-storage-7.0.5-1.el5.x86_64
  bacula-director-7.0.5-1.el5.x86_64
  bacula-libs-sql-7.0.5-1.el5.x86_64
  bacula-libs-7.0.5-1.el5.x86_64
  bacula-console-7.0.5-1.el5.x86_64
  bacula-common-7.0.5-1.el5.x86_64
 
  And those are from the slaanesh-Bacula repository.
 
  I'm still thinking that my bacula director is just not supporting mysql.
 
  I would think by this message I'm getting when trying to install bacula
  mysql:
 
  Package bacula-director-mysql is obsoleted by bacula-director, trying to
  install bacula-director-7.0.5-1.el5.x86_64 instead
  Package bacula-director-7.0.5-1.el5.x86_64 already installed and latest
  version
  Nothing to do
 
  That the new bacula director would support mysql.
 
  But that doesn't appear to be the case. That alternatives command is
  pretty straight forward and usually works. Not really 

Re: [Bacula-users] director won't start

2015-03-26 Thread Tim Dunphy
Hey Alan,

Just on the offchance, try service bacula-dir stop and then start it.


Nah, sorry. That didn't work. The bacula director definitely is not
running...

[root@ops:~] #lsof -i :9101
[root@ops:~] #

[root@ops:~] #netstat -tulpn | grep -i listen | grep bacula
tcp0  0 0.0.0.0:91020.0.0.0:*
LISTEN  12915/bacula-fd
tcp0  0 0.0.0.0:91030.0.0.0:*
LISTEN  26664/bacula-sd

[root@ops:~] #ps -ef | grep bacula | grep -v grep
root 12915 1  0 Mar26 ?00:00:00 bacula-fd -c
/etc/bacula/bacula-fd.conf -u root -g root
bacula   26664 1  0 00:20 ?00:00:00 bacula-sd -c
/etc/bacula/bacula-sd.conf -u bacula -g disk

So stopping it and starting it doesn't have any effect:

[root@ops:~] #service bacula-dir stop
[root@ops:~] #service bacula-dir start
Starting bacula-dir:   [  OK  ]
[root@ops:~] #service bacula-dir status
bacula-dir dead but subsys locked

I appreciate the input tho!

On Thu, Mar 26, 2015 at 9:00 PM, Alan Brown a.br...@ucl.ac.uk wrote:

  On 26/03/15 20:07, Tim Dunphy wrote:

 Hey all,
 [root@ops:~] #service bacula-dir start
 Starting bacula-dir:   [  OK  ]

  But when you check the status of it, you can see that it's not running.

  [root@ops:~] #service bacula-dir status
 bacula-dir dead but subsys locked


 Just on the offchance, try service bacula-dir stop and then start it.





-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] director won't start

2015-03-26 Thread Tim Dunphy
Hi Josip,


 Your config file seems ok to me except that you have omitted the
 first line of the config file which probably looks like Director {


I accidentally sent this to only Josip. Now including the list. Sorry
dudes!

Hmm.. ok. Well that may have been a copy/paste error on my part. Here is
the top of my config, just so we all know. :)

Director {# define myself
  Name = ops.jokefire.com
  DIRport = 9101# where we listen for UA connections
  QueryFile = /etc/bacula/query.sql
  WorkingDirectory = /var/spool/bacula
  PidDirectory = /var/run
  Maximum Concurrent Jobs = 1
  Password = secret # Console password
  Messages = Daemon
  TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt
  TLS Key = /etc/pki/tls/private/ops.jokefire.com.key
  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
  TLS Enable = yes
  TLS Require = yes
}



 If you are sure that you can manually connect to the mysql using
 the same connection data and the same environment (e.g. the same user
 used for running bacula-dir daemon) and you are sure that there is
 no some kind of restriction or security in place (e.g. selinux)
 than in my opinion it could only be setup of the bacula database
 in the mysql.


Ok. And yeah, I'm not using SELinux at the moment. Although I will want to
enable it again eventually once I get this host back into shape!

[root@ops:/etc/bacula] #getenforce
Disabled



 Have you performed a major bacula upgrade recently or some kind
 of database restore?


Uhmm... yeah. Unfortunately the old database was lost during the
'incident'. That's part of the challenge of this situation. So yeah I had
to recreate the database. Lets just say I fumble fingered a delete (rm)
command!!! :'(



 You have mentioned the unfortunate incident.
 If you had to recreate the bacula database make sure that you
 (or your puppet configuration) perform commands used for
 creation of the bacula database and setting appropriate
 privileges.

 That would be:
 create_mysql_database
 make_mysql_tables
 grant_mysql_privileges


So, just to be thorough, I dropped the database again and ran these
commands again!

[root@ops:/etc/bacula] #./create_mysql_database
Creation of bacula database succeeded.

[root@ops:/etc/bacula] #./make_mysql_tables
Creation of Bacula MySQL tables succeeded.

[root@ops:/etc/bacula] #./grant_mysql_privileges

Privileges for user bacula granted on database bacula.

And went to start the director again!

[root@ops:~] #service bacula-dir start
Starting bacula-dir:   [  OK  ]

Checked to see if it was running:

[root@ops:~] #service bacula-dir status
bacula-dir dead but subsys locked

Hmmm... NOPE!!

And checked the log file:

[root@ops:~] #tail /var/log/bacula/bacula.log
27-Mar 00:14 bacula-dir JobId 0: Fatal error: Query failed: SELECT
VersionId FROM Version: ERR=no such table: Version
27-Mar 00:14 bacula-dir JobId 0: Fatal error: Could not open Catalog
JokefireCatalog, database bacula.
27-Mar 00:14 bacula-dir JobId 0: Fatal error: Query failed: SELECT
VersionId FROM Version: ERR=no such table: Version
27-Mar 00:14 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf
You have new mail in /var/spool/mail/root

And saw the same exact entries. I'm enclosing my entire director config as
an attachment. Just in case that helps troubleshoot the problem

Thank you all for your help! This community is simply tremendous!

On Fri, Mar 27, 2015 at 12:18 AM, Tim Dunphy bluethu...@gmail.com wrote:

 Hi Josip,


 Your config file seems ok to me except that you have omitted the
 first line of the config file which probably looks like Director {


 Hmm.. ok. Well that may have been a copy/paste error on m part. Here is
 the top of my config, just so we all know. :)

 Director {# define myself
   Name = ops.jokefire.com
   DIRport = 9101# where we listen for UA connections
   QueryFile = /etc/bacula/query.sql
   WorkingDirectory = /var/spool/bacula
   PidDirectory = /var/run
   Maximum Concurrent Jobs = 1
   Password = Duk30fZh0u # Console password
   Messages = Daemon
   TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt
   TLS Key = /etc/pki/tls/private/ops.jokefire.com.key
   TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
   TLS Enable = yes
   TLS Require = yes
 }



 If you are sure that you can manually connect to the mysql using
 the same connection data and the same environment (e.g. the same user
 used for running bacula-dir daemon) and you are sure that there is
 no some kind of restriction or security in place (e.g. selinux)
 than in my opinion it could only be setup of the bacula database
 in the mysql.


 Ok. And yeah, I'm not using SELinux at the moment. Although I will want to
 enable it again eventually once I get this host back into shape!

 [root@ops:/etc/bacula] #getenforce
 Disabled



 Have you performed a major

[Bacula-users] director won't start

2015-03-26 Thread Tim Dunphy
Hey all,

 Ok, well I had an unfortunate incident where I had to rebuild my bacula
server. Fortunately I have the entire bacula config puppeted. So I was able
to restore config files that I was using when the server was running fine.

However, even tho that's the case, I am not able to get the bacula director
started.

At first it seems to start up ok:

[root@ops:~] #service bacula-dir start
Starting bacula-dir:   [  OK  ]

But when you check the status of it, you can see that it's not running.

[root@ops:~] #service bacula-dir status
bacula-dir dead but subsys locked

Checking the bacula log, I see the following output:

[root@ops:~] #tail /var/log/bacula/bacula.log
26-Mar 15:57 bacula-dir JobId 0: Fatal error: Query failed: SELECT
VersionId FROM Version: ERR=no such table: Version
26-Mar 15:57 bacula-dir JobId 0: Fatal error: Could not open Catalog
JokefireCatalog, database bacula.
26-Mar 15:57 bacula-dir JobId 0: Fatal error: Query failed: SELECT
VersionId FROM Version: ERR=no such table: Version
26-Mar 15:57 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

Here, it's complaining that it can't do a select from the database. But
when I go into the DB myself, I can see it works just fine:

mysql use bacula
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql SELECT VersionId FROM Version;
+---+
| VersionId |
+---+
|14 |
+---+
1 row in set (0.00 sec)

And I'm not sure what this error means or how to correct it:

26-Mar 15:57 bacula-dir JobId 0: Fatal error: Could not open Catalog
JokefireCatalog, database bacula.

And this error seems to be complaining about my bacula director
configuration:

26-Mar 16:00 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf


Here's my director config in case anyone can spot something wrong in here:

[root@ops:/etc/bacula] #grep -v '#' bacula-dir.conf

  Name = ops.jokefire.com

  QueryFile = /etc/bacula/query.sql

  WorkingDirectory = /var/spool/bacula

  PidDirectory = /var/run

  Maximum Concurrent Jobs = 1

  Messages = Daemon

  TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/ops.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


JobDefs {

  Name = DefaultJob

  Type = Backup

  Level = Incremental

  Client = ops.jokefire.com

  FileSet = Full Set

  Schedule = WeeklyCycle

  Storage = File

  Messages = Standard

  Pool = Default

  Priority = 10

  Write Bootstrap = /var/spool/bacula/%c.bsr

}


Job {

  Name = ops.jokefire.com

  Type = Backup

  Client = ops.jokefire.com

  FileSet = Full Set

  Schedule = WeeklyCycle

  Storage = File

  Messages = Standard

  Pool = Default

  Write Bootstrap = /var/spool/bacula/%c.bsr

}


Job {

  Name = web1.jokefire.com

  Type = Backup

  Client = web1.jokefire.com

  FileSet = Full Set

  Schedule = WeeklyCycle

  Storage = File

  Messages = Standard

  Pool = Default

  Write Bootstrap = /var/spool/bacula/%c.bsr

}


Job {

  Name = Jokefire BackupCatalog

  JobDefs = DefaultJob

  Level = Full

  FileSet=JokefireCatalog

  Schedule = WeeklyCycleAfterBackup

  RunBeforeJob = /etc/bacula/make_catalog_backup.pl JokefireCatalog

  RunAfterJob  = /etc/bacula/delete_catalog_backup

  Write Bootstrap = /var/bacula/%n.bsr

}


Job {

  Name = RestoreFiles

  Type = Restore

  Client=ops.jokefire.com

  FileSet=Full Set

  Storage = File

  Pool = Default

  Messages = Standard

  Where = /backup/tapes/bacula-restores

}


FileSet {

  Name = Full Set

  Include {

Options {

  signature = MD5

}

File = /

  }


  Exclude {

File = /var/bacula

File = /proc

File = /tmp

File = /.journal

File = /.fsck

File = /backup

  }

}


Schedule {

  Name = WeeklyCycle

  Run = Full 1st sun at 03:05

  Run = Differential 2nd-5th sun at 03:05

  Run = Incremental mon-sat at 03:05

}


Schedule {

  Name = WeeklyCycleFullBackup

  Run = Full sun-sat at 02:10

}


Schedule {

  Name = WeeklyCycleAfterBackup

  Run = Full sun-sat at 03:10

}


FileSet {

  Name = JokefireCatalog

  Include {

Options {

  signature = MD5

}

File = /var/bacula/bacula.sql

  }

}


Client {

  Name = ops.jokefire.com

  Address = ops.jokefire.com

  FDPort = 9102

  Catalog = JokefireCatalog

  TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/ops.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


Client {

   Name = web1.jokefire.com

   Address = web1.jokefire.com

   FDPort = 9102

   Catalog = JokefireCatalog

   TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt

   TLS Key = /etc/pki/tls/private/ops.jokefire.com.key

   TLS CA 

[Bacula-users] can't start bacula-fd on a CentOS 7 host

2015-03-01 Thread Tim Dunphy
Hey guys,

OK I was able to get bacula-client version 7 installed on a CentOS 7
machine.

[root@web1:~/certs] #rpm -qa | grep bacula
bacula-libs-7.0.5-1.el7.x86_64
bacula-common-7.0.5-1.el7.x86_64
bacula-client-7.0.5-1.el7.x86_64

But the service fails to start:

[root@web1:~/certs] #service bacula-fd status -l
Redirecting to /bin/systemctl status  -l bacula-fd.service
bacula-fd.service - Bacula-FileDaemon, a Backup-client
   Loaded: loaded (/usr/lib/systemd/system/bacula-fd.service; disabled)
   Active: failed (Result: start-limit) since Sun 2015-03-01 19:59:57 EST;
2min 11s ago
 Docs: man:bacula-fd(8)
  Process: 28324 ExecStart=/usr/sbin/bacula-fd -f $OPTS -c $CONFIG -u
$FD_USER -g $FD_GROUP (code=exited, status=1/FAILURE)
 Main PID: 28324 (code=exited, status=1/FAILURE)

Mar 01 19:59:57 web1 systemd[1]: bacula-fd.service: main process exited,
code=exited, status=1/FAILURE
Mar 01 19:59:57 web1 systemd[1]: Unit bacula-fd.service entered failed
state.
Mar 01 19:59:57 web1 systemd[1]: bacula-fd.service holdoff time over,
scheduling restart.
Mar 01 19:59:57 web1 systemd[1]: Stopping Bacula-FileDaemon, a
Backup-client...
Mar 01 19:59:57 web1 systemd[1]: Starting Bacula-FileDaemon, a
Backup-client...
Mar 01 19:59:57 web1 systemd[1]: bacula-fd.service start request repeated
too quickly, refusing to start.
Mar 01 19:59:57 web1 systemd[1]: Failed to start Bacula-FileDaemon, a
Backup-client.
Mar 01 19:59:57 web1 systemd[1]: Unit bacula-fd.service entered failed
state.


Here's my bacula-fd config:

[root@web1:~/certs] #cat /etc/bacula/bacula-fd.conf
#
# Default  Bacula File Daemon Configuration file
#
#  For Bacula release 5.2.13 (19 February 2013) -- redhat
#
# There is not much to change here except perhaps the
# File daemon Name to
#

#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = ops.jokefire.com
  Password = Duk30fZh0u
  TLS Certificate = /etc/pki/tls/certs/web1.jokefire.com.crt
  TLS Key = /etc/pki/tls/private/web1.jokefire.com.key
  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
  TLS Enable = yes
  TLS Require = yes
}

#
# Global File daemon configuration specifications
#
FileDaemon {  # this is me
  Name = web1.jokefire.com
  FDport = 9102  # where we listen for the director
  WorkingDirectory = /var/bacula
  Pid Directory = /var/run
  Maximum Concurrent Jobs = 20
  TLS Certificate = /etc/pki/tls/certs/web1.jokefire.com.crt
  TLS Key = /etc/pki/tls/private/web1.jokefire.com.key
  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt
  TLS Enable = yes
  TLS Require = yes
}

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

And here are my certs and how they're permissioned:

-r 1 root   root   2212 Feb 13 18:24 /etc/pki/CA/certs/ca.crt
-r 1 bacula bacula 1428 Mar  1 19:58
/etc/pki/tls/certs/web1.jokefire.com.crt
-r 1 bacula bacula  891 Mar  1 19:58
/etc/pki/tls/private/web1.jokefire.com.key

I'd appreciate any advice you guys can give on how to troubleshoot this. I
am not at all familiar with CentOS 7 just yet. It seems they do things a
little differently on this latest version of the OS.

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] can't start bacula-fd on a CentOS 7 host

2015-03-01 Thread Tim Dunphy
:
d5:55:d9:69:18:aa:a9:49:8b:5e:e4:21:20:e3:70:
a6:2f:8a:10:d1:35:14:89:b7:18:4c:41:99:46:03:
c2:0f:bc:4f:d6:72:88:67:37:16:87:9b:42:17:87:
8c:52:e3:25:dd:23:32:dd:8f:b9:0a:0c:43:af:76:
b6:21:e4:a0:8d:24:6b:a0:5e:34:04:c2:a3:df:02:
0f:48:55:a0:a7:45:db:91:7a:b8:36:c7:29:a3:2f:
de:c8:98:da:37:28:f4:82:48:91:11:e0:be:14:59:
6c:44:c3
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
CB:7E:8F:08:AE:1B:85:41:3B:AD:C5:65:AA:AA:75:9D:21:C0:4E:F2
X509v3 Authority Key Identifier:

keyid:CB:7E:8F:08:AE:1B:85:41:3B:AD:C5:65:AA:AA:75:9D:21:C0:4E:F2
DirName:/C=US/ST=NJ/L=Newark/O=Jokefire LLC/OU=Ops/CN=
ops.jokefire.com CA
serial:82:13:98:F3:97:D5:70:10

X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha1WithRSAEncryption
 67:48:08:af:8c:c3:15:95:27:91:a0:5a:c8:45:76:0a:d9:c5:
 85:32:eb:53:39:76:3c:4d:38:19:56:2c:0c:4b:e1:02:11:f1:
 ad:98:7f:ab:41:5b:30:10:77:1f:f9:15:84:88:11:45:13:d6:
 54:b5:a5:e2:e3:a8:f7:2a:a9:38:57:4d:e4:e8:4b:89:73:81:
 2c:fe:15:0a:2a:5e:5e:53:20:79:d4:4f:84:74:ef:e2:1e:30:
 a7:6d:e6:44:9f:cc:a7:9d:d6:a0:0d:6c:4a:53:53:55:17:c0:
 c4:f6:34:d5:c6:33:f4:79:30:b9:45:0c:2c:af:72:56:2e:98:
 fc:7c:2a:b3:bc:9a:be:7d:af:de:a5:49:9b:73:c5:bb:2a:53:
 c5:b4:5a:08:98:a4:01:41:3a:d8:47:9a:f7:8f:7c:ad:64:ad:
 65:1b:05:19:9c:a5:9e:49:f3:56:b2:d4:17:ac:e1:3c:a9:95:
 d4:04:6c:e8:f8:b7:2b:b0:5b:a4:e9:c6:1f:83:97:8c:27:34:
 7d:23:3e:fa:ff:9b:77:81:48:5f:14:95:b8:c5:79:77:96:0d:
 2c:ab:c7:67:59:f9:fc:ad:d7:97:f3:38:0e:1b:01:18:9f:7e:
 c9:d7:f5:27:2c:95:a8:d2:8b:c2:87:86:dc:b7:bd:b5:08:ba:
 5e:a0:12:c9:9c:b7:2f:a9:23:45:d8:39:ca:72:a9:34:06:59:
 23:08:09:b4:ec:4c:68:78:24:ea:97:fa:44:37:d9:a9:b6:9c:
 b7:44:21:0d:7a:0a:4b:d7:f0:90:3b:f5:f0:64:84:27:1d:f9:
 85:28:2e:a5:c0:06:33:db:93:39:b3:bd:c1:90:bb:aa:79:bd:
 51:26:5e:63:41:d4:aa:b8:22:0d:ed:04:ff:9e:65:40:8c:98:
 d5:1d:88:35:81:5e:7a:9a:f6:df:08:c9:dd:12:0a:4d:af:94:
 9b:7a:fe:49:00:6a:98:ce:e3:5f:50:56:77:4e:33:a8:2c:7c:
 59:76:74:60:12:a2:db:ef:cf:be:41:8f:27:67:74:e5:5b:d0:
 02:5c:a3:9c:5f:59:dd:ef:95:38:5e:2d:b5:2f:ca:06:b6:b4:
 49:8e:bc:be:65:08:07:39:5d:3b:f6:11:9e:50:ce:c5:38:c8:
 c6:ae:63:b6:48:28:52:8c:46:7a:34:8c:40:8a:41:35:d9:44:
 0b:ba:3c:6e:03:22:68:4a:1a:08:95:40:90:f2:a2:c8:70:99:
 a2:5c:28:38:5b:51:45:db:5f:a3:ec:ae:9e:7e:62:87:6e:2e:
 53:c0:9a:de:c7:9c:a3:f1:11:f2:82:a1:9d:67:1f:ba:7d:ed:
 47:19:ec:ce:1a:a5:82:88

I was hoping someone might have some other thoughts on how to get this
working.

Thanks!
Tim

On Sun, Mar 1, 2015 at 8:50 PM, Ana Emília M. Arruda emiliaarr...@gmail.com
 wrote:

 Hi Tim!

 Have you confirmed that your WorkingDirectory = /var/bacula exists?

 Best regards,
 Ana

 On Sun, Mar 1, 2015 at 10:04 PM, Tim Dunphy bluethu...@gmail.com wrote:

 Hey guys,

 OK I was able to get bacula-client version 7 installed on a CentOS 7
 machine.

 [root@web1:~/certs] #rpm -qa | grep bacula
 bacula-libs-7.0.5-1.el7.x86_64
 bacula-common-7.0.5-1.el7.x86_64
 bacula-client-7.0.5-1.el7.x86_64

 But the service fails to start:

 [root@web1:~/certs] #service bacula-fd status -l
 Redirecting to /bin/systemctl status  -l bacula-fd.service
 bacula-fd.service - Bacula-FileDaemon, a Backup-client
Loaded: loaded (/usr/lib/systemd/system/bacula-fd.service; disabled)
Active: failed (Result: start-limit) since Sun 2015-03-01 19:59:57
 EST; 2min 11s ago
  Docs: man:bacula-fd(8)
   Process: 28324 ExecStart=/usr/sbin/bacula-fd -f $OPTS -c $CONFIG -u
 $FD_USER -g $FD_GROUP (code=exited, status=1/FAILURE)
  Main PID: 28324 (code=exited, status=1/FAILURE)

 Mar 01 19:59:57 web1 systemd[1]: bacula-fd.service: main process exited,
 code=exited, status=1/FAILURE
 Mar 01 19:59:57 web1 systemd[1]: Unit bacula-fd.service entered failed
 state.
 Mar 01 19:59:57 web1 systemd[1]: bacula-fd.service holdoff time over,
 scheduling restart.
 Mar 01 19:59:57 web1 systemd[1]: Stopping Bacula-FileDaemon, a
 Backup-client...
 Mar 01 19:59:57 web1 systemd[1]: Starting Bacula-FileDaemon, a
 Backup-client...
 Mar 01 19:59:57 web1 systemd[1]: bacula-fd.service start request repeated
 too quickly, refusing to start.
 Mar 01 19:59:57 web1 systemd[1]: Failed to start Bacula-FileDaemon, a
 Backup-client.
 Mar 01 19:59:57 web1 systemd[1]: Unit bacula-fd.service entered failed
 state.


 Here's my bacula-fd config:

 [root@web1:~/certs] #cat /etc/bacula/bacula-fd.conf
 #
 # Default  Bacula File Daemon Configuration file
 #
 #  For Bacula release 5.2.13 (19 February 2013) -- redhat
 #
 # There is not much to change here except perhaps the
 # File daemon Name

Re: [Bacula-users] change of hostname leads to TLS failure

2015-02-01 Thread Tim Dunphy

 I don't see web1.jokefire.com mentioned anywhere until this error.  Why
 is that?


Ok you caught me. Whoops! I was trying to obscure the real name of the
domain. That is why.

On Sun, Feb 1, 2015 at 10:41 AM, Dan Langille d...@langille.org wrote:


 On Jan 31, 2015, at 9:27 PM, Tim Dunphy bluethu...@gmail.com wrote:

 Hey all,

  I'd like to change the hostname of one of my servers that uses bacula.

   So I generated some new certs after updating the hostname in /etc/hosts:

 [root@web1:/etc/bacula] #ls -l /etc/pki/tls/* | grep web1
 -r 1 root   root  1956 Jan 31 20:34 web1.mydomain.com.crt
 -r 1 root   root   3311 Jan 31 20:34 web1.mydomain.com.key


 And updated the bacula-fd.conf file on the host:

 [root@web1:/etc/bacula] #cat bacula-fd.conf

 #

 # Default  Bacula File Daemon Configuration file

 #

 #  For Bacula release 5.2.13 (19 February 2013) -- redhat

 #

 # There is not much to change here except perhaps the

 # File daemon Name to

 #


 #

 # List Directors who are permitted to contact this File daemon

 #

 Director {

   Name = ops.mydomain.com

   Password = secret

   TLS Certificate = /etc/pki/tls/certs/web1.mydomain.com.crt

   TLS Key = /etc/pki/tls/private/web1.mydomain.com.key

   TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

   TLS Enable = yes

   TLS Require = yes

 }


 #

 # Global File daemon configuration specifications

 #

 FileDaemon {  # this is me

   Name = web1.mydomain.com

   FDport = 9102  # where we listen for the director

   WorkingDirectory = /var/bacula

   Pid Directory = /var/run

   Maximum Concurrent Jobs = 20

   TLS Certificate = /etc/pki/tls/certs/web1.mydomain.com.crt

   TLS Key = /etc/pki/tls/private/web1.mydomain.com.key

   TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

   TLS Enable = yes

   TLS Require = yes

 }


 # Send all messages except skipped files back to Director

 Messages {

   Name = Standard

   director = cloud-dir = all, !skipped, !restored

 }


 Made sure hostname -f gives me the right response:


 [root@web1:/etc/bacula] #hostname -f

 web1.mydomain.com

 But when I go to restart bacula, something odd happens:


 [root@web1:/etc/bacula] #service bacula-fd restart

 Shutting down bacula-fd:   [FAILED]

 Starting bacula-fd: 31-Jan 21:26 web1.mydomain.com: Fatal Error at
 filed.c:381 because:

 Failed to initialize TLS context for File daemon web1.jokefire.com in
 /etc/bacula/bacula-fd.conf.


 I don't see web1.jokefire.com mentioned anywhere until this error.  Why
 is that?

 31-Jan 21:26 web1.mydomain.com: ERROR in filed.c:222 Please correct
 configuration file: /etc/bacula/bacula-fd.conf

[FAILED]


 I get a TLS error. Can someone please share their ideas on how to solve
 this?


 Thanks

 Tim




 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now.
 http://goparallel.sourceforge.net/___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users


 —
 Dan Langille
 http://langille.org/








-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] change of hostname leads to TLS failure

2015-01-31 Thread Tim Dunphy
Hey all,

 I'd like to change the hostname of one of my servers that uses bacula.

  So I generated some new certs after updating the hostname in /etc/hosts:

[root@web1:/etc/bacula] #ls -l /etc/pki/tls/* | grep web1
-r 1 root   root  1956 Jan 31 20:34 web1.mydomain.com.crt
-r 1 root   root   3311 Jan 31 20:34 web1.mydomain.com.key


And updated the bacula-fd.conf file on the host:

[root@web1:/etc/bacula] #cat bacula-fd.conf

#

# Default  Bacula File Daemon Configuration file

#

#  For Bacula release 5.2.13 (19 February 2013) -- redhat

#

# There is not much to change here except perhaps the

# File daemon Name to

#


#

# List Directors who are permitted to contact this File daemon

#

Director {

  Name = ops.mydomain.com

  Password = secret

  TLS Certificate = /etc/pki/tls/certs/web1.mydomain.com.crt

  TLS Key = /etc/pki/tls/private/web1.mydomain.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


#

# Global File daemon configuration specifications

#

FileDaemon {  # this is me

  Name = web1.mydomain.com

  FDport = 9102  # where we listen for the director

  WorkingDirectory = /var/bacula

  Pid Directory = /var/run

  Maximum Concurrent Jobs = 20

  TLS Certificate = /etc/pki/tls/certs/web1.mydomain.com.crt

  TLS Key = /etc/pki/tls/private/web1.mydomain.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


# Send all messages except skipped files back to Director

Messages {

  Name = Standard

  director = cloud-dir = all, !skipped, !restored

}


Made sure hostname -f gives me the right response:


[root@web1:/etc/bacula] #hostname -f

web1.mydomain.com

But when I go to restart bacula, something odd happens:


[root@web1:/etc/bacula] #service bacula-fd restart

Shutting down bacula-fd:   [FAILED]

Starting bacula-fd: 31-Jan 21:26 web1.mydomain.com: Fatal Error at
filed.c:381 because:

Failed to initialize TLS context for File daemon web1.jokefire.com in
/etc/bacula/bacula-fd.conf.

31-Jan 21:26 web1.mydomain.com: ERROR in filed.c:222 Please correct
configuration file: /etc/bacula/bacula-fd.conf

   [FAILED]


I get a TLS error. Can someone please share their ideas on how to solve
this?


Thanks

Tim




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bconsole can't connect to director

2014-12-10 Thread Tim Dunphy
Hey all,

This just started happening recently where I can't connect to my bacula
director using the bconsole command. It just kinda kicks you out like this:

[root@ops:/etc/bacula] #bconsole
Connecting to Director ops.jokefire.com:9101
[root@ops:/etc/bacula] #

If I look at the bacula-dir service I can see that it died, which would
explain why I can't connect.

[root@ops:/etc/bacula] #service bacula-dir status
bacula-dir dead but subsys locked

Taking a look at the logs, it appears that the config is looking to connect
to a postgresql database. However I am using MySQL as the DB:

10-Dec 18:48 bacula-dir JobId 0: Fatal error: Could not open Catalog
JokefireCatalog, database bacula.
10-Dec 18:48 bacula-dir JobId 0:* Fatal error: postgresql.c:236 Unable to
connect to PostgreSQL server. Database=bacula User=root*
Possible causes: SQL server not running; password incorrect;
max_connections exceeded.
10-Dec 18:48 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

My database connection details in the directory config are as follows:

# Generic catalog service
Catalog {
  Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
  #dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306
  dbname = bacula; dbuser = root; dbpassword = secret-pass
}


And these are the bacula programs and libraries that I have installed are:

[root@ops:/etc/bacula] #rpm -qa | grep bacula
bacula-libs-sql-7.0.5-1.el5.x86_64
bacula-common-7.0.5-1.el5.x86_64
bacula-storage-7.0.5-1.el5.x86_64
bacula-libs-7.0.5-1.el5.x86_64
bacula-console-7.0.5-1.el5.x86_64
bacula-director-7.0.5-1.el5.x86_64
bacula-client-7.0.5-1.el5.x86_64

I tried uncommenting the dbd driver section of the bacula-dir.conf file and
restarted. But I got the same result.

# Generic catalog service
Catalog {
  Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306
  dbname = bacula; dbuser = root; dbpassword = secret
}

[root@ops:/etc/bacula] #service bacula-dir status
bacula-dir dead but subsys locked

I'd like to know why my bacula director is operating under the impression
that it's using a postgres database. Even when I uncomment the dbdriver
section and specify that I'm using mysql. It still seems to be thinking
it's using postgres.

How can I correct this section and get my backups on line again?

I'm using bacula 7 under centos 5.9.

Thanks!
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bacula 7 list volumes

2014-10-31 Thread Tim Dunphy
Hey guys,

 I seem to remember being able to 'list volumes' in older versions of
bconsole. But now that I'm on bacula 7 on the server it doesn't seem to
understand that command.

*list volumes;
Unknown list keyword: volumes;

And I've even dug through some bacula documentation that seems to suggest
that's a valid command. So while I have lost my mind, I don't think it's to
the extent that I'm just making up commands that I thought I could use.

Can I get some help here as to why this is happening?

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula 7 list volumes

2014-10-31 Thread Tim Dunphy
Hey guys,

Yup that was it!! The stupid semi-colon.. Sorry I don't know why I was
thinking I was at a mysql prompt. But it works now and thanks for your help!

TIm

On Fri, Oct 31, 2014 at 10:31 AM, Bill Arlofski waa-bac...@revpol.com
wrote:

 On 10/31/2014 10:19 AM, Tim Dunphy wrote:
  Hey guys,
 
   I seem to remember being able to 'list volumes' in older versions of
  bconsole. But now that I'm on bacula 7 on the server it doesn't seem to
  understand that command.
 
  *list volumes;
  Unknown list keyword: volumes;
 
  And I've even dug through some bacula documentation that seems to suggest
  that's a valid command. So while I have lost my mind, I don't think it's
 to
  the extent that I'm just making up commands that I thought I could use.
 
  Can I get some help here as to why this is happening?
 
  Thanks
  Tim

 Hi Tim

 The only reason I can think of is that you are treating the bconsole
 command
 prompt as if you were at a mysql command prompt and are appending a
 semi-colon
 to the end of the command.

 drop the semi-colon. :)

 Bill





 --
 Bill Arlofski
 Reverse Polarity, LLC
 http://www.revpol.com/
 -- Not responsible for anything below this line --


 --
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] backups failed with gethostbyname() error

2014-09-24 Thread Tim Dunphy
Hey all,

 I've just had backup fail for one of my hosts. It gives the following
error:

24-Sep 03:10 ops.mydomain.com JobId 218: Start Backup JobId 218,
Job=beta-new.mydomain.com.2014-09-24_03.05.00_03

24-Sep 03:10 ops.mydomain.com JobId 218: Using Device FileStorage to
write.

24-Sep 03:11 ops.mydomain.com JobId 218: Error: bsock.c:194 gethostbyname()
for host beta-new.mydomain.com failed: ERR=Name or service not known

24-Sep 03:13 ops.mydomain.com JobId 218: Fatal error: No Job status
returned from FD.

24-Sep 03:13 ops.mydomain.com JobId 218: Error: Bacula ops.mydomain.com
7.0.5 (28Jul14):
I'm not really sure what the problem is, cuz if I do a hostname -f on the
host that I'm having a problem with it returns the name that the bacula
server is expecting in it's bacula-dir config.


I've been having this problem for the past two days apparently. Any help or
suggestions on how I could solve this problem would be greatly appreciated!

Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] backups failed with gethostbyname() error

2014-09-24 Thread Tim Dunphy
Hey Dmitriy,

 Yes, definitely the client host is resolving well in DNS from the bacula
server.

 Take a look!

[root@ops:~] #host beta-new.mydomain.com

beta-new.mydomain.com has address 162.xx.xx.xx




[root@ops:~] #dig beta-new.mydomain.com


;  DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6  beta-new.mydomain.com

;; global options:  printcmd

;; Got answer:

;; -HEADER- opcode: QUERY, status: NOERROR, id: 35466

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0


;; QUESTION SECTION:

;beta-new.mydomain.com. IN  A


;; ANSWER SECTION:

beta-new.mydomain.com.  61  IN  A   162.xx.xx.xx


;; Query time: 1 msec

;; SERVER: 172.16.0.23#53(172.16.0.23)

;; WHEN: Wed Sep 24 12:48:16 2014

;; MSG SIZE  rcvd: 55


But as mentioned I tried putting the hostname and IP for the remote server
I want to backup into the /etc/hosts file on my bacula server. We'll see
where that gets us for tonight's run, just in case this was some kind of
DNS issue.


Thanks!

Tim

On Wed, Sep 24, 2014 at 12:37 PM, Dimitri Maziuk dmaz...@bmrb.wisc.edu
wrote:

 On 09/24/2014 10:01 AM, Tim Dunphy wrote:

  24-Sep 03:11 ops.mydomain.com JobId 218: Error: bsock.c:194
 gethostbyname()
  for host beta-new.mydomain.com failed: ERR=Name or service not known

 In case it's not clear from other posts, this looks like
 ops.mydomain.com can't resolve beta-new.mydomain.com and the check is to
 run host or dig beta-new.mydomain.com on ops.

 --
 Dimitri Maziuk
 Programmer/sysadmin
 BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



 --
 Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
 Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
 Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
 Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer

 http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] (no subject)

2014-09-16 Thread Tim Dunphy
Hey all,

My bacula 7 server and clients have been running fine for a while. Until a
couple of days ago I started getting these errors:

*15-Sep 03:05 ops.mydomain.com http://ops.mydomain.com JobId 180: Fatal
error: sql_create.c:916 Can't start batch mode: ERR=*

*15-Sep 15:30 ops.mydomain.com http://ops.mydomain.com JobId 180: Fatal
error: backup.c:1200 Network send error to SD. ERR=Broken pipe*

*15-Sep 15:30 ops.mydomain.com http://ops.mydomain.com JobId 180: Fatal
error: Network error with FD during Backup: ERR=No data available*

*15-Sep 15:30 ops.mydomain.com http://ops.mydomain.com JobId 180: Fatal
error: No Job status returned from FD.*

15-Sep 15:30 ops.mydomain.com JobId 180: Error: Bacula ops.mydomain.com
7.0.5 (28Jul14):

16-Sep 03:05 ops.mydomain.com JobId 187: No prior Full backup Job record
found.

16-Sep 03:05 ops.mydomain.com JobId 187: No prior or suitable Full backup
found in catalog. Doing FULL backup.

16-Sep 03:05 ops.mydomain.com JobId 186: Start Backup JobId 186,
Job=ops.mydomain.com.2014-09-16_03.05.04_06

16-Sep 03:05 ops.mydomain.com JobId 186: Using Device FileStorage to
write.

16-Sep 03:06 ops.mydomain.com JobId 186: Volume jf-backup-tape-0013
previously written, moving to end of data.

16-Sep 03:06 ops.mydomain.com JobId 186: Ready to append to end of Volume
jf-backup-tape-0013 size=4,993,445,193

*16-Sep 03:06 ops.mydomain.com http://ops.mydomain.com JobId 186: Fatal
error: sql_create.c:916 Can't start batch mode: ERR=*

*16-Sep 03:06 ops.mydomain.com http://ops.mydomain.com JobId 186: Fatal
error: backup.c:1325 Network send error to SD. ERR=Broken pipe*

*16-Sep 03:07 ops.mydomain.com http://ops.mydomain.com JobId 186: Fatal
error: sql_get.c:375 sql_get.c:375 query SELECT VolumeName,MAX(VolIndex)
FROM JobMedia,Media WHERE JobMedia.JobId=186 AND
JobMedia.MediaId=Media.MediaId GROUP BY VolumeName ORDER BY 2 ASC failed:*

*  Non-fatal FD erro14-Sep 13:02 ops.mydomain.com http://ops.mydomain.com
JobId 177: Error: bsock.c:432 Wrote 65540 bytes to Storage
daemon:ops.mydomain.com:9103 http://ops.mydomain.com:9103, but only 16384
accepted.*

*14-Sep 13:02 ops.mydomain.com http://ops.mydomain.com JobId 177: Fatal
error: backup.c:1200 Network send error to SD. ERR=Broken pipe*

*14-Sep 13:02 ops.mydomain.com http://ops.mydomain.com JobId 177: Fatal
error: Network error with FD during Backup: ERR=No data available*

*14-Sep 13:02 ops.mydomain.com http://ops.mydomain.com JobId 177: Fatal
error: No Job status returned from FD.*

14-Sep 13:02 ops.mydomain.com JobId 177: Error: Bacula ops.mydomain.com
7.0.5 (28Jul14):

I tried researching the issues I'm having but I'm not really sure where to
begin. Could someone out there provide some tips on how to get my backup
into a working state again?

Thanks
-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula backups failing

2014-08-24 Thread Tim Dunphy
Hey everyone! Thanks for your input. The catalog issue looks to be
resolved. The /var/bacula directory was owned by root:root. Chowning it to
bacula:bacula appears to have solved the issue.

As to the problem backing up the remote machine, I'm still not sure where
that problem lies. However that also appears to be resolved after I kicked
off a manual backup of the remote machine that succeeded. The subsequent
backup of that host occurring at 3:00 AM also was a success. I'll keep an
eye on it and see if this issue returns.




On Sat, Aug 23, 2014 at 4:07 PM, Greg Woods g...@gregandeva.net wrote:

 Maybe it's removing the existing /var/bacula/.my.cnf file and then trying
 to write a new one? What are the permissions on /var/bacula?

 --Greg





-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bacula backups failing

2014-08-23 Thread Tim Dunphy
Hi all,


Recently backup jobs started failing when I try to backup a remote client
and when I tried to back up the local client (that is the bacula server
itself). The remote client is called 'beta-new.mydomain.com' and the bacula
server is called 'ops.mydomain.com'.

This is the error that I'm getting:

*Fatal error: Network error with FD during Backup: ERR=No data available*

I also notice that the backup ran for 22 hours straight before failing.
Using st client I can connect to the host and see the backup history.Here's
the output of messages regarding the remote client:

22-Aug 03:05 ops.mydomain.com JobId 92: Start Backup JobId 92,
Job=ops.mydomain.com.2014-08-22_03.05.01_02

22-Aug 03:05 ops.mydomain.com JobId 92: Using Device FileStorage to write.

22-Aug 03:05 ops.mydomain.com JobId 92: Volume jf-backup-tape-0007
previously written, moving to end of data.

22-Aug 03:05 ops.mydomain.com Job23-Aug 01:30 ops.mydomain.com JobId 93: *Fatal
error: Network error with FD during Backup: ERR=No data available*

23-Aug 01:30 ops.mydomain.com JobId 93: Fatal error: No Job status returned
from FD.

23-Aug 01:30 ops.mydomain.com JobId 93: Error: Bacula ops.mydomain.com
7.0.4 (04Jun14):

  Build OS:   x86_64-redhat-linux-gnu redhat Enterprise release

  JobId:  93

  Job:beta-new.mydomain.com.2014-08-22_03.05.01_03

  Backup Level:   Incremental, since=2014-08-21 03:17:33

  Client: beta-new.mydomain.com 5.0.0 (26Jan10)
x86_64-redhat-linux-gnu,redhat,

  FileSet:Full Set 2014-07-28 15:06:00

  Pool:   Default (From Job resource)

  Catalog:mydomainCatalog (From Client resource)

  Storage:File (From Job resource)

  Scheduled time: 22-Aug-2014 03:05:01

  Start time: 22-Aug-2014 03:07:20

  End time:   23-Aug-2014 01:30:03

*  Elapsed time:   22 hours 22 mins 43 secs*

  Priority:   10

  FD Files Written:   0

  SD Files Written:   0

  FD Bytes Written:   0 (0 B)

  SD Bytes Written:   0 (0 B)

  Rate:   0.0 KB/s

  Software Compression:   None

  VSS:no

  Encryption: no

  Accurate:   no

  Volume name(s):

  Volume Session Id:  2

  Volume Session Time:1408685405

  Last Volume Bytes:  981,274,960 (981.2 MB)

  Non-fatal FD errors:1

  SD Errors:  0

  FD termination status:  Error

  SD termination status:  Running

  Termination:*** Backup Error ***

And on my bacula server I can't seem to backup my catalog. Here's the error
I'm getting:

*23-Aug 01:30 ops.mydomain.com http://ops.mydomain.com JobId 94:
BeforeJob: Can't open /var/bacula/.my.cnf for writing  at
/etc/bacula/make_catalog_backup.pl http://make_catalog_backup.pl line 89,
FP line 10.*

These are the permissions I have on the file it's complaining about:

[root@ops:~] #ls -lh /var/bacula/.my.cnf

-rwxrwx--- 1 bacula bacula 69 Jul 25 05:08 /var/bacula/.my.cnf

And here's the output of messages:

23-Aug 01:30 ops.mydomain.com JobId 94: shell command: run BeforeJob
/etc/bacula/make_catalog_backup.pl mydomainCatalog

*23-Aug 01:30 ops.mydomain.com http://ops.mydomain.com JobId 94:
BeforeJob: Can't open /var/bacula/.my.cnf for writing  at
/etc/bacula/make_catalog_backup.pl http://make_catalog_backup.pl line 89,
FP line 10.*

23-Aug 01:30 ops.mydomain.com JobId 94: Error: Runscript: BeforeJob
returned non-zero status=13. ERR=Child exited with code 13

23-Aug 01:30 ops.mydomain.com JobId 94: Error: Bacula ops.mydomain.com
7.0.4 (04Jun14):

  Build OS:   x86_64-redhat-linux-gnu redhat Enterprise release

  JobId:  94

  Job:mydomain_BackupCatalog.2014-08-22_03.10.00_07

  Backup Level:   Full

  Client: ops.mydomain.com 7.0.4 (04Jun14)
x86_64-redhat-linux-gnu,redhat,Enterprise release

  FileSet:mydomainCatalog 2014-07-29 03:10:00

  Pool:   Default (From Job resource)

  Catalog:mydomainCatalog (From Client resource)

  Storage:File (From Job resource)

  Scheduled time: 22-Aug-2014 03:10:00

  Start time: 23-Aug-2014 01:30:06

  End time:   23-Aug-2014 01:30:06

  Elapsed time:   0 secs

  Priority:   11

  FD Files Written:   0

  SD Files Written:   0

  FD Bytes Written:   0 (0 B)

  SD Bytes Written:   0 (0 B)

  Rate:   0.0 KB/s

  Software Compression:   None

  VSS:no

  Encryption: no

  Accurate:   no

  Volume name(s):

  Volume Session Id:  0

  Volume Session Time:0

  Last Volume Bytes:  0 (0 B)

  Non-fatal FD errors:1

  SD Errors:  0

  FD termination status:

  SD termination status:

  Termination:*** Backup Error ***
I was hoping I 

Re: [Bacula-users] can't connect to director

2014-07-27 Thread Tim Dunphy
HI Bill,

 Thanks for getting back to me on this! Ok, so let's take this a step at a
time. I hope we can find a solution for this because I really need bacula
to come online again.

So, from the top. We've established that the database is there and that I
can log in as the bacula user:

[root@ops:/etc/bacula] #mysql -ubacula -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.

## redacted to save space ###

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql *use bacula*
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

*Database changed*

I tried a couple different grants for the DB user any of which should work
I would think.


mysql select User,'@',Host  from user where User=bacula;

++---+--+

| User   | @ | Host |

++---+--+

| bacula | @ | 10.122.95.91 |

| bacula | @ | localhost|

| bacula | @ | ops.mydomain.com |

++---+--+

3 rows in set (0.00 sec)


I selected only a few key elements to show that the user was there. Let me
know if you'd like to see more info.


This is what I have for DB grants:


mysql select * from db where User=bacula AND Host=localhost \G

*** 1. row ***

 Host: localhost

   Db: bacula

 User: bacula

  Select_priv: Y

  Insert_priv: Y

  Update_priv: Y

  Delete_priv: Y

  Create_priv: Y

Drop_priv: Y

   Grant_priv: N

  References_priv: Y

   Index_priv: Y

   Alter_priv: Y

Create_tmp_table_priv: Y

 Lock_tables_priv: Y

 Create_view_priv: Y

   Show_view_priv: Y

  Create_routine_priv: Y

   Alter_routine_priv: Y

 Execute_priv: Y

   Event_priv: Y

 Trigger_priv: Y

1 row in set (0.00 sec)

And the bacula tables are in the database:


mysql use bacula

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A


Database changed

mysql show tables;

+--+

| Tables_in_bacula |

+--+

| BaseFiles|

| CDImages |

| Client   |

| Device   |

| File |

| FileSet  |

| Filename |

| Job  |

| JobMedia |

| Location |

| LocationLog  |

| Log  |

| Media|

| MediaType|

| Path |

| Pool |

| Status   |

| Storage  |

| UnsavedFiles |

| Version  |

+--+

20 rows in set (0.00 sec)


The bacula director service is running:


[root@ops:/etc/bacula] #service bacula-dir status

bacula-dir (pid 2658) is running...


And it's listening on the right port:

[root@ops:/etc/bacula] #netstat -tulpn | grep -i listen | grep bacula-dir

tcp0  0 0.0.0.0:91010.0.0.0:*
LISTEN  2658/bacula-dir



After that, you will need to make sure that the password in your
 bconsole.conf
 matches the password in either bacula-dir's Director resource, or the
 password in a bacula-dir  Console resource.


And yes, I've been able to verify that the database password matches what I
have in the config.

Thanks so much for the advice. Now I just need to know where to go from
here!

Thanks
Tim



On Sun, Jul 27, 2014 at 10:45 AM, Bill Arlofski waa-bac...@revpol.com
 wrote:


 Hi Tim,


 You showed that you can log into your mysql database, and that you can load
 the bacula database, but you didn't show the output of a show tables
 command.

 You need to make sure that the tables have been created in the Bacula
 database, and that permissions have been granted to the mysql bacula user.

 # mysql -u root -pPassword mysql

  select * from user where User=bacula;

 and

  select * from db where User=bacula;

 By default, the user bacula should have all access on Db bacula from
 localhost.



 If the DB looks OK, then you need to make sure the Bacula director is
 running
 and bound to port 9101/TCP...

 # service bacula-dir status


 If the bacula-dir is running the following command should show it bound to
 port 9101/TCP:

 # netstat -tlpn

 tcp   0  0 0.0.0.0:9101  0.0.0.0:*LISTEN  15436/bacula-dir



 After that, you will need to make sure that the password in your
 bconsole.conf
 matches the password in either bacula-dir's Director resource, or the
 password in a bacula-dir  Console resource.


 Hope this helps.

 Bill




 --
 Bill Arlofski
 Reverse Polarity, LLC
 http://www.revpol.com/
 -- Not responsible for anything below this line --


 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of 

Re: [Bacula-users] can't connect to director

2014-07-27 Thread Tim Dunphy
Hi Bill,

 Yes the Password=xxx matches between bconsole.conf and bacula-dir.conf.

So not really sure why this error keeps happening!

Thanks
Tim


On Sun, Jul 27, 2014 at 12:56 PM, Bill Arlofski waa-bac...@revpol.com
wrote:

 On 07/27/14 12:24, Tim Dunphy wrote:
  HI Bill,
 
   Thanks for getting back to me on this! Ok, so let's take this a step at
 a
  time. I hope we can find a solution for this because I really need
 bacula to
  come online again.
 

 Hi Tim!

 --[snip]-- all db verifications etc...


  After that, you will need to make sure that the password in your
 bconsole.conf
  matches the password in either bacula-dir's Director resource, or
 the
  password in a bacula-dir  Console resource.
 
 
  And yes, I've been able to verify that the database password matches
 what I
  have in the config.

 This might be the issue right here...

 The bconsole.conf Password=xxx needs to match what is in the
 bacula-dir.conf
 file's Password=xxx, not the database password.

 Verify that and see if you're back on track.

 Bill




 --
 Bill Arlofski
 Reverse Polarity, LLC
 http://www.revpol.com/
 -- Not responsible for anything below this line --


 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] can't connect to director

2014-07-27 Thread Tim Dunphy
Hey thanks for the follow up!

I tried setting up this entry in my /etc/hosts file:

127.0.0.1   localhost   localhost.localdomain ops.mydomain.com

And bounced the bacula-dir daemon. Then I launched bconsole and was able to
get in! It looks like the database connection had to be made via the TCP
socket and connect via the loopback address. But whatever the reason, that
above entry in /etc/hosts solved the problem!

Thanks
Tim


On Sun, Jul 27, 2014 at 1:19 PM, Bill Arlofski waa-bac...@revpol.com
wrote:

 On 07/27/14 13:08, Tim Dunphy wrote:
  Hi Bill,
 
   Yes the Password=xxx matches between bconsole.conf and
 bacula-dir.conf.
 
  So not really sure why this error keeps happening!
 
  Thanks
  Tim

 Have you restarted the Director after making changes to the
 bacula-dir.conf file?

 Typically, after making changes to the bacula-dir.conf file, you would
 issue a
 reload command in bconsole, but we need to get you connected via bconsole
 first. :)


 OK, one other thing... I see from your original post that you are
 connecting
 to ops.mydomain.comand I see from your feedback that bacula-dir is
 listening on all IPs on your server...

 Does ops.mydomain.com resolve to an IP that your bacula server is
 configured as?


 e.g.:

 # ifconfig eth0

 and

 # dig ops.mydomain.com A

 to verify


 Bill




 --
 Bill Arlofski
 Reverse Polarity, LLC
 http://www.revpol.com/
 -- Not responsible for anything below this line --


 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] can't connect to director

2014-07-26 Thread Tim Dunphy
Hey all,

 I'm having a little trouble with my bacula setup. So I've gone back to
basics trying to get a base config going so I can build from there. So on a
fresh install of bacula on centos 5.9 I am faced with the following error:

[root@ops:/etc/bacula] #bconsole

Connecting to Director ops.mydomain.com:9101

26-Jul 23:12 bconsole JobId 0: Fatal error: bsock.c:129 Unable to connect
to Director daemon on ops.mydomain.com:9101. ERR=Interrupted system call

I can log into the database as the bacula user with the credentials set in
the config:

[root@ops:/etc/bacula] #mysql -ubacula -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 897

Server version: 5.5.38-log MySQL Community Server (GPL) by Remi


Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.


mysql use bacula

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A


Database changed


I'm hoping if I can show some configs I can get some advice on how to get
this working.

So, here's my director config
#
# Default Bacula Director Configuration file

#  For Bacula release 2.4.4 (28 December 2008) -- redhat Enterprise release


Director {# define myself
  Name = ops.mydomain.com
  DIRport = 9101# where we listen for UA connections
  QueryFile = /etc/bacula/query.sql
  WorkingDirectory = /var/spool/bacula
  PidDirectory = /var/run
  Maximum Concurrent Jobs = 1
  Password = secret # Console password
  Messages = Daemon
}

JobDefs {
  Name = DefaultJob
  Type = Backup
  Level = Incremental
  Client = ops.mydomain.com
  FileSet = Full Set
  Schedule = WeeklyCycle
  Storage = File
  Messages = Standard
  Pool = Default
  Priority = 10
}


#
# Define the main nightly save backup job
#   By default, this job will back up to disk in
Job {
  Name = Client1
  JobDefs = DefaultJob
  Write Bootstrap = /var/spool/bacula/Client1.bsr
}

#Job {
#  Name = Client2
#  Client = bacula2-fd
#  JobDefs = DefaultJob
#  Write Bootstrap = /var/spool/bacula/Client2.bsr
#}

# Backup the catalog database (after the nightly save)
Job {
  Name = BackupCatalog
  JobDefs = DefaultJob
  Level = Full
  FileSet=Catalog
  Schedule = WeeklyCycleAfterBackup
  # This creates an ASCII copy of the catalog
  # Arguments to make_catalog_backup.pl are:
  #  make_catalog_backup.pl catalog-name
  RunBeforeJob = /usr/libexec/bacula/make_catalog_backup.pl JFCatalog
  # This deletes the copy of the catalog
  RunAfterJob  = /usr/libexec/bacula/delete_catalog_backup
  Write Bootstrap = /var/spool/bacula/BackupCatalog.bsr
  Priority = 11   # run after main backup
}

#
# Standard Restore template, to be changed by Console program
#  Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
  Name = RestoreFiles
  Type = Restore
  Client= ops.mydomain.com
  FileSet=Full Set
  Storage = File
  Pool = Default
  Messages = Standard
  Where = /bacula-restores
}


# List of files to be backed up
FileSet {
  Name = Full Set
  Include {
Options {
  signature = MD5
}
#
#  Put your list of files here, preceded by 'File =', one per line
#or include an external list with:
#
#File = file-name
#
#  Note: / backs up everything on the root partition.
#if you have other partitons such as /usr or /home
#you will probably want to add them too.
#
#  This File-directive would backup your whole filesystem.
#It is disabled by default
#
File = /
  }

#
# If you backup the root directory, the following two excluded
#   files can be useful
#
  Exclude {
File = /proc
File = /tmp
File = /.journal
File = /.fsck
  }
}

#
# When to do the backups, full backup on first sunday of the month,
#  differential (i.e. incremental since full) every other sunday,
#  and incremental backups other days
Schedule {
  Name = WeeklyCycle
  Run = Full 1st sun at 23:05
  Run = Differential 2nd-5th sun at 23:05
  Run = Incremental mon-sat at 23:05
}

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
  Name = WeeklyCycleAfterBackup
  Run = Full sun-sat at 23:10
}

# This is the backup of the catalog
FileSet {
  Name = Catalog
  Include {
Options {
  signature = MD5
}
File = /var/spool/bacula/bacula.sql
  }
}

# Client (File Services) to backup
Client {
  Name = ops.mydomain.com
  Address = ops.mydomain.com
  FDPort = 9102
  Catalog = JFCatalog
  Password = secret  # password for FileDaemon
  File Retention = 30 days# 30 days
  Job Retention = 6 months# six months
  AutoPrune = yes # Prune expired Jobs/Files
}



# Definition of file storage device
Storage 

[Bacula-users] (no subject)

2014-07-13 Thread Tim Dunphy
Hey all,

 My bacula backups have been running fine for quiet a while. When suddenly
and out of the blue I am getting the following errors:

13-Jul 03:08 ops.mydomain.com JobId 55: Start Backup JobId 55,
Job=beta-new.mydomain.com.2014-07-13_03.05.22_04

13-Jul 03:09 ops.mydomain.com JobId 55: Using Device FileStorage to write.

13-Jul 03:09 ops.mydomain.com JobId 55: Volume jf-backup-tape-0007
previously written, moving to end of data.

13-Jul 03:09 ops.mydomain.com JobId 55: Ready to append to end of Volume
jf-backup-tape-0007 size=3621001889

13-Jul 03:09 ops.mydomain.com JobId 55: *Fatal error: sql_create.c:906
Can't start batch mode: ERR=*

13-Jul 07:22 ops.mydomain.com: *ERROR in authenticate.c:303 UA Hello from
client:66.249.67.25:9101 http://66.249.67.25:9101 is invalid. Len=-4*

13-Jul 13:19 ops.mydomain.com:* ERROR in authenticate.c:303 UA Hello from
client:66.249.65.142:9101 http://66.249.65.142:9101 is invalid. Len=-4*

I've googlead around a bit and found that one solution to the ERROR in
authenticate problem can be deleting the following file:

/var/lock/subsys/bacula-dir

But deleting that file from all the clients you want to backup via cron
seems like a sloppy solution to me.

Right now it seems that my backups are offline. I would definitely
appreciate any advice you folks might have!

Thanks!

Tim




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula TLS help

2013-11-29 Thread Tim Dunphy

 On 2013-11-29 18:37, Tim Dunphy wrote:
 ... (and unfortunately I feel like  I'm spinning in circles)

 Maybe you should try a different circle, like try stunnel?


Not the worst idea I've heard. Or maybe sshuttle. Still would prefer to
work out the Bacula approach, provided it doesn't cause way too many
headaches!

Tim


 Dima



On Fri, Nov 29, 2013 at 7:51 PM, Dimitri Maziuk dmaz...@bmrb.wisc.eduwrote:

 On 2013-11-29 18:37, Tim Dunphy wrote:
 ... (and unfortunately I feel like  I'm spinning in circles)

 Maybe you should try a different circle, like try stunnel?

 Dima



 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula TLS help

2013-11-28 Thread Tim Dunphy
Hi Iban,

HI Tim,
   I was pretty sure that the trouble was on the CN, could you tray to
 create the cert without the email value??
 /emailAddress=bluethu...@gmail.comhttp://storage.jokefire.com/emailAddress=bluethu...@gmail.com,
 only CN=storage.jokefire.com.

  Have you check too that these files:

   /etc/pki/tls/certs/storage.
 jokefire.com.crt
   /etc/pki/tls/private/storage.jokefire.com.key

 belongs to bacula user ?

 regards, I



I was able to recreate the cert without the email address and ensure that
the files were owned by the bacula user:

[root@storage:~/bacula-certs-new] #ls -l
/etc/pki/tls/certs/storage.jokefire.com.crt
/etc/pki/tls/private/storage.jokefire.com.key
/etc/pki/CA/certs/rootBaculaCA.pem
-rw-r--r-- 1 bacula bacula 1521 Nov 28 13:53
/etc/pki/CA/certs/rootBaculaCA.pem
-rw-r--r-- 1 bacula bacula 1224 Nov 28 13:54
/etc/pki/tls/certs/storage.jokefire.com.crt
-rw-r--r-- 1 bacula bacula 1675 Nov 28 13:54
/etc/pki/tls/private/storage.jokefire.com.key
You have mail in /var/spool/mail/root


And this is what the Subject line of the key file looks like now:

openssl x509 -in /etc/pki/tls/certs/storage.j
okefire.com.crt -noout -text

Subject: C=US, ST=XX, L=XX, O=XX, OU=XX, CN=storage.jokef
ire.com

Once again all services bounce cleanly.

However when I go into bconsole this is what I find:

[root@storage:~/bacula-certs-new] #bconsole
Connecting to Director storage.jokefire.com:9101
28-Nov 14:04 bconsole JobId 0: Error: tls.c:92 Error with certificate at
depth: 0, issuer = /C=US/ST=XX/L=XX/O=XX/OU=XX/CN=storage.jokefire.com,
subject = /C=US/ST=XX/L=XX/O=XX/OU=XX/CN=storage.jokefire.com, ERR=18:self
signed certificate
TLS negotiation failed
Director authorization problem.
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error
during the TLS handshake.
Please see
http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION0026for
help.


Passwords have not been changed from the working configs, which have been
in place and working for several months now.

Any further thoughts?

Many thanks and I hope you are enjoying your holiday!

Tim


On Thu, Nov 28, 2013 at 6:35 AM, Iban Cabrillo cabri...@ifca.unican.eswrote:

 HI Tim,
   I was pretty sure that the trouble was on the CN, could you tray to
 create the cert without the email value??
 /emailAddress=bluethu...@gmail.comhttp://storage.jokefire.com/emailAddress=bluethu...@gmail.com,
 only CN=storage.jokefire.com.

  Have you check too that these files:

   /etc/pki/tls/certs/storage.jokefire.com.crt
   /etc/pki/tls/private/storage.jokefire.com.key

 belongs to bacula user ?

 regards, I


 2013/11/28 Tim Dunphy bluethu...@gmail.com

 Hello Iban! And thank you for your reply.



   I have a similar configuration. I think that the problem is in the CN:
 CN=storage.jokefire.com/emailAddress=bluethu...@gmail.com


 please could you show the value for   DirAddress = bacula.example.org

 in my case:

   DirAddress = bacula.example.org

   TLS Enable = yes
   TLS Require = yes
   TLS Verify Peer = no
   TLS CA Certificate File = /etc/bacula/certs/ca/signing-ca-1.crt
   TLS Certificate = /etc/bacula/certs/cert/bacula.crt
   TLS Key = /etc/bacula/certs/key/bacula.key


 This is my director configuration from bacula-dir.conf


 Director {# define myself
   Name = storage.jokefire.com
   DIRport = 9101# where we listen for UA connections
   QueryFile = /etc/bacula/query.sql
   WorkingDirectory = /var/spool/bacula
   PidDirectory = /var/run
   Maximum Concurrent Jobs = 1
   Password = secret # Console password
   Messages = Daemon
   TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt
   TLS Key = /etc/pki/tls/private/storage.jokefire.com.key
   TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem
   TLS Enable = yes
   TLS Require = yes
   TLS Verify Peer = yes
 }


 I hope I got you right in that this was what you needed to know.


 Looking at the cert:

 openssl x509 -in /etc/bacula/certs/cert/bacula.crt -noout -text

 Subject: C=ES, ST=X, O=, OU=Computing Department, CN=
 bacula.example.org


 openssl x509 -in /etc/pki/tls/certs/storage.jokefire.com.crt -noout -text

   Subject: C=US, ST=X, L=, O= LLC, OU=Ops, CN=
 storage.jokefire.com/emailAddress=bluethu...@gmail.com

 [root@storage:~] #hostname -f
 storage.jokefire.com



 The CN must be the sme that DirAddress (I did not use email address for
 cert sign)



 It appears as if the DirAddress and the common name do agree. Might there
 be something else I could have missed?

 Thanks
 Tim


 On Wed, Nov 27, 2013 at 7:50 AM, Iban Cabrillo 
 cabri...@ifca.unican.eswrote:

 Hi Tim,
  I have a similar configuration. I think that the proble is in the CN:
 CN=storage.jokefire.com/emailAddress=bluethu...@gmail.com


 please could you show the value for   DirAddress = bacula.example.org

 in my case:

   DirAddress

Re: [Bacula-users] bacula TLS help

2013-11-27 Thread Tim Dunphy
Hello Iban! And thank you for your reply.



  I have a similar configuration. I think that the problem is in the CN:
 CN=storage.jokefire.com/emailAddress=bluethu...@gmail.com


 please could you show the value for   DirAddress = bacula.example.org

 in my case:

   DirAddress = bacula.example.org

   TLS Enable = yes
   TLS Require = yes
   TLS Verify Peer = no
   TLS CA Certificate File = /etc/bacula/certs/ca/signing-ca-1.crt
   TLS Certificate = /etc/bacula/certs/cert/bacula.crt
   TLS Key = /etc/bacula/certs/key/bacula.key


This is my director configuration from bacula-dir.conf

Director {# define myself
  Name = storage.jokefire.com
  DIRport = 9101# where we listen for UA connections
  QueryFile = /etc/bacula/query.sql
  WorkingDirectory = /var/spool/bacula
  PidDirectory = /var/run
  Maximum Concurrent Jobs = 1
  Password = secret # Console password
  Messages = Daemon
  TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt
  TLS Key = /etc/pki/tls/private/storage.jokefire.com.key
  TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem
  TLS Enable = yes
  TLS Require = yes
  TLS Verify Peer = yes
}


I hope I got you right in that this was what you needed to know.


 Looking at the cert:

 openssl x509 -in /etc/bacula/certs/cert/bacula.crt -noout -text

 Subject: C=ES, ST=X, O=, OU=Computing Department, CN=
 bacula.example.org


openssl x509 -in /etc/pki/tls/certs/storage.jokefire.com.crt -noout -text

  Subject: C=US, ST=X, L=, O= LLC, OU=Ops, CN=
storage.jokefire.com/emailAddress=bluethu...@gmail.com

[root@storage:~] #hostname -f
storage.jokefire.com



 The CN must be the sme that DirAddress (I did not use email address for
 cert sign)



It appears as if the DirAddress and the common name do agree. Might there
be something else I could have missed?

Thanks
Tim


On Wed, Nov 27, 2013 at 7:50 AM, Iban Cabrillo cabri...@ifca.unican.eswrote:

 Hi Tim,
  I have a similar configuration. I think that the proble is in the CN:
 CN=storage.jokefire.com/emailAddress=bluethu...@gmail.com


 please could you show the value for   DirAddress = bacula.example.org

 in my case:

   DirAddress = bacula.example.org

   TLS Enable = yes
   TLS Require = yes
   TLS Verify Peer = no
   TLS CA Certificate File = /etc/bacula/certs/ca/signing-ca-1.crt
   TLS Certificate = /etc/bacula/certs/cert/bacula.crt
   TLS Key = /etc/bacula/certs/key/bacula.key

 Looking at the cert:

 openssl x509 -in /etc/bacula/certs/cert/bacula.crt -noout -text

 Subject: C=ES, ST=X, O=, OU=Computing Department, CN=
 bacula.example.org

 The CN must be the sme that DirAddress (I did not use email address for
 cert sign)

 Regards, I


 2013/11/27 Tim Dunphy bluethu...@gmail.com

 Hello all,


  I'm trying to add TLS encryption to my bacula setup.



  I've been following this guide which got me almost all of the way there:


 http://blog.earth-works.com/2013/08/03/configuring-bacula-to-use-tls-to-encrypt-connections/


 I modified the following sections in my bacula-dir.conf file:


 Director {# define myself

   Name = storage.jokefire.com

   DIRport = 9101# where we listen for UA connections

   QueryFile = /etc/bacula/query.sql

   WorkingDirectory = /var/spool/bacula

   PidDirectory = /var/run

   Maximum Concurrent Jobs = 1

   Password = secret # Console password

   Messages = Daemon

   TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

   TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

   TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

   TLS Enable = yes

   TLS Require = yes

   TLS Verify Peer = yes

 }


 Client {

   Name = ops.jokefire.com

   Address = ops.jokefire.com

   FDPort = 9102

   Catalog = JokefireCatalog

   Password = secret  # password for FileDaemon

   File Retention = 14 days# 14 days

   Job Retention = 14d# 14 days

   AutoPrune = yes # Prune expired Jobs/Files

   TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

   TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

   TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

   TLS Enable = yes

   TLS Require = yes

 }



 And in my bacula-fd.conf


 Director {

   Name = storage.jokefire.com

   Password = secret

   TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

   TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

   TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

   TLS Enable = yes

   TLS Require = yes

 }


 FileDaemon {  # this is me

   Name = storage.jokefire.com

   FDport = 9102  # where we listen for the director

   WorkingDirectory = /var/bacula

   Pid Directory = /var/run

   Maximum Concurrent Jobs = 20

   TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

   TLS Key = /etc/pki/tls/private

[Bacula-users] bacula TLS help

2013-11-26 Thread Tim Dunphy
Hello all,


 I'm trying to add TLS encryption to my bacula setup.



 I've been following this guide which got me almost all of the way there:


http://blog.earth-works.com/2013/08/03/configuring-bacula-to-use-tls-to-encrypt-connections/


I modified the following sections in my bacula-dir.conf file:


Director {# define myself

  Name = storage.jokefire.com

  DIRport = 9101# where we listen for UA connections

  QueryFile = /etc/bacula/query.sql

  WorkingDirectory = /var/spool/bacula

  PidDirectory = /var/run

  Maximum Concurrent Jobs = 1

  Password = secret # Console password

  Messages = Daemon

  TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

  TLS Enable = yes

  TLS Require = yes

  TLS Verify Peer = yes

}


Client {

  Name = ops.jokefire.com

  Address = ops.jokefire.com

  FDPort = 9102

  Catalog = JokefireCatalog

  Password = secret  # password for FileDaemon

  File Retention = 14 days# 14 days

  Job Retention = 14d# 14 days

  AutoPrune = yes # Prune expired Jobs/Files

  TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

  TLS Enable = yes

  TLS Require = yes

}



And in my bacula-fd.conf


Director {

  Name = storage.jokefire.com

  Password = secret

  TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

  TLS Enable = yes

  TLS Require = yes

}


FileDaemon {  # this is me

  Name = storage.jokefire.com

  FDport = 9102  # where we listen for the director

  WorkingDirectory = /var/bacula

  Pid Directory = /var/run

  Maximum Concurrent Jobs = 20

  TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

  TLS Enable = yes

  TLS Require = yes

}


In bacula-sd.conf:


Storage { # definition of myself

  Name = storage.jokefire.com

  SDPort = 9103  # Director's port

  WorkingDirectory = /var/spool/bacula

  Pid Directory = /var/run

  Maximum Concurrent Jobs = 20

  TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

  TLS Enable = yes

  TLS Require = yes

  TLS Verify Peer = yes

}


And finally in bconsole.conf:


Director {

  Name = storage.jokefire.com

  DIRport = 9101

  address = storage.jokefire.com

  Password = secret

  TLS Certificate = /etc/pki/tls/certs/storage.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/storage.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/rootBaculaCA.pem

  TLS Enable = yes

  TLS Require = yes

}


Then I bounced the services so all seems well at this point:


[root@storage:/etc/bacula] #bounce-bacula

Stopping Bacula Storage services:  [  OK  ]

Starting Bacula Storage services:  [  OK  ]

Stopping Bacula File services: [  OK  ]

Starting Bacula File services: [  OK  ]

Stopping Bacula Director services: [  OK  ]

Starting Bacula Director services: [  OK  ]


(wrote a script to bounce all services because I'm lazy)


But when I go into bconsole I get the following (until I restore from
backup)


[root@storage:/etc/bacula] #bconsole

Connecting to Director storage.jokefire.com:9101

26-Nov 22:13 bconsole JobId 0: Error: tls.c:92 Error with certificate at
depth: 0, issuer = /C=US/ST=NJ/L=Newark/O=Jokefire LLC/OU=Ops/CN=
storage.jokefire.com/emailAddress=bluethu...@gmail.com, subject =
/C=US/ST=NJ/L=Newark/O=Jokefire LLC/OU=Ops/CN=
storage.jokefire.com/emailAddress=bluethu...@gmail.com, ERR=18:self signed
certificate

TLS negotiation failed

Director authorization problem.

Most likely the passwords do not agree.

If you are using TLS, there may have been a certificate validation error
during the TLS handshake.

Please see
http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION0026for
help.


I've saved my work with TLS so I'm eager to get this going. I used the
following guide to generating the certs, and I'm wondering if the problem
could possibly be in the way I generated the certs?


http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/


Thanks for any and all advice!


Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

[Bacula-users] problems restoring directory

2013-06-04 Thread Tim Dunphy
Hello list,


I have a working bacula system backing up a few cloud instances. But when I
tried to perform a restore, I went into the bacula console and gave the
'restore all' command and walked through the steps to select the directory
I wanted to restore.

The command fails with the following output and I was hoping to get some
advice on how to resolve the matter. Of course restoring is the whole point
to having backups! :)

03-Jun 22:49 storage.mydomain.com JobId 112: Start Restore Job
RestoreFiles.2013-06-03_22.49.10_24
03-Jun 22:49 storage.mydomain.com JobId 112: Using Device FileStorage to
read.
03-Jun 22:49 storage.mydomain.com JobId 112: Ready to read from volume
jf-backup-tape-0010 on device FileStorage (/backup/tapes).
03-Jun 22:49 storage.mydomain.com JobId 112: Forward spacing Volume
jf-backup-tape-0010 to file:block 0:2987194081.
03-Jun 22:55 storage.mydomain.com JobId 112: End of Volume at file 1 on
device FileStorage (/backup/tapes), Volume jf-backup-tape-0010
03-Jun 22:55 storage.mydomain.com JobId 112: Ready to read from volume
jf-backup-tape-0011 on device FileStorage (/backup/tapes).
03-Jun 22:55 storage.mydomain.com JobId 112: Forward spacing Volume
jf-backup-tape-0011 to file:block 0:217.
03-Jun 23:18 storage.mydomain.com JobId 112: End of Volume at file 1 on
device FileStorage (/backup/tapes), Volume jf-backup-tape-0011
03-Jun 23:18 storage.mydomain.com JobId 112: Ready to read from volume
jf-backup-tape-0013 on device FileStorage (/backup/tapes).
03-Jun 23:18 storage.mydomain.com JobId 112: Forward spacing Volume
jf-backup-tape-0013 to file:block 0:3404347209.
03-Jun 23:19 beta.mydomain.com JobId 112: Error: attribs.c:421 File size of
restored file
/backup/tapes/bacula-restores/var/amavis/.razor/razor-agent.log not
correct. Original 61076366, restored 61076494.
03-Jun 23:19 beta.mydomain.com JobId 112: Error: attribs.c:421 File size of
restored file
/backup/tapes/bacula-restores/var/spool/postfix/flush/beta_jokefire_com not
correct. Original 674168, restored 674256.
03-Jun 23:20 beta.mydomain.com JobId 112: Error: attribs.c:421 File size of
restored file /backup/tapes/bacula-restores/var/log/debug.1 not correct.
Original 336858726, restored 337239201.
03-Jun 23:21 beta.mydomain.com JobId 112: Error: attribs.c:421 File size of
restored file /backup/tapes/bacula-restores/var/log/maillog not correct.
Original 332252298, restored 332768422.
03-Jun 23:23 storage.mydomain.com JobId 112: End of Volume at file 1 on
device FileStorage (/backup/tapes), Volume jf-backup-tape-0013
03-Jun 23:23 storage.mydomain.com JobId 112: End of all volumes.
03-Jun 23:23 storage.mydomain.com JobId 112: Error: Bacula
storage.mydomain.com 5.2.13 (19Jan13):
  Build OS:   x86_64-unknown-linux-gnu redhat
  JobId:  112
  Job:RestoreFiles.2013-06-03_22.49.10_24
  Restore Client: beta.mydomain.com
  Start time: 03-Jun-2013 22:49:12
  End time:   03-Jun-2013 23:23:24
  Files Expected: 379,865
  Files Restored: 379,867
  Bytes Restored: 7,835,378,839
  Rate:   3818.4 KB/s
  FD Errors:  4
  FD termination status:  Error
  SD termination status:  OK
  Termination:*** Restore Error ***

03-Jun 23:23 storage.mydomain.com JobId 112: Begin pruning Jobs older than
14 days .
03-Jun 23:23 storage.mydomain.com JobId 112: No Jobs found to prune.
03-Jun 23:23 storage.mydomain.com JobId 112: Begin pruning Files.
03-Jun 23:23 storage.mydomain.com JobId 112: No Files found to prune.
03-Jun 23:23 storage.mydomain.com JobId 112: End auto prune.

These are ownerships and permissions on the restore directory:

[root@cloud:~] #ls -ld /backup/tapes/bacula-restores
drwxrwxr-x 2 bacula disk 4096 Jun  3 21:51 /backup/tapes/bacula-restores

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] problems restoring directory

2013-06-04 Thread Tim Dunphy
|If that's an issue, consider switching to exact style backup
|jobs. ;-)


Yep! Moving to a specific restore rather than an a 'restore all' approach
seems to have done the trick. Thanks for your input. :)

Tim


On Tue, Jun 4, 2013 at 10:28 AM, Uwe Schuerkamp
uwe.schuerk...@nionex.netwrote:

 On Tue, Jun 04, 2013 at 10:10:51AM -0400, Tim Dunphy wrote:
  Hello list,
 
 
  I have a working bacula system backing up a few cloud instances. But
 when I
  tried to perform a restore, I went into the bacula console and gave the
  'restore all' command and walked through the steps to select the
 directory
  I wanted to restore.
 
  The command fails with the following output and I was hoping to get some
  advice on how to resolve the matter. Of course restoring is the whole
 point
  to having backups! :)
 

 I don't think you need to worry just yet, bacula is complaining about
 log- and mail spool files having changed in size during the backup:

  jf-backup-tape-0013 to file:block 0:3404347209.
  03-Jun 23:19 beta.mydomain.com JobId 112: Error: attribs.c:421 File
 size of
  restored file
  /backup/tapes/bacula-restores/var/amavis/.razor/razor-agent.log not
  correct. Original 61076366, restored 61076494.
  03-Jun 23:19 beta.mydomain.com JobId 112: Error: attribs.c:421 File
 size of
  restored file
  /backup/tapes/bacula-restores/var/spool/postfix/flush/beta_jokefire_com
 not
  correct. Original 674168, restored 674256.
  03-Jun 23:20 beta.mydomain.com JobId 112: Error: attribs.c:421 File
 size of
  restored file /backup/tapes/bacula-restores/var/log/debug.1 not correct.
  Original 336858726, restored 337239201.
  03-Jun 23:21 beta.mydomain.com JobId 112: Error: attribs.c:421 File
 size of
  restored file /backup/tapes/bacula-restores/var/log/maillog not correct.
  Original 332252298, restored 332768422.
  03-Jun 23:23 storage.mydomain.com JobId 112: End of Volume at file 1 on
  device FileStorage (/backup/tapes), Volume jf-backup-tape-0013
  03-Jun 23:23 storage.mydomain.com JobId 112: End of all volumes.
  03-Jun 23:23 storage.mydomain.com JobId 112: Error: Bacula
  storage.mydomain.com 5.2.13 (19Jan13):

 If that's an issue, consider switching to exact style backup
 jobs. ;-)

 all the best,

 Uwe

 --

 NIONEX --- Ein Unternehmen der Bertelsmann SE  Co. KGaA





-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bacula backups insufficient

2013-03-28 Thread Tim Dunphy
Hello list,

 My current bacula director does seem to be able to connect to it's
clients, but for some reason the backups are much smaller than expected.

Terminated Jobs:
 JobId  LevelFiles  Bytes   Status   FinishedName

43  Incr  0 0   OK   27-Mar-13 03:05
cloud.mydomain.com
44  Incr  0 0   OK   27-Mar-13 03:05
beta.mydomain.com
45  Incr  0 0   OK   27-Mar-13 03:05
mail.mydomain.com
46  Incr  0 0   OK   27-Mar-13 03:05
chef.mydomain.com
47  Full  1539.4 K  OK   27-Mar-13 03:10
mydomain_BackupCatalog
48  Incr  0 0   OK   28-Mar-13 03:05
cloud.mydomain.com
49  Incr  0 0   OK   28-Mar-13 03:05
beta.mydomain.com
50  Incr  0 0   OK   28-Mar-13 03:05
mail.mydomain.com
51  Incr  0 0   OK   28-Mar-13 03:05
chef.mydomain.com
52  Full  1554.5 K  OK   28-Mar-13 03:10
mydomain_BackupCatalog

Taking my mail server for example:

Terminated Jobs:
 JobId  LevelFiles  Bytes   Status   FinishedName
==
14  Full19720.36 M  OK   22-Mar-13 02:10
mail.mydomain.com
18  Incr  0 0   OK   22-Mar-13 23:05
mail.mydomain.com
21  Full19720.36 M  OK   23-Mar-13 07:59
mail.mydomain.com
22  Full19720.36 M  OK   23-Mar-13 08:01
mail.mydomain.com
25  Incr  0 0   OK   23-Mar-13 23:05
mail.mydomain.com
30  Diff  0 0   OK   24-Mar-13 23:05
mail.mydomain.com
35  Incr  0 0   OK   25-Mar-13 23:05
mail.mydomain.com
40  Incr  0 0   OK   26-Mar-13 03:05
mail.mydomain.com
45  Incr  0 0   OK   27-Mar-13 03:05
mail.mydomain.com
50  Incr  0 0   OK   28-Mar-13 03:05
mail.mydomain.com


Even full backups of my mail server which should be in the GIGABYTES are
only on the order of 20 MB or so in the current backup rotation.

From my bacula-dir.conf here's my director:

Director {# define myself
  Name = storage.mydomain.com
  DIRport = 9101# where we listen for UA connections
  QueryFile = /etc/bacula/query.sql
  WorkingDirectory = /var/spool/bacula
  PidDirectory = /var/run
  Maximum Concurrent Jobs = 1
  Password = secret # Console password
  Messages = Daemon
}

Mail job:

Job {
  Name = mail.mydomain.com
  Type = Backup
  Client = mail.mydomain.com
  FileSet = Full Set
  Schedule = WeeklyCycle
  Storage = File
  Messages = Standard
  Pool = Default
  Write Bootstrap = /var/spool/bacula/%c.bsr
}

Schedule:

Schedule {
  Name = WeeklyCycle
  Run = Full 1st sun at 03:05
  Run = Differential 2nd-5th sun at 03:05
  Run = Incremental mon-sat at 03:05
}

Client:

# Client (File Services) to backup
Client {
  Name = mail.mydomain.com
  Address = mail.mydomain.com
  FDPort = 9102
  Catalog = JokefireCatalog
  Password = secret  # password for
  File Retention = 30d# 30 days
  Job Retention = 30d# 30 days
  AutoPrune = yes # Prune expired Jobs/Files
}


Storage:

# Definition of file storage device
Storage {
  Name = File
# Do not use localhost here
  Address = storage.mydomain.com# N.B. Use a fully qualified name here
  SDPort = 9103
  Password = secret
  Device = FileStorage
  Media Type = File
}

My default pool:

Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes   # Bacula can automatically recycle
Volumes
  AutoPrune = yes # Prune expired volumes
  Volume Retention = 14 days  # 2 week retention
  Maximum Volume Bytes = 5G# Limit Volume size to something
reasonable
  Maximum Volumes = 2000   # Limit number of Volumes in Pool
  Volume Use Duration = 7d   # Use a new tape every week
  Recycle = yes   # Recycling
  Recycle Oldest Volume = yes # Recycle the oldest volume
  LabelFormat = jf-backup-tape-
}

This is what st storage looks like

*st storage
Automatically selected Storage: File
Connecting to Storage daemon File at storage.mydomain.com:9103

storage.mydomain.com Version: 5.2.13 (19 February 2013)
x86_64-unknown-linux-gnu redhat
Daemon started 20-Mar-13 00:38. Jobs: run=52, running=0.
 Heap: heap=249,856 smbytes=98,943 max_bytes=169,182 bufs=80 max_bufs=99
 Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8 mode=0,0

Running Jobs:
No Jobs running.


Jobs waiting to reserve a drive:


Terminated Jobs:
 JobId  LevelFiles  Bytes   Status   FinishedName
===
43  Incr  0 0   OK   27-Mar-13 03:05

Re: [Bacula-users] bacula backups insufficient

2013-03-28 Thread Tim Dunphy
Hi Melvin,

Really appreciate your response. But yep! There's the problem!

FileSet {
  Name = Full Set
  Include {
Options {
  signature = MD5
}
#
#  Put your list of files here, preceded by 'File =', one per line
#or include an external list with:
#
#File = file-name
#
#  Note: / backs up everything on the root partition.
#if you have other partitions such as /usr or /home
#you will probably want to add them too.
#
#  By default this is defined to point to the Bacula binary
#directory to give a reasonable FileSet to backup to
#disk storage during initial testing.
#
File = /usr/sbin
  }

#
# If you backup the root directory, the following two excluded
#   files can be useful
#
  Exclude {
File = /var/bacula
File = /tmp
File = /proc
File = /tmp
File = /.journal
File = /.fsck
File = /backup
  }
}


That explains everything. I'm only backing up /usr/sbin! Where I'd really
like to be backing up the root partition with a few excludes. Could've
sworn I'd changed that default but I guess my eyes lied to me. Thanks for
the help! Feel a little dumb, but I appreciate the help!

Tim

On Thu, Mar 28, 2013 at 7:00 PM, melvin.r...@gmail.com wrote:

 Could we see your file set definition? It sounds like it's looking in the
 wrong places for files. We wouldn't know what the right places were, but
 you would and could answer questions. it's where I'd start at least


 -Melvin

 On 3/28/13 17:47 Tim Dunphy wrote:
 Hello list,

  My current bacula director does seem to be able to connect to it's
 clients, but for some reason the backups are much smaller than expected.

 Terminated Jobs:
  JobId  LevelFiles  Bytes   Status   FinishedName
 
 43  Incr  0 0   OK   27-Mar-13 03:05
 cloud.mydomain.com
 44  Incr  0 0   OK   27-Mar-13 03:05
 beta.mydomain.com
 45  Incr  0 0   OK   27-Mar-13 03:05
 mail.mydomain.com
 46  Incr  0 0   OK   27-Mar-13 03:05
 chef.mydomain.com
 47  Full  1539.4 K  OK   27-Mar-13 03:10
 mydomain_BackupCatalog
 48  Incr  0 0   OK   28-Mar-13 03:05
 cloud.mydomain.com
 49  Incr  0 0   OK   28-Mar-13 03:05
 beta.mydomain.com
 50  Incr  0 0   OK   28-Mar-13 03:05
 mail.mydomain.com
 51  Incr  0 0   OK   28-Mar-13 03:05
 chef.mydomain.com
 52  Full  1554.5 K  OK   28-Mar-13 03:10
 mydomain_BackupCatalog

 Taking my mail server for example:

 Terminated Jobs:
  JobId  LevelFiles  Bytes   Status   FinishedName
 ==
 14  Full19720.36 M  OK   22-Mar-13 02:10
 mail.mydomain.com
 18  Incr  0 0   OK   22-Mar-13 23:05
 mail.mydomain.com
 21  Full19720.36 M  OK   23-Mar-13 07:59
 mail.mydomain.com
 22  Full19720.36 M  OK   23-Mar-13 08:01
 mail.mydomain.com
 25  Incr  0 0   OK   23-Mar-13 23:05
 mail.mydomain.com
 30  Diff  0 0   OK   24-Mar-13 23:05
 mail.mydomain.com
 35  Incr  0 0   OK   25-Mar-13 23:05
 mail.mydomain.com
 40  Incr  0 0   OK   26-Mar-13 03:05
 mail.mydomain.com
 45  Incr  0 0   OK   27-Mar-13 03:05
 mail.mydomain.com
 50  Incr  0 0   OK   28-Mar-13 03:05
 mail.mydomain.com


 Even full backups of my mail server which should be in the GIGABYTES are
 only on the order of 20 MB or so in the current backup rotation.

 From my bacula-dir.conf here's my director:

 Director {# define myself
   Name = storage.mydomain.com
   DIRport = 9101# where we listen for UA connections
   QueryFile = /etc/bacula/query.sql
   WorkingDirectory = /var/spool/bacula
   PidDirectory = /var/run
   Maximum Concurrent Jobs = 1
   Password = secret # Console password
   Messages = Daemon
 }

 Mail job:

 Job {
   Name = mail.mydomain.com
   Type = Backup
   Client = mail.mydomain.com
   FileSet = Full Set
   Schedule = WeeklyCycle
   Storage = File
   Messages = Standard
   Pool = Default
   Write Bootstrap = /var/spool/bacula/%c.bsr
 }

 Schedule:

 Schedule {
   Name = WeeklyCycle
   Run = Full 1st sun at 03:05
   Run = Differential 2nd-5th sun at 03:05
   Run = Incremental mon-sat at 03:05
 }

 Client:

 # Client (File Services) to backup
 Client {
   Name = mail.mydomain.com
   Address = mail.mydomain.com
   FDPort = 9102
   Catalog = JokefireCatalog
   Password = secret  # password for
   File Retention = 30d# 30 days
   Job Retention = 30d# 30 days
   AutoPrune = yes # Prune expired Jobs/Files
 }


 Storage

[Bacula-users] numbering tapes

2013-01-08 Thread Tim Dunphy
Hello,

 I've set auto-labeling in my pool definition:

# Default pool definition
Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes   # Bacula can automatically recycle
Volumes
  AutoPrune = yes # Prune expired volumes
  Volume Retention = 45 days  # a month and a half
  Maximum Volume Bytes = 25G# Limit Volume size to something
reasonable
  Maximum Volumes = 16   # Limit number of Volumes in Pool
  Volume Use Duration = 7d   # Use a new tape every week
  Recycle = yes   # Recycling
  Recycle Oldest Volume = yes # Recycle the oldest volume
  LabelFormat = jf-backup-tape-
}


And I need to re-create my tapes due to a new backup strategy. But I notice
that the tape numbering scheme seems to pick up from where the last pool
left off:

Select the Pool (1-3): 3
+-+-+---+-++--+--+-+--+---+---+-+
| MediaId | VolumeName  | VolStatus | Enabled | VolBytes   |
VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType |
LastWritten |
+-+-+---+-++--+--+-+--+---+---+-+
| 207 | jf-backup-tape-0001 | Full  |   1 | 26,843,542,493 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-03
03:48:23 |
| 208 | jf-backup-tape-0002 | Full  |   1 | 26,843,507,914 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-03
05:11:43 |
| 209 | jf-backup-tape-0003 | Full  |   1 | 26,843,507,914 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-03
06:27:53 |
| 210 | jf-backup-tape-0210 | Full  |   1 | 26,843,493,191 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-04
02:19:26 |
| 211 | jf-backup-tape-0211 | Full  |   1 | 26,843,502,243 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-04
03:50:07 |
| 212 | jf-backup-tape-0212 | Full  |   1 | 26,843,507,914 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-04
05:15:09 |
| 213 | jf-backup-tape-0213 | Full  |   1 | 26,843,507,914 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-04
06:31:47 |
| 214 | jf-backup-tape-0214 | Full  |   1 | 26,843,529,199 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-05
02:32:19 |
| 215 | jf-backup-tape-0215 | Full  |   1 | 26,843,530,749 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-05
03:57:34 |
| 216 | jf-backup-tape-0216 | Full  |   1 | 26,843,507,914 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-05
05:22:34 |
| 217 | jf-backup-tape-0217 | Full  |   1 | 26,843,507,914 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-05
06:39:16 |
| 218 | jf-backup-tape-0218 | Full  |   1 | 26,843,484,949 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-06
02:37:38 |
| 219 | jf-backup-tape-0219 | Full  |   1 | 26,843,507,429 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-06
03:58:47 |
| 220 | jf-backup-tape-0220 | Full  |   1 | 26,843,507,914 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-06
05:37:46 |
| 221 | jf-backup-tape-0221 | Full  |   1 | 26,843,507,914 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-06
06:54:03 |
| 222 | jf-backup-tape-0222 | Full  |   1 | 26,843,496,040 |
 6 |3,888,000 |   1 |0 | 0 | File  | 2013-01-07
02:48:34 |
+-+-+---+-++--+--+-+--+---+---+-+

Is there any way (maybe by manipulating the database directly) to re-set
the tape numbering scheme so that I can have the tapes labeled 0001-0025?

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] backup remote clients

2012-09-24 Thread Tim Dunphy
Well it seems that a good perusal of the docs was all I need. I appreciate
all your input but ultimately all I had to do was read, slow down and think
about what I was doing and then.. SUCCESS!!

|69 | beta.mydomain.com  | 2012-09-24 21:55:37 | B| F |
265,960 | 7,766,476,900 | T |

This is my remote client.. I'm so glad I got this worked out. The bacula
command line environment rocks and I like it so much better than Amanda
which is what I used to use.

Thanks
tim

On Fri, Sep 21, 2012 at 3:48 AM, Geert Stappers 
geert.stapp...@vanadgroup.com wrote:

 Op 20120919 om 12:35 schreef Michael D. Wood:
  Tim,

 Hello Mailinglist,

  It would be the same sort of setup in a local environment, but you would
 be
  exchanging hostnames/local ip's with external ip's.  Obviously, allowing
  access through your firewall. Also, make sure you actually have a
 connection
  between server and client on port 9102.  You would still need to change
 your
  bacula config files accordingly too.
 
  Are they windows or linux clients?
 
  Linux client it would look something like this in the bacula-dir.conf -
 then
  you would have to setup storage configurations, etc.
 
  # Linux server file set to backup
  FileSet {
Name = Linux Full Set
Include {
  Options {
signature = SHA1
  }
 
  # Included files (WILL BE BACKED UP)
  File = /
  }
 
  I would start reading up, has all the information to backup directories
 on
  the client (if I'm following your question exactly)
 
 http://www.bacula.org/5.2.x-manuals/en/main/main/What_is_Bacula.html#SECTION
  0022
  http://www.bacula.org/5.2.x-manuals/en/main/main/index.html
 

 Another good read is http://catb.org/~esr/faqs/smart-questions.html


 Cheers
 Geert Stappers


 --
 Got visibility?
 Most devs has no idea what their production app looks like.
 Find out how fast your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219671;13503038;y?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] backup remote clients

2012-09-17 Thread Tim Dunphy
hello,

 Bacula and bconsole are running happily on my backup server. But not I
need to know how to backup remote clients. Sorry if this is an obvious
question but does anyone know where I can find the docs that tell me how to
do this?

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] backup remote clients

2012-09-17 Thread Tim Dunphy
Hi John,

 What do you mean by remote? Machines that are on the same network or
 is there a firewall blocking connections from the client to server?

Different networks. Bacula server is on AWS, Bacula client is on Rackspace 
Cloud. Client is firewalled but I've opened the appropriate port 9102, if 
memory serves?).

I just need to know how to configure the server to backup directories on the 
client. Where can I find the docs for this type of setup?


Thanks
Tim
Sent from my iPhone

On Sep 17, 2012, at 4:10 PM, John Drescher dresche...@gmail.com wrote:

 Bacula and bconsole are running happily on my backup server. But not I need
 to know how to backup remote clients. Sorry if this is an obvious question
 but does anyone know where I can find the docs that tell me how to do this?
 
 
 What do you mean by remote? Machines that are on the same network or
 is there a firewall blocking connections from the client to server?
 
 John

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bacula-dir crashing

2012-09-09 Thread Tim Dunphy
Hello,

 I was able to get a more recent version of bacula on my centos 5.6 with
advice from Simone on this list.

 I'm now running bacula 5.2.10  Thanks!

 However my current situation is that bacula-sd and bacula-fd both run fine
when bacula-dir crashes with the following message in the logs:

[root@cloud:/etc/bacula] #tail -f /var/log/bacula/bacula.log
09-Sep 18:47 bacula-dir JobId 0: Fatal error: Could not open Catalog
MyCatalog, database bacula.
09-Sep 18:47 bacula-dir JobId 0: Fatal error: postgresql.c:248 Unable to
connect to PostgreSQL server. Database=bacula User=bacula
Possible causes: SQL server not running; password incorrect;
max_connections exceeded.
09-Sep 18:47 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

For some reason thinks that I'm using postgres instead of mysql.

I tried setting MyCatalog to use mysql instead in the bacula-dir.conf file
however that still resulted in the message you see above from the logs


# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = dbi:postgresql; dbaddress = 127.0.0.1; dbport =
  dbdriver = dbi:mysql; dbaddress = 127.0.0.1; dbport = 3306
  dbname = bacula; dbuser = bacula; dbpassword = secretsauce
}

I've checked and I can log into the database using the login information I
supplied in the config and use the bacula database.

I've installed bacula with yum using the following info:

http://repos.fedorapeople.org/repos/slaanesh/bacula/README.txt

Here are the packages I have installed:

[root@cloud:~] #rpm -qa | grep bacula
bacula-client-5.2.10-6.el5
bacula-storage-5.2.10-6.el5
bacula-libs-5.2.10-6.el5
bacula-console-5.2.10-6.el5
bacula-common-5.2.10-6.el5
bacula-director-5.2.10-6.el5
bacula-docs-5.2.10-1.el5
bacula-libs-sql-5.2.10-6.el5
bacula-traymonitor-2.4.4-10.el5
http://repos.fedorapeople.org/repos/slaanesh/bacula/
I'm including my bacula-dir as an attachment just in case it might shed
some light on what needs to be corrected.

So in short I just need to know how to tell the current version of bacula
to use mysql instead of postgres.

Thank you

Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
#
# Default Bacula Director Configuration file
#
#  The only thing that MUST be changed is to add one or more
#   file or directory names in the Include directive of the
#   FileSet resource.
#
#  For Bacula release 5.2.10 (28 June 2012) -- redhat Enterprise release
#
#  You might also want to change the default email address
#   from root to your address.  See the mail and operator
#   directives in the Messages resource.
#

Director {# define myself
  Name = bacula-dir
  DIRport = 9101# where we listen for UA connections
  QueryFile = /etc/bacula/query.sql
  WorkingDirectory = /var/spool/bacula
  PidDirectory = /var/run
  Maximum Concurrent Jobs = 1
  Password = secretsauce # Console password
  Messages = Daemon
}

JobDefs {
  Name = DefaultJob
  Type = Backup
  Level = Incremental
  Client = bacula-fd 
  FileSet = Full Set
  Schedule = WeeklyCycle
  Storage = File
  Messages = Standard
  Pool = File
  Priority = 10
  Write Bootstrap = /var/spool/bacula/%c.bsr
}


#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /tmp
Job {
  Name = BackupClient1
  JobDefs = DefaultJob
}

#Job {
#  Name = BackupClient2
#  Client = bacula2-fd
#  JobDefs = DefaultJob
#}

# Backup the catalog database (after the nightly save)
Job {
  Name = BackupCatalog
  JobDefs = DefaultJob
  Level = Full
  FileSet=Catalog
  Schedule = WeeklyCycleAfterBackup
  # This creates an ASCII copy of the catalog
  # Arguments to make_catalog_backup.pl are:
  #  make_catalog_backup.pl catalog-name
  RunBeforeJob = /usr/libexec/bacula/make_catalog_backup.pl MyCatalog
  # This deletes the copy of the catalog
  RunAfterJob  = /usr/libexec/bacula/delete_catalog_backup
  Write Bootstrap = /var/spool/bacula/%n.bsr
  Priority = 11   # run after main backup
}

#
# Standard Restore template, to be changed by Console program
#  Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
  Name = RestoreFiles
  Type = Restore
  Client=bacula-fd 
  FileSet=Full Set  
  Storage = File  
  Pool = Default
  Messages = Standard
  Where = /tmp/bacula-restores
}


# List of files to be backed up
FileSet {
  Name = Full Set
  Include {
Options {
  signature = MD5
}
#
#  Put your list of files here, preceded by 'File =', one per line
#or include an external list with:
#
#File = file-name
#
#  Note: / backs up everything on the root partition.
#if you have other partitions such as /usr or /home
#you will probably want to add them too.
#
#  By default this is defined to point to the Bacula binary
#directory to give a reasonable FileSet to backup to
#disk storage 

[Bacula-users] missing bacula conf files

2012-09-05 Thread Tim Dunphy
Hello,

 I'm trying to setup bacula-director  2.4.4  under centos 5.6 on a linux
vm.

 I'm following instructions that are telling me to modify a couple of files
that don't appear to be on my system after searching for them using both
find and the locate command:

 /etc/bacula/tray-monitor.conf

/etc/bacula/bconsole.conf

 I've installed the various components via yum and these are the packages I
have installed:

 [root@cloud:~] #rpm -qa | grep bacula
bacula-docs-2.4.4-5.el5
bacula-director-mysql-2.4.4-10.el5
bacula-storage-common-2.4.4-10.el5
bacula-director-common-2.4.4-10.el5
bacula-storage-mysql-2.4.4-10.el5
bacula-console-2.4.4-10.el5
bacula-common-2.4.4-10.el5

What I'm wondering is if the reason I'm missing these conf files is because
I haven't installed the correct packages.

I'd appreciate any input you might have on this.

Thanks!
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users