Re: [Bacula-users] Again vchanger and volumes in error...

2024-04-02 Thread Marco Gaiarin
Mandi! Josh Fisher via Bacula-users
  In chel di` si favelave...

>> This is the Easter weekend in italy, so backup will fail in most of my
>> sites; i'm enabling debug for sites, i'll come back here on monday...
> When the magazine is ejected and no magazine is in drive, the output of
> 'list media' command from bconsole should be saved to see if it shows all
> volumes to be not in changer, if that is possible for you.

This is not the case. This morning, many sites are in this situation:

 *list  media pool=VEN-VI-VIPVE2RDXPool
 Automatically selected Catalog: BaculaLNF
 Using Catalog "BaculaLNF"
 
+-+-+---+-+-+--+--+-+--+---+---+-+--+-+---+
 | mediaid | volumename  | volstatus | enabled | volbytes| 
volfiles | volretention | recycle | slot | inchanger | mediatype | voltype | 
volparts | lastwritten | expiresin |
 
+-+-+---+-+-+--+--+-+--+---+---+-+--+-+---+
 |  65 | VIPVE2RDX__ | Used  |   1 |  31,662,315,256 |  
  7 |1,728,000 |   1 |1 | 1 | RDX   |   1 |
0 | 2024-03-27 23:19:24 | 1,260,715 |
 |  66 | VIPVE2RDX__0001 | Used  |   1 | 252,325,621,886 |  
 58 |1,728,000 |   1 |2 | 1 | RDX   |   1 |
0 | 2024-03-22 23:14:40 |   828,431 |
 |  67 | VIPVE2RDX__0002 | Used  |   1 |  30,667,314,171 |  
  7 |1,728,000 |   1 |3 | 1 | RDX   |   1 |
0 | 2024-03-25 23:18:10 | 1,087,841 |
 |  68 | VIPVE2RDX__0003 | Used  |   1 |  30,831,948,368 |  
  7 |1,728,000 |   1 |4 | 1 | RDX   |   1 |
0 | 2024-03-26 23:18:37 | 1,174,268 |
 |  69 | VIPVE2RDX__0004 | Used  |   1 |  30,341,914,783 |  
  7 |1,728,000 |   1 |5 | 1 | RDX   |   1 |
0 | 2024-03-23 23:27:48 |   915,619 |
 |  70 | VIPVE2RDX__0005 | Used  |   1 |  30,470,135,772 |  
  7 |1,728,000 |   1 |6 | 1 | RDX   |   1 |
0 | 2024-03-24 23:19:36 | 1,001,527 |
 |  71 | VIPVE2RDX__0006 | Used  |   1 | 144,018,213,730 |  
 33 |1,728,000 |   1 |7 | 1 | RDX   |   1 |
0 | 2024-03-24 02:22:19 |   926,090 |
 |  72 | VIPVE2RDX__0007 | Used  |   1 |  30,743,038,072 |  
  7 |1,728,000 |   1 |8 | 1 | RDX   |   1 |
0 | 2024-03-28 23:17:54 | 1,347,025 |
 | 135 | VIPVE2RDX_0001_ | Error |   1 |   1 |  
  0 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-12 23:17:57 | 0 |
 | 136 | VIPVE2RDX_0001_0001 | Error |   1 |   1 |  
  0 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-11 23:18:58 | 0 |
 | 137 | VIPVE2RDX_0001_0002 | Used  |   1 |  30,524,652,597 |  
  7 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-13 23:18:41 |51,072 |
 | 138 | VIPVE2RDX_0001_0003 | Used  |   1 |  30,264,937,403 |  
  7 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-14 23:18:48 |   137,479 |
 | 139 | VIPVE2RDX_0001_0004 | Error |   1 |   1 |  
  0 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-08 23:12:06 | 0 |
 | 140 | VIPVE2RDX_0001_0005 | Error |   1 |   1 |  
  0 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-10 23:19:45 | 0 |
 | 141 | VIPVE2RDX_0001_0006 | Error |   1 |   1 |  
  0 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-10 02:24:11 | 0 |
 | 142 | VIPVE2RDX_0001_0007 | Error |   1 |   1 |  
  0 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-09 23:25:38 | 0 |
 | 205 | VIPVE2RDX_0002_ | Used  |   1 |  30,086,601,942 |  
  7 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-16 23:30:30 |   310,981 |
 | 206 | VIPVE2RDX_0002_0001 | Used  |   1 |  30,398,466,009 |  
  7 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-20 23:18:28 |   655,859 |
 | 207 | VIPVE2RDX_0002_0002 | Used  |   1 |  30,536,528,886 |  
  7 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-21 23:17:39 |   742,210 |
 | 208 | VIPV

Re: [Bacula-users] Again vchanger and volumes in error...

2024-04-02 Thread Marco Gaiarin
Mandi! Marco Gaiarin
  In chel di` si favelave...

