The hosts-config.yml
configuration file defines many settings to run the backup and restore procedure, like the location of the backup directory or where all servers can be found according to the roles.
The pre-packaged hosts-config.yml
file is only given as a template. It must be customized to suit your needs.
Some settings are specific to roles: bo
, idx
, front
, search
, um
, nerada
.
A role has a name and a list of datasets which defines what to backup. There are some special roles that are handled specifically, but users can use any string as a role name.
The following lines show an exhaustive example of hosts-config.yml
file:
defaults:
backup_dir: /usr/local/afs7/backup
backup_format: tgz
tmp_dir: /tmp
ssh:
user: antidot
key: /home/antidot/.ssh/default_ssh_key_file
hosts:
- hostname: ft-bo1.hot-cluster
dst_host: ft-bo1.warm-cluster
roles:
- bo
- um
bo:
user: antidot
password: secret_password
- hostname: ft-idx01.hot-cluster
roles:
- idx
idx:
timeout_sec: 7200
service_ids:
- 123
- 789
ssh:
key: /secret/ssh_key
user: spec_user
backup_dir: /another/directory
tmp_dir: /yet/another/one
- hostname: ft-front01.hot-cluster
roles:
- search
- webapp
- hostname: ft-front02.hot-cluster
roles:
- webapp
- hostname: ft-front03.hot-cluster
roles:
- search
- hostname: ft-mongo01.hot-cluster
roles:
- nerada
The following example shows how all Fluid Topics components are backed up on a backup server:
The following example shows how all Fluid Topics components are restored from a backup server:
The my-hosts.yml
file is created to suit this need:
defaults:
backup_dir: /usr/local/afs7/backup
backup_format: tgz
tmp_dir: /tmp
hosts:
- hostname: ft-front01
roles:
- search
- webapp
- hostname: ft-front02
roles:
- webapp
- search
- hostname: ft-bo1
roles:
- bo
- um
bo:
user: antidot
password: secret_password
- hostname: ft-idx01
roles:
- idx
- hostname: ft-mongo01
roles:
- nerada
Once the my-hosts.yml
file is created, the following command is used:
afs_backup_tool --action backup --data-config /usr/local/afs7/Fluid-Topics/conf-backup/ft-data-config.yml --hosts-config my-hosts.yml