mila.bareos

Bareos

This guide describes how to set up a BareOS server and its clients.

Variables

Server

Note: You can find more options in defaults/main.yml

  • bareos_install_server - Set to true to install server packages (default is false). This also installs PostgreSQL.
  • bareos_setup_db - Set to true to check if the PostgreSQL database bareos exists, and create it if it doesn’t (default is false).
  • bareos_setup_db_sensu - Set to true to create a sensu database user for monitoring (default is false).
  • bareos_sensu_postgres_pass - Password for the sensu user in PostgreSQL.
  • bareos_email - Email address for notifications and Catalog bootstrap.
  • bareos_dir_ip_eth - IP address for the BareOS Director.
  • bareos_dir_max_concurrent_jobs - Maximum number of concurrent jobs at the Director level (default is 50, optional).
  • bareos_director - Use this to override the backup Director IP address in the client's /etc/hosts.
  • bareos_repo - Default is the BareOS Community Repository; you can switch to the BareOS Subscription Repository.
  • bareos_sd_max_concurrent_jobs - Maximum number of concurrent jobs at the Storage Daemon level (default is 50, optional).

Example for specifying the Director:

bareos_director:
  ip: 10.0.0.1
  name: backup
  • bareos_clients - List of client configurations, in this format:
bareos_clients:
  - name: some-hostname
    ansible_delegate_hostname: some-hostname
    address: 10.1.1.1
    password: MySuperSecretPassword
    enable_backup_job: true
    state: present                      # optional
    autostart: true                     # optional
    director_ip: 10.0.0.1               # optional
    director_name: backup               # optional
    max_job_bandwidth: 1 mb/s           # optional
    max_concurrent_jobs: 42             # optional, defaults to '20'
  • bareos_filesets: List of filesets with this format:
bareos_filesets:
  - name: FilesetFoo
    description: "Backup Foo"
    include_files:
      - /home/foo
    exclude_files:
      - /home/foo/bar

[!WARNING] bareos_filesets[*].include_file has been replaced with bareos_filesets[*].include_files, which allows a list of file paths to include.

[!WARNING] bareos_filesets[*].exclude_file has been replaced with bareos_filesets[*].exclude_files for excluding a list of file paths.

  • bareos_pools: List of storage pools formatted as follows:
bareos_pools:
  - name: FullFoo
    retention: "365 days"               # optional
    max_vol_bytes: 50G                  # optional
    max_vol: 1000                       # optional
    next_pool: FullFooOffsite           # optional
    label: "FullFoo-"
    storage: FileFoo                    # optional if defined at the JobDefs level
  - name: IncrementalFoo
    retention: "365 days"
    max_vol_bytes: 50G
    max_vol: 1000
    label: "IncrementalFoo-"
    storage: FileFoo                    # optional if defined at the JobDefs level

bareos_dir_storage: List of storage devices in this format:

bareos_dir_storage:
  - name: FileFoo
    device: FileStorageFoo
    bareos_dir_ip: 10.0.0.1
    media_type: File2                   # optional, defaults to 'File'
    max_concurrent_jobs: 42             # optional, defaults to '50'

If you have multiple devices, use devices:

bareos_dir_storage:
  - name: FileFoo
    devices:
        - FileStorageFoo
        - FileStorageBar
    bareos_dir_ip: 10.0.0.1
    media_type: File2                   # optional, defaults to 'File'
    max_concurrent_jobs: 42             # optional, defaults to '50'

bareos_devices: List of devices in this format:

bareos_devices:
  - name: FileStorageFoo
    archive_device: /backup
    block_device: /dev/mapper/backup    # optional
    fstype: 'ext4'                      # default
    mode: '0750'                        # default
    opts: ''                            # optional, for ansible.posix.mount
    state: 'mounted'                    # default
    media_type: File2                   # optional, defaults to 'File'
    max_concurrent_jobs: 42             # optional, defaults to '50'

[!WARNING] bareos_devices[*].arch_device is replaced by bareos_devices[*].archive_device.

bareos_schedules: List of schedules formatted as follows:

bareos_schedules:
- name: ScheduleFoo
  full: "Full on 1 at 02:23"
  incr: "Incremental daily at 02:25"

bareos_jobdefs: List of job definitions formatted like this:

bareos_jobdefs:
  - name: JobDefFoo
    level: Incremental
    client: foo-fd
    fileset: FilesetFoo
    schedule: ScheduleFoo
    storage: FileFoo                    # optional
    pool: IncrementalFoo
    full_pool: FullFoo
    incr_pool: IncrementalFoo
    type: JOB_TYPE                      # optional, defaults to 'Backup'
    max_concurrent_jobs: 42             # optional, defaults to '50'

bareos_jobs: List of jobs formatted like this:

bareos_jobs:
  - name: JobFoo
    jobdef: JobDefFoo
    client: foo-fd

NOTES:

  • ansible_delegate_hostname must match the inventory_hostname in the Ansible inventory list. Some tasks will be delegated from the backup server to this client.
  • enable_backup_job - This creates a backup job named DefaultJobLinux.
  • state - Set to absent to remove the client from server configuration (default is present).
  • autostart - Schedule the first backup immediately (default is true).
  • director_ip - [Optional] Same as bareos_director, just set in a different location.
  • director_name - [Optional] Same as bareos_director, just set in a different location.

Client

  • bareos_install_client - Set to true to install client packages (default is false).

Example Playbook

---
- hosts: bareos-client
  become: true
  roles:
    - { name: bareos, tags: bareos }

- hosts: bareos-server
  become: true
  roles:
    - { name: bareos, tags: bareos }

License

GNU GPL

Author Information

Jan Michalek, also known as VeselaHouba

Informazioni sul progetto

Role for managing bareos server & clients

Installa
ansible-galaxy install mila.bareos
Licenza
gpl-3.0
Download
842
Proprietario
Quebec Artificial Intelligence Institute