> This is not the case. This morning, many sites are in this situation:

Another situation; unmounted media have still some volumes available:

*list media pool=VEN-PS-PSPVE3RDXPool
Automatically selected Catalog: BaculaLNF
Using Catalog "BaculaLNF"
+-+-+---+-+-+--+--+-+--+---+---+-+--+-+---+
| mediaid | volumename  | volstatus | enabled | volbytes| 
volfiles | volretention | recycle | slot | inchanger | mediatype | voltype | 
volparts | lastwritten | expiresin |
+-+-+---+-+-+--+--+-+--+---+---+-+--+-+---+
| 799 | PSPVE3RDX__ | Used  |   1 |   2,055,666,329 |   
 0 |1,728,000 |   1 |1 | 1 | RDX   |   1 |0 
| 2024-03-27 23:03:25 | 1,259,685 |
| 800 | PSPVE3RDX__0001 | Used  |   1 | 782,853,422,640 |  
182 |1,728,000 |   1 |2 | 1 | RDX   |   1 |
0 | 2024-03-25 20:34:56 | 1,077,976 |
| 801 | PSPVE3RDX__0002 | Used  |   1 | 147,030,262,258 |   
34 |1,728,000 |   1 |3 | 1 | RDX   |   1 |0 
| 2024-03-27 16:31:13 | 1,236,153 |
| 802 | PSPVE3RDX__0003 | Used  |   1 |  73,871,190,756 |   
17 |1,728,000 |   1 |4 | 1 | RDX   |   1 |0 
| 2024-03-28 23:32:14 | 1,347,814 |
| 803 | PSPVE3RDX__0004 | Recycle   |   1 |   1 |   
 0 |1,728,000 |   1 |5 | 1 | RDX   |   1 |0 
| 2024-03-04 00:35:10 | 0 |
| 804 | PSPVE3RDX__0005 | Used  |   1 | 185,379,436,171 |   
43 |1,728,000 |   1 |6 | 1 | RDX   |   1 |0 
| 2024-03-05 00:34:35 | 0 |
| 805 | PSPVE3RDX__0006 | Used  |   1 | 185,251,434,340 |   
43 |1,728,000 |   1 |7 | 1 | RDX   |   1 |0 
| 2024-03-06 00:34:37 | 0 |
| 811 | PSPVE3RDX_0001_ | Used  |   1 | 955,217,562,058 |  
222 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-09 00:12:57 | 0 |
| 812 | PSPVE3RDX_0001_0001 | Used  |   1 | 185,102,461,821 |   
43 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-09 23:59:22 | 0 |
| 813 | PSPVE3RDX_0001_0002 | Used  |   1 | 185,101,930,892 |   
43 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-10 23:54:45 | 0 |
| 814 | PSPVE3RDX_0001_0003 | Used  |   1 | 185,011,713,135 |   
43 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-12 00:04:23 | 0 |
| 815 | PSPVE3RDX_0001_0004 | Used  |   1 | 184,559,761,454 |   
42 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-13 00:06:34 | 0 |
| 816 | PSPVE3RDX_0001_0005 | Used  |   1 | 172,811,713,748 |   
40 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-13 23:49:09 |52,829 |
| 817 | PSPVE3RDX_0001_0006 | Used  |   1 | 241 |   
 0 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| | 0 |
