Bareos - Backup Archiving REcovery?

Is anyone here using Bareos or willing to implement it ?

edit:

2 Likes

a howto that should work https://www.osradar.com/install-bareos-on-centos-7/

Not sure the UI of this project is really enhanced, last time I saw it, I felt something not terminated, but the backup engine behind is professional.

4 Likes

I’m actually testing it, seems to work with a Windows client, at least it recognizes it.

Quick install:

# download repo file and install packages
wget -O /etc/yum.repos.d/bareos.repo http://download.bareos.org/bareos/release/latest/CentOS_7/bareos.repo
yum -y install nethserver-mysql bareos bareos-database-mysql bareos-webui

# configure database
/usr/lib/bareos/scripts/create_bareos_database
/usr/lib/bareos/scripts/make_bareos_tables
/usr/lib/bareos/scripts/grant_bareos_privileges

# setup admin
cp /etc/bareos/bareos-dir.d/console/admin.conf.example /etc/bareos/bareos-dir.d/console/admin.conf

# services
systemctl enable bareos-dir bareos-sd bareos-fd --now
systemctl reload httpd

# firewall
config set bareos service TCPPorts 9101,9102,9103 access green status enabled
signal-event firewall-adjust

Browse to https://nethserver/bareos-webui
User: admin
Password: admin

Source:
https://www.svennd.be/bareos-articles/

5 Likes

Great job Markus and Stéphane, thank you for that. I will test it in a few days… :ok_hand:

2 Likes

Tried to backup a win10 vm, but got errors:

2019-03-08 13:51:21 bareos-dir JobId 3:  Encryption: PSK-AES256-CBC-SHA
2019-03-08 13:51:21 bareos-dir JobId 3:  Handshake: Immediate TLS 
2019-03-08 13:51:21 bareos-dir JobId 3: Connected Client: win10v-fd at win10v.mydomain.lan:9102, encryption: PSK-AES256-CBC-SHA
2019-03-08 13:51:21 bareos-dir JobId 3: Using Device "FileStorage" to write.
2019-03-08 13:51:21 bareos-dir JobId 3: Connected Storage daemon at neth1:9103, encryption: PSK-AES256-CBC-SHA
2019-03-08 13:51:21 bareos-dir JobId 3: Start Backup JobId 3, Job=backup-bareos-fd.2019-03-08_13.51.18_35
2019-03-08 13:51:18 bareos-dir JobId 3: No prior or suitable Full backup found in catalog. Doing FULL backup.
2019-03-08 13:51:18 bareos-dir JobId 3: No prior Full backup Job record found.
2019-03-08 11:40:33 bareos-dir JobId 2: Error: Bareos bareos-dir 18.2.5 (30Jan19):
  Build OS:               Linux-4.4.92-6.18-default redhat CentOS Linux release 7.6.1810 (Core) 
  JobId:                  2
  Job:                    backup-bareos-fd.2019-03-08_11.07.26_55
  Backup Level:           Full (upgraded from Incremental)
  Client:                 "win10v-fd" 18.2.5 (30Jan19) Microsoft Windows 8 Professional (build 9200), 64-bit,Cross-compile,Win64
  FileSet:                "SelfTest" 2019-03-08 11:07:26
  Pool:                   "Full" (From Job FullPool override)
  Catalog:                "MyCatalog" (From Client resource)
  Storage:                "File" (From command line)
  Scheduled time:         08-Mar-2019 11:10:20
  Start time:             08-Mar-2019 11:10:22
  End time:               08-Mar-2019 11:40:33
  Elapsed time:           30 mins 11 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:                    yes
  Encryption:             no
  Accurate:               no
  Volume name(s):         
  Volume Session Id:      2
  Volume Session Time:    1552038971
  Last Volume Bytes:      0 (0 B)
  Non-fatal FD errors:    2
  SD Errors:              0
  FD termination status:  Fatal Error
  SD termination status:  Waiting on FD
  Bareos binary info:     bareos.org build: Get official binaries and vendor support on bareos.com
  Termination:            *** Backup Error ***

2019-03-08 11:40:33 bareos-dir JobId 2: Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage

2019-03-08 11:40:32 win10v-fd JobId 2: Fatal error: Failed to connect to Storage daemon: neth1:9103
2019-03-08 11:40:32 win10v-fd JobId 2: Fatal error: lib/bsock_tcp.cc:139 Unable to connect to Storage daemon on neth1:9103. ERR=Der Vorgang wurde erfolgreich beendet.

2019-03-08 11:39:05 win10v-fd JobId 2: Warning: lib/bsock_tcp.cc:133 Could not connect to Storage daemon on neth1:9103. ERR=Der Vorgang wurde erfolgreich beendet.

Retrying ...
2019-03-08 11:33:23 win10v-fd JobId 2: Warning: lib/bsock_tcp.cc:133 Could not connect to Storage daemon on neth1:9103. ERR=Der Vorgang wurde erfolgreich beendet.

