Bacula Backup Solution: Unterschied zwischen den Versionen
Wulf (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Wulf (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 5: | Zeile 5: | ||
Download current version: | Download current version: | ||
<syntaxhighlight>wget -qO- http://bacula.us/current | tar -xzvf - -C /usr/src</syntaxhighlight> | <syntaxhighlight lang="bash">wget -qO- http://bacula.us/current | tar -xzvf - -C /usr/src</syntaxhighlight> | ||
Goto the source directory: | Goto the source directory: | ||
<syntaxhighlight>cd /usr/src/bacula*</syntaxhighlight> | <syntaxhighlight lang="bash">cd /usr/src/bacula*</syntaxhighlight> | ||
Configure the code, changing the last options below accordingly (normally the last three): | Configure the code, changing the last options below accordingly (normally the last three): | ||
<syntaxhighlight>./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</syntaxhighlight> | <syntaxhighlight lang="bash">./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</syntaxhighlight> | ||
Build, install and enable the Bacula daemons start at boot time: | Build, install and enable the Bacula daemons start at boot time: | ||
<syntaxhighlight>make -j8 && make install && make install-autostart</syntaxhighlight> | <syntaxhighlight lang="bash">make -j8 && make install && make install-autostart</syntaxhighlight> | ||
Goto the scripts directory: | Goto the scripts directory: | ||
<syntaxhighlight>cd /etc/bacula/scripts</syntaxhighlight> | <syntaxhighlight lang="bash">cd /etc/bacula/scripts</syntaxhighlight> | ||
Create the database: | Create the database: | ||
<syntaxhighlight>./create_bacula_database -u root -p</syntaxhighlight> | <syntaxhighlight lang="bash">./create_bacula_database -u root -p</syntaxhighlight> | ||
Create the database tables: | Create the database tables: | ||
<syntaxhighlight>./make_bacula_tables -u root -p</syntaxhighlight> | <syntaxhighlight lang="bash">./make_bacula_tables -u root -p</syntaxhighlight> | ||
Create the database user: | Create the database user: | ||
<syntaxhighlight>./grant_bacula_privileges -u root -p</syntaxhighlight> | <syntaxhighlight lang="bash">./grant_bacula_privileges -u root -p</syntaxhighlight> | ||
Start the Bacula daemons: | Start the Bacula daemons: | ||
<syntaxhighlight>service bacula-dir start</syntaxhighlight> | <syntaxhighlight lang="bash">service bacula-dir start</syntaxhighlight> | ||
<syntaxhighlight>service bacula-fd start</syntaxhighlight> | <syntaxhighlight lang="bash">service bacula-fd start</syntaxhighlight> | ||
<syntaxhighlight>service bacula-sd start</syntaxhighlight> | <syntaxhighlight lang="bash">service bacula-sd start</syntaxhighlight> | ||
Remark: The steps are orginally taken from http://bacula.us/compilation/ and slightly adjusted for personal use. | Remark: The steps are orginally taken from http://bacula.us/compilation/ and slightly adjusted for personal use. | ||
| Zeile 51: | Zeile 51: | ||
1. Stop Bacula daemons | 1. Stop Bacula daemons | ||
<syntaxhighlight>sudo bacula stop</syntaxhighlight> | <syntaxhighlight lang="bash">sudo bacula stop</syntaxhighlight> | ||
2. Drop database tables (system will ask for password of database user „root@localhost“) | 2. Drop database tables (system will ask for password of database user „root@localhost“) | ||
<syntaxhighlight>sudo sh -c "cd /etc/bacula/scripts; ./drop_bacula_tables -u root -p"</syntaxhighlight> | <syntaxhighlight lang="bash">sudo sh -c "cd /etc/bacula/scripts; ./drop_bacula_tables -u root -p"</syntaxhighlight> | ||
3. Create new database tables (system will ask for password of database user „root@localhost“) | 3. Create new database tables (system will ask for password of database user „root@localhost“) | ||
<syntaxhighlight>sudo sh -c "cd /etc/bacula/scripts; ./make_bacula_tables -u root -p"</syntaxhighlight> | <syntaxhighlight lang="bash">sudo sh -c "cd /etc/bacula/scripts; ./make_bacula_tables -u root -p"</syntaxhighlight> | ||
4. Delete all files in /var/lib/bacula (File ".my.cnf" is important and will not be deleted) | 4. Delete all files in /var/lib/bacula (File ".my.cnf" is important and will not be deleted) | ||
<syntaxhighlight>sudo sh -c "cd /var/lib/bacula; rm *"</syntaxhighlight> | <syntaxhighlight lang="bash">sudo sh -c "cd /var/lib/bacula; rm *"</syntaxhighlight> | ||
5. Start Bacula daemons | 5. Start Bacula daemons | ||
<syntaxhighlight>sudo bacula start</syntaxhighlight> | <syntaxhighlight lang="bash">sudo bacula start</syntaxhighlight> | ||
Note: Existing backup files must be removed from backup directory. | Note: Existing backup files must be removed from backup directory. | ||
Version vom 10. Mai 2018, 19:51 Uhr
Install Bacula on Linux (EN)
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 (EN)
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.
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.