| 826 | PSPVE3RDX_0002_ | Used  |   1 | 843,288,831,988 |  
196 |1,728,000 |   1 |0 | 0 | RDX   |   1 |
0 | 2024-03-15 23:26:53 |   224,293 |
| 827 | PSPVE3RDX_0002_0001 | Used  |   1 |  73,656,253,125 |   
17 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-16 23:24:40 |   310,560 |
| 828 | PSPVE3RDX_0002_0002 | Used  |   1 | 124,449,804,394 |   
28 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-17 23:33:13 |   397,473 |
| 829 | PSPVE3RDX_0002_0003 | Used  |   1 |  73,587,452,944 |   
17 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-18 23:25:01 |   483,381 |
| 830 | PSPVE3RDX_0002_0004 | Used  |   1 |  74,050,230,884 |   
17 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-19 23:25:30 |   569,810 |
| 831 | PSPVE3RDX_0002_0005 | Used  |   1 |  73,596,170,099 |   
17 |1,728,000 |   1 |0 | 0 | RDX   |   1 |0 
| 2024-03-20 23:26:11 |   656,251 |
| 832 | PSPVE3RDX_0002_0006 | Used  |   1 | 241 |   
 0 |1,728,000 |   1 |0 | 0 | RDX   |   

[Bacula-users] Bacula 15.02 upgrade on Centos 7 -- Storage Daemon not starting

2024-04-02 Thread sruckh--- via Bacula-users
I have upgraded from 13.x to 15.02 on a CentOS 7 server by changing yum 
repository and running yum update.  After RPMs were upgraded, I ran the 
scripts to upgrade the MySQL database.  When I try to start bacula-sd 
using systemctl no errors are returned, but the storage daemon is not 
starting (as seen by running 'ps -ef | grep bacula' ).  Running 
journalctl for bacula-sd does not show that bacula-sd is failing.


The systemctl status for bacula-sd is returning the following:

 hostname removed to protect the innocent

● bacula-sd.service - Bacula Storage Daemon service
Loaded: loaded (/usr/lib/systemd/system/bacula-sd.service; enabled; 
vendor preset: disabled)

Active: inactive (dead) since Tue 2024-04-02 08:18:13 MST; 18min ago
Process: 4066 ExecStart=/opt/bacula/bin/bacula-sd -dt -c 
/opt/bacula/etc/bacula-sd.conf (code=exited, status=0/SUCCESS)

Main PID: 19946 (code=exited, status=1/FAILURE)

Apr 02 08:18:13 xxx.xxx.xxx systemd[1]: Starting Bacula Storage Daemon 
service...
Apr 02 08:18:13 xxx.xxx.xxx systemd[1]: Started Bacula Storage Daemon 
service.




There is nothing in the system logs that would help narrow down the 
problem.  There is also nothing logged in /opt/bacula/log/bacula.log 
that mentions problems with the storage daemon.


If the storage daemon is instead started manually from the command line 
(as root user) using the following command the storage daemon starts and 
does not terminate:


sudo /opt/bacula/bin/bacula-sd -d 200 -c /opt/bacula/etc/bacula-sd.conf

After running the above command and then starting Bacula director I was 
able to successfully run a job without errors.


When looking at the bacula-sd.service file it appears to be using a 
similar command (the one listed above in the status output) to start the 
storage daemon.


I see in the docs that cloud storage appears to be changing but is 
currently in beta.  It sounds like the S3 driver still works.  I have 
not made any changes to the bacula-sd.conf file at this time.


What other things can I look at to troubleshoot why the storage daemon 
does not stay running when started with the systemctl command?


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


Re: [Bacula-users] Bacula 15.02 upgrade on Centos 7 -- Storage Daemon not starting

2024-04-02 Thread Bill Arlofski via Bacula-users

