Linux: Complete Uninstallation
The following article aims at explaining how to completely wipe Bacula Enterprise from your Linux system.
Following this guide all Bacula components will be uninstalled, including the Catalog database and backup volumes.
Stopping Bacula Services
Before uninstalling Bacula Enterprise packages stop all Bacula Daemons first.
systemctl stop bacula-dir
systemctl stop bacula-sd
systemctl stop bacula-fd
Remove Catalog Database
The Catalog (Bacula database) service is responsible for maintaining the bacula database for all files backed up. Without the Catalog you are unable to restore files using a restore job. The Catalog is by default installed on Bacula Director but it can also be hosted on a dedicated SQL Server.
Bacula Enterprise provides a script to drop the Catalog from the SQL Server.
If you are using PostgreSQL change to a postgres user before running the script.
su - postgres
Execute the script to drop the Catalog.
/opt/bacula/scripts/drop_bacula_database
Remove Disk-Based Volumes
Volume is an archive unit where Bacula stores backed up data. Once volumes are removed all backed up data will be lost. Disk-based Bacula volumes can be found in a location Storage Daemon Devices point to via “Archive Device” directive.
You can quickly find all the locations Bacula volumes are stored in a BSys_report of your Storage Daemon(s).
zgrep -i "archive*device" /opt/bacula/working/bsys_report.*.gz | sort -u
Important
Do make sure there is no data you may need inside the ArchiveDevice directories before removing it.
Remove all the content of directories ArchiveDevice points to.
rm -rf @@archive-device@@
@@archive-device@@ refers to the directories Storage Daemon Devices point to as found by the command above.
Remove Bacula Packages
You will uninstall Bacula Enterprise packages using your OS package manager. We provide instructions for deb and rpm based Operating Systems.
Remove Bacula Installation Directories
Important
Do make sure there is no data you may need inside the /opt/bacula and /opt/bweb directories before removing it.
Remove all the content of Bacula Enterprise and Bweb directories.
rm -rf /opt/bacula
rm -rf /opt/bweb
Go back to Bacula Enterprise Uninstallation.