Verified Commit 11eadb7a authored by anarcat's avatar anarcat
Browse files

document how to remove a host from the bacula catalog (team#40525)

parent 006ee787
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -567,6 +567,45 @@ that is not a bind mount and one of `ext{2,3,4}`, `xfs` or
`modules/bacula/files/bacula-backup-dirs` Puppet file, deployed in
`/usr/local/sbin/bacula-backup-dirs` on backup clients.

## Retiring a client

<!-- keep this section in sync with howto/retire-a-host -->

Clients are managed by Puppet and their configuration will be
automatically removed from the host is removed from Puppet. This is
normally part of the [host retirement procedure][].

[host retirement procedure]: howto/retire-a-host

The procedure also takes care of removing the data from the backup
storage server (in `/srv/backups/bacula/`, currently on `bungei`), but
not PostgreSQL backups or the catalog on the director.

Incredibly, it seems like no one really knows how to remove a client
from the catalog on the director, once they are gone. Removing the
configuration is one thing, but the client is then still in the
database. There are [many](https://adsm.org/lists/html/Bacula-users/2013-10/msg00040.html), [many](https://sourceforge.net/p/bacula/mailman/bacula-users/thread/CAPTZE3uoxyVU4YVSmirygddeKjZaiNHovV6gPy4Oxib0fekR0w%40mail.gmail.com/#msg36198382), [many](https://www.backupcentral.com/forum/19/255655/howto_remove_clients_permanently_and_completely_from_backup), [many](https://sourceforge.net/p/bacula/mailman/message/22922461/_),
[questions](https://serverfault.com/questions/471057/remove-bacula-client-from-server) about this *everywhere*, and everyone [gets it
wrong](https://adsm.org/lists/html/Bacula-users/2013-10/msg00073.html) or [doesn't care](https://adsm.org/lists/html/Bacula-users/2013-10/msg00074.html). Recommendations range from "doing
nothing" (takes a lot of disk space and slows down PostgreSQL) to
"`dbcheck` will fix this" (it didn't), neither of which worked in our
case.

Amazingly, the [solution](https://www.bacula.lat/delecao-de-clientes-e-backups-terminados-do-backup-do-bacula/?lang=en) is simply to call this command in
`bconsole`:

    delete client=$FQDN-fd

For example:

    delete archeotrichon.torproject.org-fd

This will remove all jobs related to the client, and then the client
itself. This is now part of the [host retirement procedure][].

TODO: You might still to run the `dbcheck.sql` script to clean related
resources, see [issue 40525](https://gitlab.torproject.org/tpo/tpa/team/-/issues/40525) for details

## Pager playbook

Hint: see also the [howto/postgresql](howto/postgresql) documentation for the backup
+17 −1
Original line number Diff line number Diff line
@@ -234,7 +234,22 @@ of an emergency:

 11. remove from reverse DNS

TODO: remove the client from the Bacula catalog, see <https://gitlab.torproject.org/tpo/tpa/team/-/issues/40525>.
 12. after 30 days delay, retire from Bacula catalog, on the director
     (currently `bacula-director-01`), run `bconsole` then:
 
        delete client=$INSTANCE-fd
    
     for example:
     
        delete client=archeotrichon.torproject.org-fd

     TODO: You might still to run the `dbcheck.sql` script to clean
     related resources, see [issue 40525](https://gitlab.torproject.org/tpo/tpa/team/-/issues/40525) for details.
     
     <!-- sync this section with howto/backup#retiring-a-client when -->
     <!-- changing -->
     
     TODO: add to fabric

Equivalent retirement checklist to copy-paste in retirement tickets:

@@ -249,3 +264,4 @@ Equivalent retirement checklist to copy-paste in retirement tickets:
 9. [ ] remove from docs
 10. [ ] remove from racks
 11. [ ] remove from reverse DNS
 12. [ ] remove from bacula director