Re: [Bacula-users] troubles with automatic labeling after ubuntu upgrade

2023-04-05 Thread Peter N. Steinmetz
So I had a very careful look through the configuration files and the 
list of existing volumes and noticed that the media type of the prior 
volumes in the pool was 'File1', whereas the current re-constructed 
configuration files listed that pool as having volumes of type 'File'.


After changing the type of 'File' to 'File1' in the director 
configuration and storage configuration, it is correctly finding the 
existing purged volumes and recycling them.


So bacula requires the same Media Type to correctly recycle, which I 
guess makes sense.


cheers,
Peter


Phil Stracchino wrote on 3/31/23 10:16 AM:


Are the oldest volumes *actually fully purged*?

Do you have Recycle Oldest Volume enabled?

(Actually, I don't recycle disk volumes.  I delete them on purge and 
create new ones as needed.  I find it simplifies volume tracking and 
makes better use of disk space.) 
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] New bacula install

2023-04-05 Thread Daniel Rich via Bacula-users
Did you drop the database and recreate it after you tried to create the tables 
with the root user? That sounds like there were already tables there when you 
ran that command, and it couldn’t recreate them because of the constraints on 
the existing tables.

If you don’t have any data it in, I would drop and recrecreate the database; 
then run that script again.

Dan Rich  |   http://www.employees.org/~drich/
                               |  "Step up to red alert!"  "Are you sure, sir?
                               |   It means changing the bulb in the sign..."
                               |          - Red Dwarf (BBC)

On April 5, 2023 at 08:14:06, Andrew Meyer via Bacula-users 
(bacula-users@lists.sourceforge.net) wrote:

I'm trying to set up bacula on AlmaLinux 8.7 w/ MariaDB 10.11 and getting the 
following error:

$ sudo /usr/libexec/bacula/make_mysql_tables -u bacula -p  
Enter password:  
ERROR 1005 (HY000) at line 112: Can't create table `bacula`.`Job` (errno: 150 
"Foreign key constraint is incorrectly formed")
ERROR 1005 (HY000) at line 286: Can't create table `bacula`.`Pool` (errno: 150 
"Foreign key constraint is incorrectly formed")
Creation of Bacula MySQL tables succeeded.

The error was much worse when I tried to run this as mysql root user.   

Can someone point me in the right direction to resolve this?
___  
Bacula-users mailing list  
Bacula-users@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/bacula-users  


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


[Bacula-users] Autochangers, bacula try to purge and load volume not in slot...

2023-04-05 Thread Marco Gaiarin


Situation: debian10, bacula 9.4.2-2+deb10u1; some SD are using 'vchanger'
virtual changer script to manage backup on a set of RDX cartdrige.

All work as expected, with cartdrige change on friday morning, full backup
on friday evening and incremental subsequent days.


But sometimes, not everytime, if users forgot to change the cartdrige/media
on friday, we have seen (in bacula and vchager logs) that bacula try to
recycle volumes on subsequent media (and this is normal) BUT try to mount
it, even if they are NOT on slots, leading to media in state 'Error'.

vchager author say:
> When Bacula is looking for an available volume for a
> job, it at some point tries to make a volume available by recycling old
> volumes. If it is able to recycle a volume that the job can use, then it
> sees an available volume. When it sees the available volume, it tries to
> load it, even if that volume is not in a slot. When it fails to load, it
> causes an i/o error (file not found) and that causes Bacula to mark the
> volume in error. The problem is that Bacula should not ever try to load a
> volume that is not in a slot when reading/writing to an autochanger device.


This is a known bug? Or more probably, colud be a misconfiguration?

Thanks.

