Wednesday, November 25, 2015

Installing Bareos Client

This guide covers the installation of the Bareos Client in it's most common form, for file backup or also known as a FileDaemon (bareos-fd). It goes through the process of installing the client and testing whether it works. I will post an installation guide for Bareos Client for database backup and as a storage node (StorageDaemon) some time in the future.
First, there are several assumptions taken.
  • No Bareos client or anoy other component installed previously. Install client to backup files only. 
  • Focus is on installation via packages so that updates packages are applied as they come out. Particularly useful if your organization validates updates prior to roll-out.
  • Server-side configuration is using Webmin via the Bacula module (in Webmin: System --> Backup) 
First the following information is needed
  • The hostname or IP address of the client or machine to be backed up. We'll call this the Client.
  • The name that will be given to the Client in the Bareos system. Usually Client-fd
  • The name of Director in the Bareos system.
  1. Add Bareos repository on the client / target server.
    1. Refer to quickstart information in official documentation for your Distro specific instruction
    2. For RedHat, it's basically
      1. add the Bareos yum repository. The repositories are here. Make sure the client version matches the Bareos server version. Choose the version of RedHat or CentOS for the target server. Download the bareos.repo file to /etc/yum.repos.d
      2. If you haven't added the Epel repository, add the repository. Instructions are here.
      3. do a yum check-update to update the repositories to load them
  2. Install Bareos filedaemon. For Redhat: yum install bareos-filedaemon
  3. Configure the client by editing the /etc/bareos/bareos-fd.conf file
    1. Set Bareos server / Director name in Director section, entry "Name = "
    2. Make note of  
      1. FileDaemon name - set the entry "Name =" in FileDaemon section
      2. Director password - create a password and set the entry "Password =" in the Director section. Make this long and complicated because this will not be used by users.
    3. Start the FileDaemon / Bareos Client:  service bareos-fd start
    4. Open the Bareos Client port (tcp port 9102) on the firewall, if necessary 
  4. Configure Bareos server via Webmin
    1. Create client
      1. System => Bacula backup, Backup Clients, Add new backup client
      2. Enter 
        1. Client name =  FileDaemon name (from step 3.2)
        2. Bacula FD Password = Director Password (replace the automactically generated one)
        3. Save
      3. Confirm setup client ok
        1. Backup Clients, select client, Show Status
        2. Correct response : Status from <client hostname> : <Client name>-fd Version: <bareos version>
    2. Setup job to backup files on the client 
      1. Backup Jobs, Add a new backup job
      2. Enter job name: eg hostname-files
      3. Set "Inherit defaults" to "DefaultJob"
      4. Set Client to backup = Client name
      5. Set File Set to backup = SelfTest
      6. Set Destination Storage = <storage> e.g. "File"
  5. Test backup
    1. Backup Jobs, select Job name
    2. click Run Now
    3. Messages will appear. Test successful when the last message is "Termination: Backup OK"
  6. Create a backup job for the client with the correct fileset.
More information: Official Documentation

No comments:

Post a Comment