On 4/2/24 9:54 AM, sruckh--- via Bacula-users wrote:
I have upgraded from 13.x to 15.02 on a CentOS 7 server by changing yum repository and running yum update.  After RPMs were 
upgraded, I ran the scripts to upgrade the MySQL database.  When I try to start bacula-sd using systemctl no errors are 
returned, but the storage daemon is not starting (as seen by running 'ps -ef | grep bacula' ).  Running journalctl for 
bacula-sd does not show that bacula-sd is failing.


The systemctl status for bacula-sd is returning the following:

 hostname removed to protect the innocent

● bacula-sd.service - Bacula Storage Daemon service
Loaded: loaded (/usr/lib/systemd/system/bacula-sd.service; enabled; vendor 
preset: disabled)
Active: inactive (dead) since Tue 2024-04-02 08:18:13 MST; 18min ago
Process: 4066 ExecStart=/opt/bacula/bin/bacula-sd -dt -c 
/opt/bacula/etc/bacula-sd.conf (code=exited, status=0/SUCCESS)
Main PID: 19946 (code=exited, status=1/FAILURE)

Apr 02 08:18:13 xxx.xxx.xxx systemd[1]: Starting Bacula Storage Daemon 
service...
Apr 02 08:18:13 xxx.xxx.xxx systemd[1]: Started Bacula Storage Daemon service.



There is nothing in the system logs that would help narrow down the problem.  There is also nothing logged in 
/opt/bacula/log/bacula.log that mentions problems with the storage daemon.


If the storage daemon is instead started manually from the command line (as 
root user) using the following command the storage daemon starts and does not 
terminate:

sudo /opt/bacula/bin/bacula-sd -d 200 -c /opt/bacula/etc/bacula-sd.conf



Hello,

More than likely, the above command is/was the initial cause of your problem.

The Bacula SD typically runs as the user 'bacula'.

Starting the SD as root (as shown above with the sudo command), will cause the SD to open its PID and state files (and any 
file volumes) as the root user.


Later, when you try to start it with systemd - which will run it as the bacula user - it will not have access to these files 
and will just silently fail to start.


Try testing the config file syntax first with this:

# sudo -u bacula /opt/bacula/bin/bacula-sd -t

That might/should fail with some read and/or write permissions on one or more files. If it does not fail, then start the SD 
in foreground more like:


# sudo -u bacula /opt/bacula/bin/bacula-sd -d100 -f

Then, `chown bacula:bacula` any files it complains about, and try again until 
it starts up and remains running.

Next, find any file volumes the SD may have written to when run from the 
command line previously and chown them too.

Then, ctrl-c the running bacula-sd, and try to start with systemd, it should 
work now.


Hope this helps,
Bill

--
Bill Arlofski
w...@protonmail.com



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula 15.02 upgrade on Centos 7 -- Storage Daemon not starting

2024-04-02 Thread Bill Arlofski via Bacula-users

Hello,

Glad we got this working. :)

Regarding any possible user:group changes, I guess you would have to contact the person who maintains the package for the 
CentOS 7 Linux distribution - And quite frankly, I am surprised that 15.0.2 is already available as it was *just* release 
some days ago. Kudos to the maintainer for being "Johnny on the Spot"™ :)


To fix everything, just figure out what user:group the Bacula SD is currently running as, make sure this combination has 
read/write access to all of the file volumes, and any directories/files (eg: /opt/bacula/working) and you should be all set.



P.S. I think it is time to upgrade/migrate from CentOS 7  ;)


Best regards,
Bill

--
Bill Arlofski
w...@protonmail.com



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula 15.02 upgrade on Centos 7 -- Storage Daemon not starting

2024-04-02 Thread sruckh--- via Bacula-users

On 2024-04-02 10:17, Bill Arlofski via Bacula-users wrote:


On 4/2/24 9:54 AM, sruckh--- via Bacula-users wrote:

I have upgraded from 13.x to 15.02 on a CentOS 7 server by changing 
yum repository and running yum update.  After RPMs were upgraded, I 
ran the scripts to upgrade the MySQL database.  When I try to start 
bacula-sd using systemctl no errors are returned, but the storage 
daemon is not starting (as seen by running 'ps -ef | grep bacula' ).  
Running journalctl for bacula-sd does not show that bacula-sd is 
failing.