Retrying ...
2019-03-08 11:27:41 win10v-fd JobId 2: Warning: lib/bsock_tcp.cc:133 Could not connect to Storage daemon on neth1:9103. ERR=Der Vorgang wurde erfolgreich beendet.

Retrying ...
2019-03-08 11:21:59 win10v-fd JobId 2: Warning: lib/bsock_tcp.cc:133 Could not connect to Storage daemon on neth1:9103. ERR=Der Vorgang wurde erfolgreich beendet.

Retrying ...
2019-03-08 11:16:16 win10v-fd JobId 2: Warning: lib/bsock_tcp.cc:133 Could not connect to Storage daemon on neth1:9103. ERR=Der Vorgang wurde erfolgreich beendet.

Retrying ...
2019-03-08 11:10:34 win10v-fd JobId 2: Warning: lib/bsock_tcp.cc:133 Could not connect to Storage daemon on neth1:9103. ERR=Der Vorgang wurde erfolgreich beendet.

Retrying ...
2019-03-08 11:10:22 win10v-fd JobId 2: Created 27 wildcard excludes from FilesNotToBackup Registry key
2019-03-08 11:10:22 bareos-dir JobId 2:  Encryption: PSK-AES256-CBC-SHA
2019-03-08 11:10:22 bareos-dir JobId 2:  Handshake: Immediate TLS 
2019-03-08 11:10:22 bareos-dir JobId 2: Connected Client: win10v-fd at win10v.netztechnik.lan:9102, encryption: PSK-AES256-CBC-SHA
2019-03-08 11:10:22 bareos-dir JobId 2: Using Device "FileStorage" to write.
2019-03-08 11:10:22 bareos-dir JobId 2: Created new Volume "Full-0002" in catalog.
2019-03-08 11:10:22 bareos-dir JobId 2: Connected Storage daemon at neth1:9103, encryption: PSK-AES256-CBC-SHA
2019-03-08 11:10:22 bareos-dir JobId 2: Start Backup JobId 2, Job=backup-bareos-fd.2019-03-08_11.07.26_55
2019-03-08 11:08:26 bareos-dir JobId 1: shell command: run AfterJob "/usr/lib/bareos/scripts/delete_catalog_backup"
2019-03-08 11:08:26 bareos-dir JobId 1: Bareos bareos-dir 18.2.5 (30Jan19):
  Build OS:               Linux-4.4.92-6.18-default redhat CentOS Linux release 7.6.1810 (Core) 
  JobId:                  1
  Job:                    BackupCatalog.2019-03-08_11.06.29_47
  Backup Level:           Full
  Client:                 "bareos-fd" 18.2.5 (30Jan19) Linux-4.4.92-6.18-default,redhat,CentOS Linux release 7.6.1810 (Core) ,CentOS_7,x86_64
  FileSet:                "Catalog" 2019-03-08 11:06:29
  Pool:                   "Incremental" (From command line)
  Catalog:                "MyCatalog" (From Client resource)
  Storage:                "File" (From command line)
  Scheduled time:         08-Mar-2019 11:08:21
  Start time:             08-Mar-2019 11:08:25
  End time:               08-Mar-2019 11:08:25
  Elapsed time:           0 secs
  Priority:               11
  FD Files Written:       72
  SD Files Written:       72
  FD Bytes Written:       44,258 (44.25 KB)
  SD Bytes Written:       52,785 (52.78 KB)
  Rate:                   0.0 KB/s
  Software Compression:   None
  VSS:                    no
  Encryption:             no
  Accurate:               no
  Volume name(s):         Incremental-0001
  Volume Session Id:      1
  Volume Session Time:    1552038971
  Last Volume Bytes:      55,236 (55.23 KB)
  Non-fatal FD errors:    0
  SD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Bareos binary info:     bareos.org build: Get official binaries and vendor support on bareos.com
  Termination:            Backup OK

