Skip to content

9. Re initializing the Catalog database

Renato Freitas edited this page Dec 20, 2019 · 5 revisions

WARNING!!!

TAKE CARE the commands that follow will delete/erase/remove/purge definitely without possibility of recover.

If you already have the bacula in Production Environment do not perform these commands.

After you have did all your own tests, it's a good idea to re-initialize the bacula database, as root do:

9.1. Stopping services

systemctl stop bacula-dir.service ; systemctl stop bacula-sd.service ; systemctl stop bacula-fd.service

9.2. Performing scripts

cd /opt/bacula/scripts

sudo -u postgres ./drop_bacula_tables

sudo -u postgres ./make_bacula_tables

sudo -u postgres ./grant_bacula_privileges

9.3. Clearing all content from working directory

/opt/bacula/working/

In the directory above remove or move all its contents.

9.4. Clearing all files from:

/opt/bacula/my/bkp/FullBackupPool

/opt/bacula/my/bkp/DifferentialBackupPool

/opt/bacula/my/bkp/IncrementalBackupPool

In the directories above remove or move all theirs contents.

9.5. Starting services

systemctl start bacula-dir.service ; systemctl start bacula-sd.service ; systemctl start bacula-fd.service