The systemctl status for bacula-sd is returning the following:

 hostname removed to protect the innocent

● bacula-sd.service - Bacula Storage Daemon service
Loaded: loaded (/usr/lib/systemd/system/bacula-sd.service; enabled; 
vendor preset: disabled)

Active: inactive (dead) since Tue 2024-04-02 08:18:13 MST; 18min ago
Process: 4066 ExecStart=/opt/bacula/bin/bacula-sd -dt -c 
/opt/bacula/etc/bacula-sd.conf (code=exited, status=0/SUCCESS)

Main PID: 19946 (code=exited, status=1/FAILURE)

Apr 02 08:18:13 xxx.xxx.xxx systemd[1]: Starting Bacula Storage Daemon 
service...
Apr 02 08:18:13 xxx.xxx.xxx systemd[1]: Started Bacula Storage Daemon 
service.




There is nothing in the system logs that would help narrow down the 
problem.  There is also nothing logged in /opt/bacula/log/bacula.log 
that mentions problems with the storage daemon.


If the storage daemon is instead started manually from the command 
line (as root user) using the following command the storage daemon 
starts and does not terminate:


sudo /opt/bacula/bin/bacula-sd -d 200 -c 
/opt/bacula/etc/bacula-sd.conf


Hello,

More than likely, the above command is/was the initial cause of your 
problem.


The Bacula SD typically runs as the user 'bacula'.

Starting the SD as root (as shown above with the sudo command), will 
cause the SD to open its PID and state files (and any file volumes) as 
the root user.


Later, when you try to start it with systemd - which will run it as the 
bacula user - it will not have access to these files and will just 
silently fail to start.


Try testing the config file syntax first with this:

# sudo -u bacula /opt/bacula/bin/bacula-sd -t


This showed that there were permissions problems with the bacula-sd.conf 
file.  My bacula-sd.conf file was owned by root:disk, the 
bacula-sd.conf.rpmnew file is owned by root:tape.  The groups for id 
bacula are: (bacula) (tape).  All of my previous volumes are owned by 
bacula:disk.


Did group membership of the bacula user change in the 15.02 upgrade?

I am now wondering if the correct thing to do is add bacula user to 
group disk, or to change group on all the files to tape??  I don't know 
what the group membership of the bacula user was before the upgrade.


That might/should fail with some read and/or write permissions on one 
or more files. If it does not fail, then start the SD in foreground 
more like:


# sudo -u bacula /opt/bacula/bin/bacula-sd -d100 -f

Then, `chown bacula:bacula` any files it complains about, and try again 
until it starts up and remains running.


Next, find any file volumes the SD may have written to when run from 
the command line previously and chown them too.


Then, ctrl-c the running bacula-sd, and try to start with systemd, it 
should work now.


Thank you for providing debugging commands.  As this is the first time I 
have run into this issue through various upgrades, I am wondering what 
changed in this particular upgrade.___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Bacula support LTO9?

2024-04-02 Thread Jose Alberto
Hi.

I work with Bacula (11 and 13)  with lto8,  all fine.

with bacula 13 or 15   work  LTO9 ?


-- 
#
#   Sistema Operativo: Debian  #
#Caracas, Venezuela  #
#
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula support LTO9?

2024-04-02 Thread Rob Gerber
Bacula should work with LTO 9 just fine. I would be very surprised if it
had issues with LTO 9. Some users on the mailing list have mentioned that
they use LTO 9.



Robert Gerber
402-237-8692
r...@craeon.net

On Tue, Apr 2, 2024, 4:53 PM Jose Alberto  wrote:

> Hi.
>
> I work with Bacula (11 and 13)  with lto8,  all fine.
>
> with bacula 13 or 15   work  LTO9 ?
>
>
> --
> #
> #   Sistema Operativo: Debian  #
> #Caracas, Venezuela  #
> #
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Backup in disk AND tape

2024-04-02 Thread Roberto Greiner

Hi,

