Bareos
- Backup Archiving REcovery Open Sourced
Ambiente:
- Debian 8 Jessie
- PostgreSQL 9.4
- Bareos 16.2
Instalação PostgreSQL
Crei o arquivo pgdg.list em "/etc/apt/sources.list.d/"
# deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
Importação da chave do repositório
# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
apt-key add -
Crei o arquivo pgdg.list em "/etc/apt/sources.list.d/"
# deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
Importação da chave do repositório
# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
apt-key add -
Atualize os pacotes
# apt-get update
Instalação do PostgreSQL 9.4
# apt-get install postgresql-9.4
Instalação Bareos 16.2 + Bareos Webui
Adicionando o Bareos no repositório
Instalação do PostgreSQL 9.4
# apt-get install postgresql-9.4
Instalação Bareos 16.2 + Bareos Webui
Adicionando o Bareos no repositório
# URL=http://download.bareos.org/bareos/release/latest/Debian_8.0/
# printf "deb $URL /\n" > /etc/apt/sources.list.d/bareos.list
# wget -q $URL/Release.key -O- | apt-key add -
Atualize os pacotes
# apt-get update
Instalação do Bareos
# apt-get install bareos
# apt-get bareos-database-postgresql
Execute os scripts para o PostgreSQL, no dbconfig-common clique em Não. # su - postgres -c /usr/lib/bareos/scripts/create_bareos_database
# su - postgres -c /usr/lib/bareos/scripts/make_bareos_tables
# su - postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
Instalação do Interface Web do Bareos.
Essa interface permite a visualização de Jobs, Execução de Jobs, Visualização de Volumes, Pools, Clients e Restores.
# apt-get install bareos-webui
Inicie os Daemons
# service bareos-dir start
# service bareos-sd start
# service bareos-fd start
Crie o arquivos webui-admin.conf "/etc/bareos/bareos-dir.d/console".
Neste arquivo iremos colocar a senha para o usuário admin e apontar para o Profile ao qual ele pertence, neste caso apontamos para "webui-admin"
Inicie os Daemons
# service bareos-dir start
# service bareos-sd start
# service bareos-fd start
Crie o arquivos webui-admin.conf "/etc/bareos/bareos-dir.d/console".
Neste arquivo iremos colocar a senha para o usuário admin e apontar para o Profile ao qual ele pertence, neste caso apontamos para "webui-admin"
webui-admin.conf
Console {
Name = admin
Password = "12345
Profile = "webui-admin"
}
Crie o arquivo webui-admin no diretorio "/etc/bareos/bareos-dir.d/profile"
webui-admin.conf
Profile {
Name = "webui-admin"
CommandACL = !.bvfs_clear_cache, !.exit, !.sql, !configure, !create, !delete, !purge, !sqlquery, !umount, !unmount, *all*
Job ACL = *all*
Schedule ACL = *all*
Catalog ACL = *all*
Pool ACL = *all*
Storage ACL = *all*
Client ACL = *all*
FileSet ACL = *all*
Where ACL = *all*
}
Inicie os Daemons
# service bareos-dir restart
# service bareos-sd restart
# service bareos-fd restart
Reinicie o Apache
# /etc/init.d/apache2 restart
Acesse o Navegador
http://localhost/bareos-webui
Entre com o usuário e senha.
Retorne ao SSH e teste executando um Job do proprio servidor.
# bconsole
Connecting to Director localhost:9101
1000 OK: bareos-dir Version: 16.2.4 (01 July 2016)
Enter a period to cancel a command.
*run
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
A job name must be specified.
The defined Job resources are:
1: RestoreFiles
2: BackupCatalog
3: backup-bareos-fd
Select Job resource (1-3): 3
Run Backup job
JobName: backup-bareos-fd
Level: Incremental
Client: bareos-fd
Format: Native
FileSet: SelfTest
Pool: Incremental (From Job IncPool override)
Storage: File (From Job resource)
When: 2016-12-15 19:17:41
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=1
You have messages.
*status client
Automatically selected Client: bareos-fd
Connecting to Client bareos-fd at localhost:9102
bareos-fd Version: 16.2.4 (01 July 2016) x86_64-pc-linux-gnu debian Debian GNU/Linux 8.0 (jessie)
Daemon started 15-Dez-16 18:57. Jobs: run=0 running=0.
Heap: heap=270,336 smbytes=125,110 max_bytes=125,304 bufs=118 max_bufs=120
Sizeof: boffset_t=8 size_t=8 debug=0 trace=0 bwlimit=0kB/s
Running Jobs:
JobId 1 Job backup-bareos-fd.2016-12-15_19.17.44_27 is running.
Full Backup Job started: 15-Dez-16 19:17
Files=220 Bytes=14,788,171 Bytes/sec=3,697,042 Errors=0
Bwlimit=0
Files Examined=220
Processing file: /usr/sbin/sshd
SDReadSeqNo=5 fd=5
bareos-dir (director) connected at: 15-Dez-16 19:17
====
Terminated Jobs:
====
*
Connecting to Director localhost:9101
1000 OK: bareos-dir Version: 16.2.4 (01 July 2016)
Enter a period to cancel a command.
*run
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
A job name must be specified.
The defined Job resources are:
1: RestoreFiles
2: BackupCatalog
3: backup-bareos-fd
Select Job resource (1-3): 3
Run Backup job
JobName: backup-bareos-fd
Level: Incremental
Client: bareos-fd
Format: Native
FileSet: SelfTest
Pool: Incremental (From Job IncPool override)
Storage: File (From Job resource)
When: 2016-12-15 19:17:41
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=1
You have messages.
*status client
Automatically selected Client: bareos-fd
Connecting to Client bareos-fd at localhost:9102
bareos-fd Version: 16.2.4 (01 July 2016) x86_64-pc-linux-gnu debian Debian GNU/Linux 8.0 (jessie)
Daemon started 15-Dez-16 18:57. Jobs: run=0 running=0.
Heap: heap=270,336 smbytes=125,110 max_bytes=125,304 bufs=118 max_bufs=120
Sizeof: boffset_t=8 size_t=8 debug=0 trace=0 bwlimit=0kB/s
Running Jobs:
JobId 1 Job backup-bareos-fd.2016-12-15_19.17.44_27 is running.
Full Backup Job started: 15-Dez-16 19:17
Files=220 Bytes=14,788,171 Bytes/sec=3,697,042 Errors=0
Bwlimit=0
Files Examined=220
Processing file: /usr/sbin/sshd
SDReadSeqNo=5 fd=5
bareos-dir (director) connected at: 15-Dez-16 19:17
====
Terminated Jobs:
====
*
Referência:
Nenhum comentário:
Postar um comentário