Bacula Backup Solution: Unterschied zwischen den Versionen

Aus wiki.frank-wulf.de
Zur Navigation springen Zur Suche springen
Zeile 37: Zeile 37:
Content of this site from 25th of Sep 2017: [[Media:Bacula.us-Bacula 903 Compilation and Installation Commands.pdf|Bacula.us-Bacula 903 Compilation and Installation Commands.pdf]]
Content of this site from 25th of Sep 2017: [[Media:Bacula.us-Bacula 903 Compilation and Installation Commands.pdf|Bacula.us-Bacula 903 Compilation and Installation Commands.pdf]]


=Reset Bacula after testing phase (EN)=
=Reset Bacula after testing phase=


Benefits:
Benefits:

Version vom 2. September 2018, 19:18 Uhr

Install Bacula on Linux

This article describes how to install the latest Bacula version on Linux.

Download current version:

wget -qO- http://bacula.us/current | tar -xzvf - -C /usr/src

Goto the source directory:

cd /usr/src/bacula*

Configure the code, changing the last options below accordingly (normally the last three):

./configure --with-readline=/usr/include/readline --disable-conio --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/etc/bacula/scripts --with-working-dir=/var/lib/bacula --with-logdir=/var/log --enable-smartalloc --with-mysql --with-archivedir=<pathname of backup disk> --with-job-email=<mail address> --with-hostname=192.168.x.x

Build, install and enable the Bacula daemons start at boot time:

make -j8 && make install && make install-autostart

Goto the scripts directory:

cd /etc/bacula/scripts

Create the database:

./create_bacula_database -u root -p

Create the database tables:

./make_bacula_tables -u root -p

Create the database user:

./grant_bacula_privileges -u root -p

Start the Bacula daemons:

service bacula-dir start
service bacula-fd start
service bacula-sd start

Remark: The steps are orginally taken from http://bacula.us/compilation/ and slightly adjusted for personal use.

Content of this site from 25th of Sep 2017: Bacula.us-Bacula 903 Compilation and Installation Commands.pdf

Reset Bacula after testing phase

Benefits:

  • Database Catalog will be initialized.
  • Executed Jobs will disappear.
  • JobIDs and Volume numbering will be resetted.
  • We keep the configuration of the Bacula Director, the Client and the Storage Daemon as well as File Sets, Backup Schedules, Backup Job definitions, Volume Pools and Storage Devices.


How-To:


1. Stop Bacula daemons

sudo bacula stop

2. Drop database tables (system will ask for password of database user „root@localhost“)

sudo sh -c "cd /etc/bacula/scripts; ./drop_bacula_tables -u root -p"

3. Create new database tables (system will ask for password of database user „root@localhost“)

sudo sh -c "cd /etc/bacula/scripts; ./make_bacula_tables -u root -p"

4. Delete all files in /var/lib/bacula (File ".my.cnf" is important and will not be deleted)

sudo sh -c "cd /var/lib/bacula; rm *"

5. Start Bacula daemons

sudo bacula start

Note: Existing backup files must be removed from backup directory.

Install Baculum API and Web GUI Tools

Add key for Baculum

wget -qO - http://bacula.org/downloads/baculum/baculum.pub | apt-key add -

Add source for Baculum

echo -e "deb [ arch=amd64 ] http://bacula.org/downloads/baculum/stable/ubuntu bionic main\ndeb-src http://bacula.org/downloads/baculum/stable/ubuntu bionic main" >/etc/apt/sources.list.d/baculum.list

Install Baculum

apt-get update && apt-get install baculum-api baculum-api-apache2 baculum-common baculum-web baculum-web-apache2

Add sudo access for Baculum

echo -e "Defaults:apache "'!'"requiretty\nwww-data ALL=NOPASSWD: /usr/sbin/bconsole\nwww-data ALL=NOPASSWD: /usr/sbin/bdirjson\nwww-data ALL=NOPASSWD: /usr/sbin/bsdjson\nwww-data ALL=NOPASSWD: /usr/sbin/bfdjson\nwww-data ALL=NOPASSWD: /usr/sbin/bbconsjson" > /etc/sudoers.d/baculum

Enable rewrite module

a2enmod rewrite

Enable Baculum API and web site

a2ensite baculum-web baculum-api

Restart Apache

systemctl reload apache2

Backup von Windows-Clients (DE)

Under construction

Backup Prozess im Detail (DE)

Anforderung

  • In regelmäßgigen Abständen sollen Backups des Servers und weiterer Computer (z. B. PC, Notebook) durchgeführt werden.
  • Es sollen keine manuellen Schritte notwendig sein.
  • Die Backups sollen auf dem Server abgelegt werden.

Umsetzung

  • Der Bacula Director auf dem Server steuert den Ablauf aller Backups.
  • Auf allen zu sichernden Computern ist ein Bacula Filedaemon installiert.
  • Ein Computer kann gesichert werden wenn eine der folgenden Voraussetzungen erfüllt ist:
    • Der Computer ist eingeschaltet und über das Netzwerk erreichbar.
    • Der Computer ist ausgeschaltet und kann automatisch über ein vom Server initiiertes "Wake on LAN"-Signal eingeschaltet werden.