/
OperatingSystems.rst
664 lines (405 loc) · 25.7 KB
/
OperatingSystems.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
.. _SupportedOSes:
Operating Systems
=================
.. index::
pair: Operating Systems; Support
The Bareos project provides packages that have been released on http://download.bareos.org/bareos/release/.
Additionally, the following table gives an overview on the available package versions and the operating systems, respectively:
.. csv-table::
:header: "Operating Systems", "Version", "Client Daemon", "Director Daemon" , "Storage Daemon"
:strong:`Linux` :index:`\ <single: Platform; Linux>`\
Arch Linux :index:`\ <single: Platform; Arch Linux>`\ , `X <https://aur.archlinux.org/pkgbase/bareos/>`__, `X <https://aur.archlinux.org/pkgbase/bareos/>`__, `X <https://aur.archlinux.org/pkgbase/bareos/>`__
CentOS, current, v12.4, v12.4, v12.4
Debian, current, v12.4, v12.4, v12.4
Fedora, current, v12.4, v12.4, v12.4
Gentoo :index:`\ <single: Platform; Gentoo>`\ , `X <https://packages.gentoo.org/packages/app-backup/bareos>`__, `X <https://packages.gentoo.org/packages/app-backup/bareos>`__, `X <https://packages.gentoo.org/packages/app-backup/bareos>`__
openSUSE, current, v12.4, v12.4, v12.4
RHEL, current, v12.4, v12.4, v12.4
SLES, current, v12.4, v12.4, v12.4
Ubuntu, current, v12.4, v12.4, v12.4
:ref:`Univention Corporate Linux <section-UniventionCorporateServer>`, App Center, v12.4, v12.4, v12.4
:strong:`MS Windows`
:ref:`MS Windows <section-windows>` 32bit, 10/8/7, v12.4, v15.2, v15.2
, 2008/Vista/2003/XP, v12.4–v14.2
:ref:`MS Windows <section-windows>` 64bit, 10/8/2012/7, v12.4, v15.2, v15.2
, 2008/Vista, v12.4–v14.2
:strong:`Mac OS`
:ref:`Mac OS X/Darwin <section-macosx>`, v14.2
:strong:`BSD`
:ref:`FreeBSD <section-FreeBSD>` :index:`\ <single: Platform; FreeBSD>`\ , >= 11, v19.2, v19.2, v19.2
OpenBSD, , X
NetBSD, , X
:strong:`Unix`
AIX :index:`\ <single: Platform; AIX>`\ , >= 4.3, com-13.2, \*, \*
HP-UX :index:`\ <single: Platform; HP-UX>`\ , , com-13.2
:ref:`Solaris <section-Solaris>` (i386/Sparc) :index:`\ <single: Platform; Solaris>`\ , >= 11 , com-12.4, com-12.4, com-12.4
============ =============================================================================================================================
**vVV.V** starting with Bareos version VV.V, this platform is official supported by the Bareos.org project
**com-VV.V** starting with Bareos version VV.V, this platform is supported. However, pre-build packages are only available from Bareos.com
**X** known to work
**\*** has been reported to work by the community
============ =============================================================================================================================
Linux
-----
.. _section-UniversalLinuxClient:
Universal Linux Client
~~~~~~~~~~~~~~~~~~~~~~
The Bareos project provides packages
for the current releases of all major Linux distributions.
In order to support even more platforms
Bareos :sinceVersion:`21.0.0: Universal Linux Client (ULC)`
provides the so called **Universal Linux Client (ULC)**.
The Universal Linux Client is a |fd|,
built in a way to have minimal dependencies to other libraries.
.. note::
The **Universal Linux Client** depends on the **OpenSSL** library
of the host in order to utilize security updates for this library.
It incorporates all functionality for normal backup and restore operations,
however it has only limited plugin support.
Currently it is provided as a Debian package.
However, it is planed to provide it also in other formats.
The ULC have extra repositories, their names starting with **ULC_**
(e.g. **ULC_deb_OpenSSL_1.1**)
at https://download.bareos.org/bareos/release/.
There will be different repositories depending on packaging standard
and remaining dependencies.
These repositories contain the **bareos-universal-client** package
and sometimes their corresponding debug package.
You can either add the repository to your system
or only download and install the package file.
One of ULC's goals is to support new platforms
for which native packages are not yet available.
As soon as native packages are available,
their repository can be added
and on an update the ULC package
will be seamlessly replaced by the normal |fd| package.
No change to the Bareos configuration is required.
.. warning::
While ULC packages are designed to run on as many Linux platforms as possible,
they should only be used
if this platform is not directly supported by the Bareos project.
When available, native packages should be preferred.
Feature overview:
* Single package installation
* Repository based installation
* Minimal dependencies to system libraries (except OpenSSL)
* Uses host OpenSSL library
* Replaceable by the normal |fd|. No configuration change required.
.. _section-UniventionCorporateServer:
Univention Corporate Server
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. index::
single: Platform; Univention Corporate Server
The Bareos version for the Univention App Center integraties into the Univention Enterprise Linux environment, making it easy to backup all the systems managed by the central Univention Corporate Server.
Preamble
^^^^^^^^
The `Univention Corporate Server <https://www.univention.de/>`_ is an enterprise Linux distribution based on Debian. It consists of an integrated management system for the centralised administration of servers, computer workplaces, users and their rights as well as a wide range of server applications. It also includes an Unvention App Center for the easy installation and management of extensions and appliances.
Bareos is part of the `App Center <https://www.univention.de/produkte/univention-app-center/app-katalog/bareos/>`_ and therefore an Univention environment can easily be extended to provide backup functionality for the Univention servers as well as for the connected client systems. Using the Univention Management Console (UMC), you can also create backup jobs for client computers (Windows or Linux systems), without the need of editing configuration files.
The Bareos Univention App is shipped with a default configuration for the director daemon and the storage daemon.
.. warning::
You need to review some Univention configuration registry (UCR) variables. Most likely, you will want to set the location where the backups are stored. Otherwise, you may quickly run out of disk space on your backup server!
You will find further information under :ref:`section-UniventionBackupStorage`.
Quick Start
^^^^^^^^^^^
- Determine the space requirements and where to store your backup data
- Set the :strong:`bareos/*` UCR variables according to your needs, see :ref:`section-UCR`
- Restart :command:`bareos-dir`, :command:`bareos-sd` and :command:`bareos-fd` (or simply reboot the server)
- Install the Bareos file daemon on clients and copy Director configuration resource file from
- :file:`/etc/bareos/bareos-dir-export/client/<clientname>-fd/bareos-fd.d/director/*.conf`
- (or :file:`/etc/bareos/autogenerated/client-configs/<hostname>.conf`, if Bareos < 16.2.0)
For details, see :ref:`section-UniventionAddClient`.
- Enable backup jobs for clients in the Univention Management Console
.. _section-UCR:
UCR variables
^^^^^^^^^^^^^
:strong:`bareos/filestorage`
: /var/lib/bareos/storage (default)
- Location where to store the backup files. Make sure, it offers enough disk space for a configured backup volumes.
:strong:`bareos/max_full_volume_bytes`
: 20 (default)
- Maximum size (in GB) of a volume for the :config:option:`dir/pool = Full`\ backup pool
:strong:`bareos/max_full_volumes`
: 1 (default)
- Maximum number of volumes for the :config:option:`dir/pool = Full`\ backup pool
:strong:`bareos/max_diff_volume_bytes`
: 10 (default)
- Maximum size (in GB) of a volume for the :config:option:`dir/pool = Differential`\ backup pool
:strong:`bareos/max_diff_volumes`
: 1 (default)
- Maximum number of volumes for the :config:option:`dir/pool = Differential`\ backup pool
:strong:`bareos/max_incr_volume_bytes`
: 1 (default)
- Maximum size (in GB) of a volume for the :config:option:`dir/pool = Incremental`\ backup pool
:strong:`bareos/max_incr_volumes`
: 1 (default)
- Maximum number of volumes for the :config:option:`dir/pool = Incremental`\ backup pool
:strong:`bareos/backup_myself`
: no (default)
no
don’t backup the server itself
yes
backup the server itself
:strong:`bareos/webui/console/user1/username`
: Administrator (default)
- User name to login at the bareos-webui
:strong:`bareos/webui/console/user1/password`
: (no default value)
- Password to login at the bareos-webui
UCR variables can be set via the Univention Configuration Registry Web interface
.. image:: /include/images/univention-configuration-registry-settings.*
:width: 100.0%
or using the :command:`ucr` command line tool:
.. code-block:: shell-session
:caption: Enable backup of the server itself
root@ucs:~# ucr set bareos/backup_myself=yes
Setting bareos/backup_myself
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.
.. warning::
univention-bareos < 15.2 did require a manual reload/restart of the bareos-dir service:
.. code-block:: shell-session
:caption: let bareos-dir reload its configuration
root@ucs:~# service bareos-dir reload
[ ok ] Reloading Bareos Director: bareos-dir.
Setup
^^^^^
After installation of the Bareos app, Bareos is ready for operation. A default configuration is created automatically.
Bareos consists of three daemons called :command:`director` (or :command:`bareos-dir`), :command:`storage-daemon` (or :command:`bareos-sd`) and :command:`filedaemon` (or :command:`bareos-fd`). All three daemons are started right after the installation by the Univention App Center.
If you want to enable automatic backups of the server, you need to set the Univention configuration registry (UCR) variable :strong:`bareos/backup_myself` to :strong:`yes` and reload the director daemon.
Administration
^^^^^^^^^^^^^^
For general tasks the :ref:`bareos-webui <section-webui>` can be used. Additional, there is the :command:`bconsole` command line tool:
.. code-block:: shell-session
:caption: Starting the bconsole
root@ucs:~# bconsole
Connecting to Director ucs:9101
1000 OK: ucs-dir Version: 15.2.2 (15 November 2015)
Enter a period to cancel a command.
*
For general information, see the :ref:`Bconsole Tuturial <section-TuturialBconsole>`.
Backup Schedule
^^^^^^^^^^^^^^^
As a result of the default configuration located at the :command:`bareos-dir`, the backup schedule will look as follows:
Full Backups
- are written into the :config:option:`dir/pool = Full`\ pool
- on the first saturday at 21:00 o’clock
- and kept for 365 days
Differential Backups
- are written into the :config:option:`dir/pool = Differential`\ pool
- on every 2nd to 5th saturday at 21:00 o’clock
- and kept for 90 days
Incremental Backups
- are written into the :config:option:`dir/pool = Incremental`\ pool
- on every day from monday to friday at 21:00 o’clock
- and kept for 30 days
That means full backups will be written every first saturday at 21:00 o’clock, differential backups every 2nd to 5th saturday at 21:00 o’clock and incremental backups from monday to friday at 21:00 o’clock. So you have got one full backup every month, four weekly differential and 20 daily incremental backups per month.
This schedule is active for the Univention server backup of itself and all other clients, which are backed up through the :command:`bareos-dir` on the Univention server.
There is also a special backup task, which is the Bareos backups itself for a possible disaster recovery. This backup has got its own backup cycle which starts after the main backups. The backup consists of a database backup for the metadata of the Bareos backup server and a backup of the Bareos configuration files under :file:`/etc/bareos/`.
Backup data management
^^^^^^^^^^^^^^^^^^^^^^
Data from the backup jobs is written to volumes, which are organized in pools (see chapter :ref:`DirectorResourcePool`).
The default configuration uses three different pools, called :config:option:`dir/pool = Full`\ , :config:option:`dir/pool = Differential`\ and :config:option:`dir/pool = Incremental`\ , which are used for full backups, differential and incremental backups, respectively.
If you change the UCR variables, the configuration files will be rewritten automatically. After each change you will need to reload the director daemon.
.. code-block:: shell-session
:caption: Example for changing the Full pool size to $10 \ast 20$ GB
root@ucs:~# ucr set bareos/max_full_volumes=10
Setting bareos/max_full_volumes
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.
root@ucs:~# ucr set bareos/max_full_volume_bytes=20
Setting bareos/max_full_volume_bytes
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.
.. warning::
This only affects new volumes. Existing volumes will not change there size.
.. _section-UniventionBackupStorage:
Backup Storage
^^^^^^^^^^^^^^
.. warning::
Using the default configuration, Bareos will store backups on your local disk. You may want to store the data to another location to avoid using up all of your disk space.
The location for backups is :file:`/var/lib/bareos/storage` in the default configuration.
For example, to use a NAS device for storing backups, you can mount your NAS volume via NFS on :file:`/var/lib/bareos/storage`. Alternatively, you can mount the NAS volume to another directory of your own choice, and change the UCR variable :strong:`bareos/filestorage` to the corresponding path. The directory needs to be writable by user **bareos**.
.. code-block:: shell-session
:caption: Example for changing the storage path
root@ucs:/etc/bareos# ucr set bareos/filestorage=/path/to/your/storage
Setting bareos/filestorage
File: /etc/bareos/...
.. warning::
You need to restart the Bareos storage daemon after having changed the storage path:
.. code-block:: shell-session
root@ucs:/# service bareos-sd restart
Bareos Webui Configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^
After installation you just need to setup your login credentials via UCR variables. Therefore, set the Univention configuration registry (UCR) variable :strong:`bareos/webui/console/user1/username` and :strong:`bareos/webui/consoles/user1/password` according to your needs. The director configuration is automatically reloaded if one of those two variables changes.
Alternatively you can also set those UCR variables via commandline.
.. code-block:: shell-session
:caption: Example for changing webui login credentials
root@ucs:~# ucr set bareos/webui/console/user1/username="bareos"
Setting bareos/webui/console/user1/username
File: /etc/bareos/...
[ ok ] Reloading Bareos Director: bareos-dir.
root@ucs:~# ucr set bareos/webui/console/user1/password="secret"
Setting bareos/webui/console/user1/password
File: /etc/bareos/...
[ ok ] Reloading Bareos Director: bareos-dir.
When your login credentials are set, you can login into Bareos Webui by following the entry in your Administration UCS Overview or directly via https://UCS_SERVER/bareos-webui/.
.. image:: /include/images/univention-ucs-overview-administration.*
:width: 80.0%
.. _section-UniventionAddClient:
Add a client to the backup
^^^^^^^^^^^^^^^^^^^^^^^^^^
Overview
''''''''
- Install the Bareos client software on the target system, see :ref:`Adding a Bareos Client <SecondClient>`
- Use the Univention Management Console to add the client to the backup, see the screenshot below
- Copy the filedaemon resource configuration file from the Univention server to the target system
Bareos >= 16.2.4
''''''''''''''''
Server-side
The Univention Bareos application comes with an automatism for the client and job configuration. If you want to add a client to the Bareos director configuration, you need use the Univention Management Console, select the client you want to backup and set the :strong:`enable backup job` checkbox to true, as shown in the screenshot below.
.. image:: /include/images/univention-client-job-activation.*
:width: 80.0%
If the name of the client is **testw1.example.com**, corresponding configuration files will be generated:
- :file:`/etc/bareos/autogenerated/clients/testw1.example.com.include`
- :file:`/etc/bareos/bareos-dir-export/client/testw1.example.com-fd/bareos-fd.d/director/bareos-dir.conf`
Generated configuration files under :file:`/etc/bareos/bareos-dir-export/client/` are intended for the target systems. After you have :ref:`installed the Bareos client on the target system <SecondClient>`, copy the generated client configuration over to the client and save it to following directories:
- on Linux: :file:`/etc/bareos/bareos-fd.d/director/`
- on Windows: :file:`C:\Program Files\Bareos\bareos-fd.d/director/`
.. code-block:: shell-session
:caption: copy client configuration from the server to the testw1.example.com client (Linux)
root@ucs:~# CLIENTNAME=testw1.example.com
root@ucs:~# scp /etc/bareos/bareos-dir-export/client/${CLIENTNAME}-fd/bareos-fd.d/director/*.conf root@${CLIENTNAME}:/etc/bareos/bareos-fd.d/director/
Background
''''''''''
The settings for each job resource are defined by the template files you see below:
The files
- :file:`/etc/bareos/autogenerated/clients/generic.template`
- :file:`/etc/bareos/autogenerated/clients/windows.template`
are used as templates for new clients. For Windows clients the file :file:`windows.template` is used, the :file:`generic.template` is used for all other client types.
If you disable the Bareos backup for a client, the client will not be removed from the configuration files. Only the backup job will be set inactive.
If you add three client, your client directory will look similar to this:
.. code-block:: shell-session
root@ucs:/etc/bareos/autogenerated/clients# ls -l
-rw-r--r-- 1 root root 430 16. Mai 15:15 generic.template
-rw-r----- 1 root bareos 513 21. Mai 14:46 testw1.example.com.include
-rw-r----- 1 root bareos 518 21. Mai 14:49 testw2.example.com.include
-rw-r----- 1 root bareos 518 16. Mai 18:17 testw3.example.com.include
-rw-r--r-- 1 root root 439 16. Mai 15:15 windows.template
The client configuration file contains, as you can see below, the client connection and the job information:
.. code-block:: shell-session
root@ucs:/etc/bareos/autogenerated/clients# cat testw2.example.com.include
Client {
Name = "testw2.example.com-fd"
Address = "testw2.example.com"
Password = "DBLtVnRKq5nRUOrnB3i3qAE38SiDtV8tyhzXIxqR"
}
Job {
Name = "Backup-testw2.example.com" # job name
Client = "testw2.example.com-fd" # client name
JobDefs = "DefaultJob" # job definition for the job
FileSet = "Windows All Drives" # FileSet (data which is backed up)
Schedule = "WeeklyCycle" # schedule for the backup tasks
Enabled = "Yes" # this is the resource which is toggled on/off by enabling or disabling a backup from the univention gui
}
Bareos < 16.2.0
'''''''''''''''
Older versions of Bareos handle generating the client configuration similar, but not identical:
If the name of the client is **testw1.example.com**, corresponding configuration files will be generated/adapted:
- creates :file:`/etc/bareos/autogenerated/fd-configs/testw1.example.com.conf`
- creates :file:`/etc/bareos/autogenerated/clients/testw1.example.com.include`
- extends :file:`/etc/bareos/autogenerated/clients.include`
Here the files intended for the target systems are generated under :file:`/etc/bareos/autogenerated/fd-configs/` and they do not only definr a director resource, but are full configuration files for the client. After you have :ref:`installed the Bareos client on the target system <SecondClient>`, copy the generated client configuration over to the client and save it to
- on Linux: :file:`/etc/bareos/bareos-fd.conf`
- on Windows: :file:`C:\Program Files\Bareos\bareos-fd.conf`
.. code-block:: shell-session
:caption: copy client configuration from the server to the testw1.example.com client (Linux)
root@ucs:~# CLIENTNAME=testw1.example.com
root@ucs:~# scp /etc/bareos/autogenerated/fd-configs/${CLIENTNAME}.conf root@${CLIENTNAME}:/etc/bareos/bareos-fd.conf
.. _section-DebianOrg:
Debian.org / Ubuntu Universe
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:index:`\ <single: Platform; Debian; Debian.org>`
:index:`\ <single: Platform; Debian; 8>`
:index:`\ <single: Platform; Ubuntu; Universe>`
:index:`\ <single: Platform; Ubuntu; Universe; 15.04>`
The distributions of Debian >= 8 include a version of Bareos. Ubuntu Universe >= 15.04 does also include these packages.
In the further text, these version will be named **Bareos (Debian.org)** (also for the Ubuntu Universe version, as this is based on the Debian version).
.. _section-DebianOrgLimitations:
Limitations of the Debian.org/Ubuntu Universe version of Bareos
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Debian.org does not include the libfastlz compression library and therefore the Bareos (Debian.org) packages do not offer the fileset options :strong:`compression=LZFAST`, :strong:`compression=LZ4` and :strong:`compression=LZ4HC`.
- Debian.org does not include the **bareos-webui** package.
.. _section-macosx:
Mac OS X
--------
:index:`\ <single: Platform; Mac; OS X>`\
Bareos for MacOS X is available either
- via the `Homebrew project <https://brew.sh/>`_ (https://formulae.brew.sh/formula/bareos-client) or
- as pkg file from https://download.bareos.org/bareos/release/.
However, you have to choose upfront, which client you want to use. Otherwise conflicts do occur.
Both packages contain the |fd| and :command:`bconsole`.
Installing the Bareos Client as PKG
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:index:`\ <single: Installation; MacOS>`\
The Bareos installer package for Mac OS X contains the |fd| for Mac OS X 10.5 or later.
On your local Mac, you must be an admin user. The main user is an admin user.
Download the :file:`bareos-*.pkg` installer package from https://download.bareos.org/bareos/release/.
Find the .pkg you just downloaded. Install the .pkg by holding the CTRL key, left-clicking the installer and choosing "open".
Follow the directions given to you and finish the installation.
Configuration
~~~~~~~~~~~~~
To make use of your |fd| on your system, it is required to configure the |dir| and the local |fd|.
Configure the server-side by follow the instructions at :ref:`section-AddAClient`.
After configuring the server-side you can either transfer the necessary configuration file using following command or configure the client locally.
Option 1: Copy the director resource from the Bareos Director to the Client
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Assuming your client has the DNS entry :strong:`client2.example.com` and has been added to |dir| as :config:option:`dir/client = client2-fd`\ :
.. code-block:: shell-session
scp /etc/bareos/bareos-dir-export/client/client2-fd/bareos-fd.d/director/bareos-dir.conf root@client2.example.com:/usr/local/etc/bareos/bareos-fd.d/director/
This differs in so far, as on Linux the configuration files are located under :file:`/etc/bareos/`, while on MacOS they are located at :file:`/usr/local/etc/bareos/`.
Option 2: Edit the director resource on the Client
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alternatively, you can edit the file :file:`/usr/local/etc/bareos/bareos-fd.d/director/bareos-dir.conf`.
This can be done by right-clicking the finder icon in your task bar, select "Go to folder ..." and paste :file:`/usr/local/etc/bareos/bareos-fd.d/director/`.
Select the :file:`bareos-dir.conf` file and open it.
Alternatively you can also call following command on the command console:
.. code-block:: shell-session
open -t /usr/local/etc/bareos/bareos-fd.d/director/bareos-dir.conf
The file should look similar to this:
.. code-block:: bareosconfig
:caption: bareos-fd.d/director/bareos-dir.conf
Director {
Name = bareos-dir
Password = "SOME_RANDOM_PASSWORD"
Description = "Allow the configured Director to access this file daemon."
}
Set this client-side password to the same value as given on the server-side.
.. warning::
The configuration file contains passwords and therefore must not be accessible for any users except admin users.
Restart bareos-fd after changing the configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The bareos-fd must be restarted to reread its configuration:
.. code-block:: shell-session
:caption: Restart the |fd|
sudo launchctl stop org.bareos.bareos-fd
sudo launchctl start org.bareos.bareos-fd
Verify that the Bareos File Daemon is working
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Open the :command:`bconsole` on your |dir| and check the status of the client with
.. code-block:: bareosconfig
*<input>status client=client2-fd</input>
In case, the client does not react, following command are useful the check the status:
.. code-block:: shell-session
:caption: Verify the status of |fd|
# check if bareos-fd is started by system:
sudo launchctl list org.bareos.bareos-fd
# get process id (PID) of bareos-fd
pgrep bareos-fd
# show files opened by bareos-fd
sudo lsof -p `pgrep bareos-fd`
# check what process is listening on the |fd| port
sudo lsof -n -iTCP:9102 | grep LISTEN
You can also manually start bareos-fd in debug mode by:
.. code-block:: shell-session
:caption: Start |fd| in debug mode
sudo /usr/local/sbin/bareos-fd -f -d 100