User Tools

Site Tools


bacula_backups

Bacula Backup Notes

See Backup History for an overview of the backup servers, and Server Backups for clients.

Common Tasks

Show autochanger status and slots

 sudo bconsole
 bconsole$ status slots storage=TL2000 drive=0

Add New Tapes to the Library

  • take note of tapes currently loaded in the two tape drives
 bconsole$ status drives storage=TL2000
  • unmount loaded tapes, moving the tapes back to the magazines
 bconsole$ unmount storage=TL2000 drive=0
 bconsole$ unmount storage=TL2000 drive=1
  • remove magazine
  • remove use tapes
  • Insert new tapes. Add them to the magazine in order, as Bacula looks at the magazine slot # to load the next blank tape, and starts at the currently loaded slot.
  • insert magazine
  • update then check the status of the magazines
 bconsole$ update slots storage=TL2000 drive=0
 bconsole$ status slots storage=TL2000 drive=0
  • label the new tapes that are not identified in command above, assign them to the pools 'Default' and 'LargePool' based on the label number (000,XXX = LargePool, 001,XXX = Default).
 bconsole$ label barcodes slots=11-19,23 
  • remount tapes from above
 bconsole$ mount storage=TL2000 drive=0
 bconsole$ mount storage=TL2000 drive=1

Add/Remove Existing Tapes from Library

 bconsole$ status drives  #take note of tape currently loaded
 bconsole$ unmount
           (remove magazine)
           (insert magazine)
 bconsole$ update slots
 bconsole$ mount #remount tape from above

Add new tapes to backup pool using barcodes

 bconsole$ label barcodes slots=11-19,23
 bconsole$ status drives  #verify the correct tape is mounted

Restore Files

Restore the last backup of an entire server (or select files) to Jupiter

  • login to eris
  • run bconsole as root
 $ sudo bconsole
  • run query to find file(s) if needed
 bconsole$ query
  • run restore
 bconsole$ restore
  • select a restore method from the menu
  • select a client
  • select files to restore
 bconsole$  mark *
 bconsole$  done
  • make a note of the tapes required
  • change restore path
 bconsole$  OK to run? (yes/mod/no): mod
  • choose 9. Where
 bconsole$  /var/bacula/restored
  • verify restore options
  • then choose yes: okay to run
  • If additional tapes are required, Bacula will send an alert via email to backups@nceas.
  • At this point the required tapes can be added to the library. Add the tapes to the library, then run an update slots command. After that mount the first tape in the drive which is waiting.
   bconsole$ update slots
   bconsole$ mount
  • it may take a while (~10 minutes) for the tape to load and seek before files start appearing.
  • after restoring is done, unmount the last tape restored from and mount the tape that was initially mounted before restoring

D2D2T Clients

Use this setup to add new servers. Files are copied to the backup server (hosted at NCEAS) via Rsync, then written to tape.

Setup the Linux/OS X client

  • Copy the public SSH key for the root user on Eris to the root user on the client

Bacula Clients

This is a “remote server to tape” setup that was used before separating the servers and the tape library by a 100 mbit connection.

Setup an Ubuntu server as a client

  • install the client
 # apt-get install bacula-client
  • configure the client in /etc/bacula/bacula-fd.conf
    • Change director name to “cydonia-dir”
    • Change FD Name to hostname (remove -fd)
    • Change FDAddress from localhost to server's IP address
  • restart client
  • move to eris and add the client (below)

Server

Adding D2D2T Clients

  • setup the rsync script
  • setup the bacula conf file

Adding Bacula Clients

  • cd to /etc/bacula/conf.d
  • copy an example config file to hostname.conf
  • edit hostname.conf to include client's hostname, password, and (optionally) files to backup
  • restart bacula-director (make sure there are no jobs running)
 # service bacula-director restart
  • verify the client in bconsole
 bconsole$ status client=hostname
bacula_backups.txt · Last modified: 2017/08/17 16:31 by outin