2023-07-26 18:55:24 +03:00
|
|
|
|
---
|
|
|
|
|
title: Установка Bareos на Astra Linux SE
|
|
|
|
|
description: Инструкция по установке из репозитория Bareos
|
|
|
|
|
date: 2023-01-27T16:08:00+05:00
|
|
|
|
|
tags: [linux, postgres, bareos, apache]
|
|
|
|
|
---
|
|
|
|
|
## Конфигурация Сервера
|
|
|
|
|
|
|
|
|
|
### Установка Bareos и PostgreSQL
|
2023-09-24 18:58:33 +03:00
|
|
|
|
```shell
|
2023-07-26 18:55:24 +03:00
|
|
|
|
curl -s https://download.bareos.org/current/Debian_10/add_bareos_repositories.sh | bash
|
|
|
|
|
apt update
|
|
|
|
|
apt install postgresql bareos bareos-webui
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Конфигурация БД
|
2023-09-24 18:58:33 +03:00
|
|
|
|
```shell
|
2023-07-26 18:55:24 +03:00
|
|
|
|
dpkg-reconfigure bareos-database-common
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Включение сервисов Bareos, PostgreSQL и Apache
|
2023-09-24 18:58:33 +03:00
|
|
|
|
```shell
|
2023-07-26 18:55:24 +03:00
|
|
|
|
systemctl enable --now postgresql bareos-director bareos-filedaemon bareos-storage apache2
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Создание пользователя для Bareos-webui и конфига клиента
|
2023-09-25 14:10:32 +03:00
|
|
|
|
Веб Bareos'а находится по адресу: `http://<bareos-ip>/bareos-webui/`
|
2023-09-25 21:36:25 +03:00
|
|
|
|
|
2023-09-24 18:58:33 +03:00
|
|
|
|
```shell
|
2023-07-26 18:55:24 +03:00
|
|
|
|
bconsole
|
|
|
|
|
configure add console name=<web-user> password=<web-pass> profile=webui-admin tlsenable=no
|
|
|
|
|
configure add client name=<client-name> address=<client-ip> password=<client-pass>
|
|
|
|
|
reload
|
|
|
|
|
exit
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Бэкап определённой папки
|
2023-09-25 21:36:25 +03:00
|
|
|
|
В файл `/etc/bareos/bareos-dir.d/fileset/<name>.conf` необходимо добавить настройку бэкапа определённой папки:
|
|
|
|
|
|
2023-10-08 23:18:25 +03:00
|
|
|
|
```config
|
2023-07-26 18:55:24 +03:00
|
|
|
|
FileSet {
|
|
|
|
|
Name = "<name>"
|
|
|
|
|
Description = "<description>"
|
|
|
|
|
Include {
|
|
|
|
|
Options {
|
|
|
|
|
Signature = MD5 # calculate md5 checksum per file
|
|
|
|
|
}
|
|
|
|
|
File = "<directory>"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Конфигурация клиента
|
|
|
|
|
|
|
|
|
|
### Установка Bareos Filedaemon
|
2023-09-24 18:58:33 +03:00
|
|
|
|
```shell
|
2023-07-26 18:55:24 +03:00
|
|
|
|
curl -s https://download.bareos.org/current/Debian_10/add_bareos_repositories.sh | bash
|
|
|
|
|
apt update
|
|
|
|
|
apt install bareos-filedaemon
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Перенос конфига с сервера на клиент
|
2023-09-24 18:58:33 +03:00
|
|
|
|
```shell
|
2023-09-25 14:10:32 +03:00
|
|
|
|
scp <user>@<server-ip>:/etc/bareos/bareos-dir-export/client /<client-name>/bareos-fd.d/director/bareos-dir.conf/etc/bareos/bareos-fd.d/director/
|
2023-07-26 18:55:24 +03:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Включение сервиса
|
2023-09-24 18:58:33 +03:00
|
|
|
|
```shell
|
2023-07-26 18:55:24 +03:00
|
|
|
|
systemctl enable --now bareos-filedaemon
|
|
|
|
|
```
|