I've installed Bacula recently in a server with a 7TB RAID5 storage, and 
a LTO-6 tape unit.


I have configured 9 remote servers (most Linux, one Windows) to have the 
backup made in this server in the disk storage, and I'm finish to 
understand how to do the tape backup. Now, I have a question about 
making the backup into both destinations.


I have the following setup for JobsDef:

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = bacula2-fd
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = FileAligned
  Messages = Standard
  Pool = File
  SpoolAttributes = yes
  Priority = 10
  Write Bootstrap = "/opt/bacula/working/%c.bsr"
}

Then I added a server to have the backup, let's say (it's a linux, 
despite the name):


Job {
  Name = "AD"
  JobDefs = "DefaultJob"
  Client = ad-fd
  FileSet = "etc"
}

This will, obviously go to the dedup-disk storage. The question is, how 
should I add the tape setup? Is there a way to add a couple of lines to 
the job definition above so that the backup goes to both systems? Should 
I create a separate job definition for the tape backup? Some other way I 
didn't consider?


Thanks,

Roberto


PS: The storage definitions for the disk and tape destinations:

Storage {
  Name = FileAligned
  Address = bacula2
  SDPort = 9103
  Password = ""
  Device = Aligned-Disk
  Media Type = File1
}

Storage {
  Name = Fita
  Address = bacula2
  SDPort = 9103
  Password = ""
  Device = Ultrium
  Media Type = LTO
}




--
-
Marcos Roberto Greiner

   Os otimistas acham que estamos no melhor dos mundos
Os pessimistas tem medo de que isto seja verdade
 James Branch Cabell
  -



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


[Bacula-users] Bacularis API host initial setup with postgresql and bacula.

2024-04-02 Thread Rob Gerber
I have previously set up bacula and bacularis on Rocky Linux 9. At the time
I ran into issues giving bacularis access to bacula's postgresql database.
I didn't know the bacula database password. At that time I set the
postgresql pg_hba.conf file to use "trust". However I am concerned that
this isn't a good security best practice.

I am setting up a second bacula / Bacularis system and I'd like to revisit
this postgres authentication issue so I can follow best practice better.

The bacularis documentation doesn't make it clear how I am supposed to
authenticate bacularis to bacula's database.

I suspect there is a process that is obvious to many others and not to me.

Does anyone here have suggestions for how I might authenticate bacularis to
the bacula database?

Robert Gerber
402-237-8692
r...@craeon.net
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Backup in disk AND tape

2024-04-02 Thread Bill Arlofski via Bacula-users

On 4/2/24 12:01 PM, Roberto Greiner wrote:

Hi,

I've installed Bacula recently in a server with a 7TB RAID5 storage, and
a LTO-6 tape unit.

I have configured 9 remote servers (most Linux, one Windows) to have the
backup made in this server in the disk storage, and I'm finish to
understand how to do the tape backup. Now, I have a question about
making the backup into both destinations.

I have the following setup for JobsDef:

JobDefs {
    Name = "DefaultJob"
    Type = Backup
    Level = Incremental
    Client = bacula2-fd
    FileSet = "Full Set"
    Schedule = "WeeklyCycle"
    Storage = FileAligned
    Messages = Standard
    Pool = File
    SpoolAttributes = yes
    Priority = 10
    Write Bootstrap = "/opt/bacula/working/%c.bsr"
}

Then I added a server to have the backup, let's say (it's a linux,
despite the name):

Job {
    Name = "AD"
    JobDefs = "DefaultJob"
    Client = ad-fd
    FileSet = "etc"
}

This will, obviously go to the dedup-disk storage. The question is, how
should I add the tape setup? Is there a way to add a couple of lines to
the job definition above so that the backup goes to both systems? Should
I create a separate job definition for the tape backup? Some other way I
didn't consider?

Thanks,

Roberto


PS: The storage definitions for the disk and tape destinations:

Storage {
    Name = FileAligned
    Address = bacula2
    SDPort = 9103
    Password = ""
    Device = Aligned-Disk
    Media Type = File1
}

