如何在Ubuntu 18.04/Ubuntu 16.04上安装Bareos
数据备份是任何系统管理员的"必须为"频繁任务。
有各种开源工具可用于执行系统备份。
在本教程中,我们将研究如何安装和使用裸照。
Bareos是一个开源备份工具,适用于Linux,Windows和MacOS操作系统。
它的VMware Backup Plugin使我们还可以备份在VMware Infrastructure中运行的虚拟机。
创建的虚拟磁盘镜像可以恢复到相同的虚拟机或者VMDK文件中。
在Ubuntu 18.04/Ubuntu 16.04上安装Bareos
Bareos的软件包可在裸照APT存储库上使用。
通过使用sudo权限运行下面的命令来将它们添加到系统中。
RELEASE=release/latest/ DIST=xUbuntu_$(lsb_release -sr) URL=http://download.bareos.org/bareos/$RELEASE/$DIST printf "deb $URL /\n" | sudo tee /etc/apt/sources.list.d/bareos.list
添加存储库后,导入存储库GPG密钥:
wget -q $URL/Release.key -O- | sudo apt-key add
更新包列表索引并使用MariaDB数据库服务器安装哈叙座。
sudo apt update sudo apt install mariadb-server bareos bareos-database-mysql
提示配置Postfix时,我们可以选择"Internet站点"
如果我们尚未安装数据库服务器,则可以使用DBCONFIG配置Bareos数据库。
设置Bareos数据库密码。
确认密码以完成安装。
成功的安装应如下所示。
Setting up bareos-database-tools (18.2.5-139.1) …############################################################################################….] Setting up bareos-director (18.2.5-139.1) … replacing 'XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX' with 'ubuntu-01' in /etc/bareos/bareos-dir.d/storage/File.conf##################################…] replacing 'XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX' in /etc/bareos/bareos-dir.d/director/bareos-dir.conf replacing 'XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX' in /etc/bareos/bareos-dir.d/client/bareos-fd.conf replacing 'XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX' in /etc/bareos/bareos-dir.d/storage/File.conf replacing 'XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX' in /etc/bareos/bareos-dir.d/console/bareos-mon.conf Info: unable to get "dbdriver" from config, this is usually not an error. Check /tmp/bareos-config.17867.log replacing 'XXX_REPLACE_WITH_DATABASE_DRIVER_XXX' with 'mysql' in /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf Created symlink /etc/systemd/system/bareos-dir.service -> /lib/systemd/system/bareos-director.service. Created symlink /etc/systemd/system/multi-user.target.wants/bareos-director.service -> /lib/systemd/system/bareos-director.service. Processing triggers for libc-bin (2.27-3ubuntu1) …#############################################################################################..] Processing triggers for systemd (237-3ubuntu10.9) … Processing triggers for ureadahead (0.100.0-20) … Processing triggers for rsyslog (8.32.0-1ubuntu4) …
所有鞍座配置都位于 /etc/bareos/
目录。
安装Bareos网络UI
BareosWebUI是一个php-frontend来监控和管理araro。
它允许我们从Web仪表板执行备份操作。
通过运行下面的命令来安装哈索座Web UI。
sudo apt-get install bareos-webui
安装的依赖项包括Apache Web服务器,PHP和许多扩展名。
重新启动Apache Web服务器以激活新配置。
sudo systemctl restart apache2
启动所有鞍座服务。
sudo systemctl start bareos-dir bareos-sd bareos-fd
创建控制台用户
访问BConsole以创建用于访问WebUI的用户帐户。
# bconsole Connecting to Director localhost:9101 Encryption: ECDHE-PSK-CHACHA20-POLY1305 1000 OK: bareos-dir Version: 18.2.5 (30 January 2019) bareos.org build binary bareos.org binaries are UNSUPPORTED by bareos.com. Get official binaries and vendor support on https://www.bareos.com You are connected using the default console Enter a period to cancel a command. *
添加如下所示的UI管理员用户。
configure add console name=admin password=StrongPassword profile=webui-admin
使用密码替换使用所需的用户名和Hyman @ OniTor one and and。
你应该得到下面的输出。
Created resource config file "/etc/bareos/bareos-dir.d/console/admin.conf": Console { Name = admin Password = StrongPassword Profile = webui-admin }
我们可以编辑文件 /etc/bareos/bareos-dir.d/console/admin.conf
要更改或者添加用户名和密码。
使用 exit
命令完成后退出BConsole。
重新启动服务
sudo systemctl restart apache2 bareos-dir bareos-sd bareos-fd
访问aranos the web-ui
可以访问哈叙座网络UI http://serverip/bareos-webui
。