-- 
  Dai diamanti non nasce niente
  dal letame nascono i fior (F. De Andre`)




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


Re: [Bacula-users] New bacula install

2023-04-05 Thread Phil Stracchino

On 4/5/23 11:10, Andrew Meyer via Bacula-users wrote:
I'm trying to set up bacula on AlmaLinux 8.7 w/ MariaDB 10.11 and 
getting the following error:


$ sudo /usr/libexec/bacula/make_mysql_tables -u bacula -p
Enter password:
ERROR 1005 (HY000) at line 112: Can't create table `bacula`.`Job` 
(errno: 150 "Foreign key constraint is incorrectly formed")
ERROR 1005 (HY000) at line 286: Can't create table `bacula`.`Pool` 
(errno: 150 "Foreign key constraint is incorrectly formed")

Creation of Bacula MySQL tables succeeded.

The error was much worse when I tried to run this as mysql root user.

Can someone point me in the right direction to resolve this?


Andrew, which version of Bacula?  If you are seeing foreign key 
constraint failures, I suspect the general answer is "an old one", 
because no table in current Bacula releases contains foreign key 
constraints.  They were removed a LONG time ago.




--
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958



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


[Bacula-users] New bacula install

2023-04-05 Thread Andrew Meyer via Bacula-users
I'm trying to set up bacula on AlmaLinux 8.7 w/ MariaDB 10.11 and getting the 
following error:
$ sudo /usr/libexec/bacula/make_mysql_tables -u bacula -p 
Enter password: 
ERROR 1005 (HY000) at line 112: Can't create table `bacula`.`Job` (errno: 150 
"Foreign key constraint is incorrectly formed")
ERROR 1005 (HY000) at line 286: Can't create table `bacula`.`Pool` (errno: 150 
"Foreign key constraint is incorrectly formed")
Creation of Bacula MySQL tables succeeded.
The error was much worse when I tried to run this as mysql root user.  

Can someone point me in the right direction to resolve this?
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] "TLS Allowed CN" not working

2023-04-05 Thread Alexey Chistyakov
Hi!

I am updating the bacula version from 9.6 to 11.0.
In version 11 changed TLS Encryption certificate verification:
*Additionally, the client's X509 certificate Common Name must meet the
value of the Address directive (new in 11 verison). If the TLS Allowed CN
configuration directive is used, the client's x509 certificate Common Name
must also correspond to one of the CN specified in the TLS Allowed CN
directive.*

When i upgraded bacula connection between director and client failed with
error:TLS host certificate verification failed. Host name "10.10.10.10" did
not match presented certificate

I generated a certificate with CN containing the client Address directive
and it works!
Cert (used in two examples):

Certificate:
Data:
Version: 3 (0x2)
Serial Number:
...
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = ..., ST = ..., L = ..., O = ..., OU = ..., CN =
testCA, emailAddress = ...
Validity
Not Before: Apr  3 19:55:39 2023 GMT
Not After : Jul  6 19:55:39 2025 GMT
Subject: C = ..., ST = ..., L = ..., O = ..., OU = ..., CN =
10.10.10.10, emailAddress = ...
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
...
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
...
X509v3 Authority Key Identifier:
keyid:...

DirName:/C=.../ST=.../L=.../O=Kaspersky/OU=.../CN=testCA/emailAddress=...
serial:...

X509v3 Extended Key Usage:
TLS Web Server Authentication, TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature, Key Encipherment
X509v3 Subject Alternative Name:
IP Address:10.10.10.10
Signature Algorithm: sha256WithRSAEncryption
 ..
-BEGIN CERTIFICATE-
..
-END CERTIFICATE-

Connection between Client and Director was successful.
Example:

   - Director config:

Client {
  Name = test-fd
  Address = 10.10.10.10
  Catalog = MyCatalog
  Password = xxx
  TLS Enable = yes
  TLS Require = yes
  TLS CA Certificate File = "CAtest.pem"}


   - Client config:

Director {
  Name = test-dir
  Password = xxx
  TLS Enable = yes
  TLS Require = yes
  TLS Verify Peer = no
  TLS Certificate = "test.crt"
  TLS Key = "test.key"
}

But if I set TLS Allowed CN in the director's config, it won't change
anything, the TLS Allowed CN detective will just be ignored. I'm using the
certificate from the previous example (this certificate only contains the
client address directive in the CN value, it doesn't have the TLS Allowed
CN value), but the connection succeeds.
Example:

   - Director config:

Client {
  Name = test-fd
  Address = 10.10.10.10
  Catalog = MyCatalog
  Password = xxx
  TLS Enable = yes
  TLS Require = yes
  TLS CA Certificate File = "CAtest.pem"
*  TLS Allowed CN = **"test.example.com " # NEW line
*}


   - Client config (not changet):

Director {
  Name = test-dir
  Password = xxx
  TLS Enable = yes
  TLS Require = yes
  TLS Verify Peer = no
  TLS Certificate = "test.crt"
  TLS Key = "test.key"
}

What am I doing wrong?
Can i remove the Address directive existence check in CN value and use
only TLS Allowed CN.
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Recovery from only one storage

2023-04-05 Thread Tomasz Świderski

I have 2 jobs in Bacula connected to one client.
Job 1 makes a copy to the hard drive (storage1) and Job 2 makes a copy 
to the magnetic tape (storage2).
How during recovery, indicate that it should only recover e.g. from 
storage2?
My scenario assumes, for example, that storage 1 is not available and I 
have to recover only from magnetic tapes (storage2).
When in Baculum I choose, for example, Job2, and click Recovery, it 
shows me from my two storage on the list of required media.




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