Storage {
    Name = Fita
    Address = bacula2
    SDPort = 9103
    Password = ""
    Device = Ultrium
    Media Type = LTO
}


Hello Marcos,

With Bacula, there are almost always 10+ different ways to accomplish things, 
and/or to even think about them.

For example, you can override the Pool, Level, and Storage in a Schedule...

So, with this in mind, you might set your job to run Incs each weekday to disk, and then set the Fulls to run to tape on the 
weekend. (just one idea)


Another option is to use Copy jobs. With Copy jobs, you can run your Incs and Fulls to disk, then you can run a Copy job to 
copy your Incs, Fulls, or both to tape during normal working hours because Copy jobs do not make use of any Clients, so 
business productivity will not be affected on your server(s).


In your case, I would probably go with a Copy job. This way, you have your backups on disk for fast restores when needed, and 
you have the same data copied to new jobids onto tape - maybe with longer retention periods, for example.


Also have a look at the `SelectionType = PoolUncopiedJobs` feature for Copy jobs. This is a nice, handy "shortcut" to make 
sure that each of your jobs in some Pool is copied once, and only once to tape.


In this case, you can have two Copy jobs configured, one looking at your Full disk pool and one looking at your Inc disk pool 
and copying jobs that have not been copied.


OR, you can have one copy job running on a schedule where the Pool is overridden at two different times of the day to copy 
from the Full disk pool, and then also from the Inc disk pool.


OR... (lol I said 10, so I am working towards that number, and I am getting close :) ... You can have your normal backup jobs 
include a `RunScript {RunsWhen = after}` section which triggers an immediate copy of the job to tape as soon as it is completed.


So, I would start with a look at Copy jobs and see where that goes. :)

Feel free to ask more questions once you have taken a look at Copy jobs.


Hope this helps,
Bill

--
Bill Arlofski
w...@protonmail.com



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Any suggestions for fail2ban jail for Bacula Director ?

2024-04-02 Thread MylesDearBusiness via Bacula-users
I nailed this.

I created a cron job that, every ten minutes or so, runs "journalctl -u 
bacula-dir > /opt/bacula/log/bacula-dir-journal.log" (since I opened 
bacula-dir's firewall port up to the public internet).

I then created a fail2ban jail that scanned for authentication failure patterns 
and banned (via temporary firewall rules) users who repeatedly failed to log in 
successfully.

root:/etc/fail2ban/jail.d# cat bacula.conf
[bacula]
enabled = true
port = 9101
filter = bacula
logpath = /opt/bacula/log/bacula-dir-journal.log
maxretry = 10
findtime = 3600
bantime = 900
action = iptables-allports

root:/etc/fail2ban/filter.d# cat /etc/fail2ban/filter.d/bacula.conf

# Fail2Ban filter for Bacula Director
[Definition]
failregex = Hello from client: is invalid
ignoreregex =

root:/etc/fail2ban/filter.d#

Best,



On 2023-12-04 12:22 p.m., MylesDearBusiness wrote:

> Hello,
>
> I just installed Bacula director on one of my cloud servers.
>
> I have set the firewall to allow traffic in/out of port 9101 to allow it to 
> be utilized to orchestrate remote backups as well.
>
> What I want to do is to identify the potential attack surface and create a 
> fail2ban jail configuration.
>
> Does anybody have an exemplar that I can work with?
>
> Also, is there a way to simulate a failed login attempt with a tool such as 
> netcat? I could possibly use PostMan and dig into the REST API spec, but I 
> was hoping the community would be able to shortcut this effort.
>
> What say you?
>
> Thanks,
>
> ___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula support LTO9?

2024-04-02 Thread Bill Arlofski via Bacula-users

On 4/2/24 3:52 PM, Jose Alberto wrote:

Hi.

I work with Bacula (11 and 13)  with lto8,  all fine.

with bacula 13 or 15   work  LTO9 ?


Yes.  ;)