2019-03-08 11:08:25 bareos-dir JobId 1: Insert of attributes batch table done
2019-03-08 11:08:25 bareos-dir JobId 1: Insert of attributes batch table with 8 entries start
2019-03-08 11:08:25 bareos-sd JobId 1: Elapsed time=00:00:01, Transfer rate=52.78 K Bytes/second
2019-03-08 11:08:25 bareos-sd JobId 1: Releasing device "FileStorage" (/var/lib/bareos/storage).
2019-03-08 11:08:25 bareos-sd JobId 1: Wrote label to prelabeled Volume "Incremental-0001" on device "FileStorage" (/var/lib/bareos/storage)
2019-03-08 11:08:25 bareos-sd JobId 1: Labeled new Volume "Incremental-0001" on device "FileStorage" (/var/lib/bareos/storage).
2019-03-08 11:08:25 neth1-fd JobId 1: ACL support is enabled
2019-03-08 11:08:25 neth1-fd JobId 1: Extended attribute support is enabled
2019-03-08 11:08:25 neth1-fd JobId 1: Connected Storage daemon at neth1:9103, encryption: PSK-AES256-CBC-SHA
2019-03-08 11:08:25 bareos-dir JobId 1:  Encryption: PSK-AES256-CBC-SHA
2019-03-08 11:08:25 bareos-dir JobId 1:  Handshake: Immediate TLS 
2019-03-08 11:08:25 bareos-dir JobId 1: Connected Client: bareos-fd at localhost:9102, encryption: PSK-AES256-CBC-SHA
2019-03-08 11:08:25 bareos-dir JobId 1: Using Device "FileStorage" to write.
2019-03-08 11:08:25 bareos-dir JobId 1: Created new Volume "Incremental-0001" in catalog.
2019-03-08 11:08:25 bareos-dir JobId 1: Connected Storage daemon at neth1:9103, encryption: PSK-AES256-CBC-SHA
2019-03-08 11:08:25 bareos-dir JobId 1: Start Backup JobId 1, Job=BackupCatalog.2019-03-08_11.06.29_47
2019-03-08 11:08:23 bareos-dir JobId 1: shell command: run BeforeJob "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog"
2019-03-08 11:07:26 bareos-dir JobId 2: Job backup-bareos-fd.2019-03-08_11.07.26_55 waiting 174 seconds for scheduled start time.
2019-03-08 11:07:26 bareos-dir JobId 2: No prior or suitable Full backup found in catalog. Doing FULL backup.
2019-03-08 11:07:26 bareos-dir JobId 2: No prior Full backup Job record found.
2019-03-08 11:06:29 bareos-dir JobId 1: Job BackupCatalog.2019-03-08_11.06.29_47 waiting 112 seconds for scheduled start time.

Just a blind shot, do the tcp ports are opened on the remote client and the server?

2 Likes

Oops, seems I forgot the firewall config, I edited my post.

4 Likes

Thank you, looks much better now:

Many thanks!

I truly believe we should document modules and how-to’s on the wiki. A progessive forum with thousands of edits, readings and catch up does not cut it for me.

1 Like

Does this solution have more options than (for instance) BackupPC?
Are backups stored encrypted?
I will read some on the project site, but anyone knows what happens if a backup is skipped? Will it be picked up at another moment?

This bothers me a bit when it comes to updates and reliability:
Updates and Bugfix releases
Community version: (Source code only)
Professional version: Available on download.bareos.com

BTW… bareos is a fork from bacula

2 Likes

I asked and repeated it so much time but it seems this community prefers discourse to make howtos :slight_smile:

1 Like

Yes, on the end of the day. ATM we are on the way. A 50% Wiki does’nt make sense ?

I would like to see a “one for all” solution. I try to find a software who is able to backup linux, windows and mac-clients. ATM I am not sure if this is working for my OSs (win10, win7, manjaro, ubuntu, mac-os (mojave). Lets try it out ?

1 Like

You are also right… Maybe we should start a wiki-day (one time per month) ?

I’ll doe wiki day any day, as long as people are willng to share

Come on @stephdl, you know that is not how it works. We have quite a nice and straightforward procedure on new features and howto’s.

  • do a feature request in the Features section Here we investigate other, similar options and if the feature can count on support in the community
  • create a howto install on NethServer in the Howto section Here the howto is created and polished. As soon the howto is 100% reproducable, it gets a spot in our wiki
  • last step will be full integration as a module.

So my call to all community members would be: help us out here and do some cleaning up. Check if howto’s in the forums still are relevant and if they are not yet in the wiki, start writing those wiki entry’s.

3 Likes
MariaDB [(none)]>  SELECT User, Host, Password FROM mysql.user; 
+--------+-----------+-------------------------------------------+
| User   | Host      | Password                                  |
+--------+-----------+-------------------------------------------+
| root   | localhost | *B98B40D7068924E82DB41D25DEA82693389752A5 |
| bareos | 127.0.0.1 |                                           |
| root   | 127.0.0.1 | *B98B40D7068924E82DB41D25DEA82693389752A5 |
| root   | ::1       | *B98B40D7068924E82DB41D25DEA82693389752A5 |
| bareos | ::1       |                                           |
| bareos | localhost |                                           |
+--------+-----------+-------------------------------------------+

we can see that after the installation the user bareos has no password set, I worry about security here :-?

we could set afterward the password to this MYSQL user

mysql;
grant all privileges on bareos.* to 'bareos'@'localhost' identified by 'password' ;

then set the password in /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf

4 Likes

Very good find!

Hi Steph just a small note if i may.
From what i remember (i might have forgot things), note that 127.0.0.1 or ::1 is not the same as “localhost” in mysql or MariaDB
So, bareos user will still be without password in 2 instances out of 3

And as always you do a great job :+1:

Best regards
Bogdan

2 Likes

Just as a reference, here’s also talk about using localhost and 127.0.0.1

1 Like

MariaDB/MySQL have never been preferred DB backends for Bareos. Please use Postgres.

https://docs.bareos.org/IntroductionAndTutorial/InstallingBareos.html#decide-about-the-database-backend

1 Like