You may want to run some tests using btape to find the right `MaximumFileSize` and `MaximumBlockSize` for your tape drive(s), 
but I can assure you (personally working in Quantum's lab testing Bacula with their latest Scalar i6000 library and LTO9 
drives), Bacula absolutely works fine with them.


The settings I found that work quite well with LTO9 drives (with 10+ concurrent 
backup streams) are:
8<
MaximumFileSize = 32GB
MaximumBlockSize = 2097152
8<

I have also attached a script I wrote to automate the testing of several file 
and block size combinations using btape.

Please have a look and be sure to read the btape documentation to understand what is going on before running the script - 
also there are variable settings at the top you will need to edit to fit your environment.



Hope this helps,
Bill

--
Bill Arlofski
w...@protonmail.com


tape_speed_tests.sh
Description: application/shellscript


signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacularis API host initial setup with postgresql and bacula.

2024-04-02 Thread Marcin Haba
Hello Rob,

Thanks for your question.

As the authentication method in PostgreSQL pg_hba.conf you can use
scram-sha-256 This method is available starting from PostgreSQL 10.

For the Bacularis documentation, yes, it looks to be missing there. I will
add to the doc this section about configuring the Catalog Database access
in Bacularis. Thanks for pointing it.

Best regards,
Marcin Haba (gani)

On Wed, 3 Apr 2024 at 00:50, Rob Gerber  wrote:

> I have previously set up bacula and bacularis on Rocky Linux 9. At the
> time I ran into issues giving bacularis access to bacula's postgresql
> database. I didn't know the bacula database password. At that time I set
> the postgresql pg_hba.conf file to use "trust". However I am concerned that
> this isn't a good security best practice.
>
> I am setting up a second bacula / Bacularis system and I'd like to revisit
> this postgres authentication issue so I can follow best practice better.
>
> The bacularis documentation doesn't make it clear how I am supposed to
> authenticate bacularis to bacula's database.
>
> I suspect there is a process that is obvious to many others and not to me.
>
> Does anyone here have suggestions for how I might authenticate bacularis
> to the bacula database?
>
> Robert Gerber
> 402-237-8692
> r...@craeon.net
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>


-- 

"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacularis API host initial setup with postgresql and bacula.

2024-04-02 Thread Marcin Haba
Hello Rob,

At the moment I prepared a section about the authentication methods in the
Bacularis documentation. You can read it here:

https://bacularis.app/doc/brief/configuration.html#bacula-catalog-database-access

Best regards,
Marcin Haba (gani)

On Wed, 3 Apr 2024 at 04:51, Marcin Haba  wrote:

> Hello Rob,
>
> Thanks for your question.
>
> As the authentication method in PostgreSQL pg_hba.conf you can use
> scram-sha-256 This method is available starting from PostgreSQL 10.
>
> For the Bacularis documentation, yes, it looks to be missing there. I will
> add to the doc this section about configuring the Catalog Database access
> in Bacularis. Thanks for pointing it.
>
> Best regards,
> Marcin Haba (gani)
>
> On Wed, 3 Apr 2024 at 00:50, Rob Gerber  wrote:
>
>> I have previously set up bacula and bacularis on Rocky Linux 9. At the
>> time I ran into issues giving bacularis access to bacula's postgresql
>> database. I didn't know the bacula database password. At that time I set
>> the postgresql pg_hba.conf file to use "trust". However I am concerned that
>> this isn't a good security best practice.
>>
>> I am setting up a second bacula / Bacularis system and I'd like to
>> revisit this postgres authentication issue so I can follow best practice
>> better.
>>
>> The bacularis documentation doesn't make it clear how I am supposed to
>> authenticate bacularis to bacula's database.
>>
>> I suspect there is a process that is obvious to many others and not to me.
>>
>> Does anyone here have suggestions for how I might authenticate bacularis
>> to the bacula database?
>>
>> Robert Gerber
>> 402-237-8692
>> r...@craeon.net
>> ___
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>
>
> --
>
> "Greater love hath no man than this, that a man lay down his life for his 
> friends." Jesus Christ
>
> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie za 
> przyjaciół swoich." Jezus Chrystus
>
>

-- 

"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users