74
Welcome to the Introduction Workshop WLAN: id: osbc password: osbc2015 Workshop: Bareos Introduction

Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

­

Welcome to the

Introduction WorkshopWLAN:id: osbcpassword: osbc2015

Workshop: Bareos Introduction

Page 2: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install
Page 3: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Agenda1.  Setup a virtual machine2.  Introduction of Hosts and Attendees3.  Install Bareos4.  Install Bareos­WebUI5.  Introduce Bareos Architecture6.  Introduce Bareos Configuration7.  Addressing, Passwords, Names8.  Working with Bareos9.  Working with Bareos­WebUI10.  Exercises11.  Open Talk

Page 4: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Setup Virtual Machinefirst stepsMake sure you have VirtualBox installedConnect your laptop to the networkget DHCP address

Page 5: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Download and unpack Appliance ofyour choice

download from   (Wired)openSUSE 13.2Debian 8CentOS 7

Import into virtualbox

http://192.168.1.1/

Page 6: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Import appliance1.  Start Virtualbox2.  File .. Import Appliance3.  Choose .ovf

Page 7: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Introduction of the hostsFrank Berkgkempermain programmer of bareos WebUI

Philipp Storzfounder of bareosprogramming and coordination

Page 8: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Introduction of attendeesPlease tell us yournameorganizationexperience with bareos or bacula

Page 9: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Create teamstwo personscan solve tasks together

Page 10: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

login informationUsername: root / bareosPassword: bareos

Page 11: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

configure keyboard

Page 12: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

configure individual hostnameedit /etc/hostnameedit /etc/hostsreboot

Page 13: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Take a snapshotTake a snapshot of the vmIf things go wrong, you can always go back

configure/check Network:bridged Network to eth0/wlan0

Page 14: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Installation of Bareos

2: Installing Bareos*Use Use Database of your choice 

http://doc.bareos.org

http://download.bareos.org/bareos/release/15.2/

Page 15: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Installation: PackagesAdd RepositoryInstall Packages

Page 16: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Installation: Prepare Databasecreate_bareos_databasemake_bareos_tablesgrant_bareos_privileges

Page 17: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Installation: Start the Daemonssystemctl start bareos­dirsystemctl start bareos­sdsystemctl start bareos­fd

Page 18: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Installation: Basic Testsstart bconsolestatus directorstatus clientstatus storage

Page 19: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Installation: SUCCESSWhat did we do?added the repositoryinstalled the bareos softwarestarted the daemonschecked daemons are running

Page 20: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Installation Bareos­Webui

 https://github.com/bareos/bareos­webui/blob/bareos­15.2/doc/INSTALL.md

Page 21: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos­Webui: restricted consoleStep 1 is already doneCentOS: yum install epel­releaseStep 2: Configure restricted consoles

Page 22: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos­Webui: Apache Configuration

Page 23: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos­Webui: Webui configuration

Page 24: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Webui: First Login

Page 25: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos­Webui: Watch out!CentOS: Needs EPEL RepoCentOS: Selinux needssetsebool ­P httpd_can_network_connect on

Page 26: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos Architecture

Communication via TCP/IPdefined ports are usedcommunication can use TLS

Page 27: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

FileDaemonRuns on Client Computerread, write, verify filesread, write ACLs, attributesmake VSS snapshotschecksum calculationcompression/encryptionrun scripts

Page 28: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Storage Daemondevice access (disk, tape)media changer controlread barcodes labelswrite logical labelsrun copy and migration jobshandle media errors

Page 29: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Directorhandle catalogmedia and pool handlingschedulingdetermine what to backupbackup leveldoes message, statistics and reportsrun scripts

Page 30: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Catalogstore info about all files, media, jobsPostgreSQL/MySQL/SQLite DB

Page 31: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

bconsole

UI for restoresquery statuscatalog queriesrun jobs

Page 32: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos WebUIResource InformationBackupRestoreStatisticsErrorsNO DB connection

Page 33: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos Architecture

Page 34: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Architecture Testwhich bareos daemon schedules the backups?where is the administrative data stored?which bareos daemon reads and writes files on the client?which bareos daemon handles media?

Page 35: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos ConfigurationConfiguration is done in config filesEach daemon has its own config fileusually in /etc/bareosbareos­dir.confbareos­fd.confbareos­sd.confbconsole.conf

Page 36: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Bareos configuration syntaxConfiguration files consist ofresourcesdirectives

resources can have subresources  resourcename {    directive = value    directive = value      SubResource {        directive = value        directive = value    }  }

Page 37: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Most important Director Resources:DirectorFilesetScheduleClientJob

Page 38: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Director Resource: Definition ofDirectors' properties

     Director {                            # define myself       Name = bareos­dir       QueryFile = "/usr/lib/bareos/scripts/query.sql"       Maximum Concurrent Jobs = 1       Password = "UbCeWuuamTN/FNQhNH7rbdmx8X+ra9j0UkMMrSdUmkO4"         # Console password       Messages = Daemon

       # remove comment in next line to load plugins from specified directory       # Plugin Directory = /usr/lib64/bareos/plugins     }

Page 39: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

FileSet: Definition what to backup     FileSet {       Name = "Full Set"       Include {         Options {           signature = MD5         }         File = /usr/sbin       }

Page 40: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Schedule: Definition when to run abackup

     Schedule {       Name = "WeeklyCycle"       Run = Full 1st sun at 23:05       Run = Differential 2nd­5th sun at 23:05       Run = Incremental mon­sat at 23:05     }

Page 41: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Client: Definition of a Client     Client {       Name = bareos­fd       Address = bareos       Password = "lecCqzgBjxgM0J3+1adiuLzhy0cPGIHrdYMdtGHMbvKX"          # password for FileDaemon       File Retention = 30 days            # 30 days       Job Retention = 6 months            # six months       AutoPrune = no                      # Prune expired Jobs/Files     }

Page 42: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Job: Definition of a Jobcombines the other resources to a runnable backup job

   Job {     [...]     Client = bareos­fd       # what client to backup?     FileSet = "Full Set"     # which files to backup?     Schedule = "WeeklyCycle" # when to backup?     Storage = File           # where to backup?     Messages = Standard      # where to send messages?     Pool = File              # what target pool?   }

Page 43: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Configuration Testwhich resource configures when a job is scheduled?which resource configures what files are backed up?which resource configures what client to backup?which resource combines the other resources?

Page 44: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Addresses, Passwords, NamesTricky for beginnersDirector is the bossNeeds to know how to connectNeeds to authenticate

Page 45: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Addresses, Passwords,Names

Addressing via1.  Address2.  Port (usually default value is usedAuthentication via1.  Name2.  Password

Page 46: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Addresses, Passwords, NamesDirector knows of each daemon (Client, Storage)connection infoAddressPort

authentication infoNamePassword

Client {  Name = bareos­fd  Address = bareos  Password = "GfYPqgmav"  [FDPort]}

Page 47: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Addresses, Passwords, NamesEach Daemon (Client/Storage) knowsauthentication infoDirector NameDirector Password

 Director {    Name = bareos­dir    Password = "GfYPqgmav" }

Page 48: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Names and Passwords

Director FileDaemon

StorageDaemonClient { Name = CLINAME Password = CLIPW}

Director { Name = DIRNAME}

Storage { Name = STORNAME Password = STORPW}

Director { Name = DIRNAME PASS = CLIPW}

Director { Name = DIRNAME PASS = STORPW}

FileDaemon { Name = CLINAME}

Storage { Name = STORNAME}

Page 49: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

connection dir to fd1.  Lookup client's address in client resource2.  Connect to that address and port3.  Use name and password to authenticate

Page 50: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Example: director to fd connection:Director Client

Client { Name = client-fd Address = client.example.com FD Port = 9102 Password = "+hAtR..."}

consolestatus client =client-fd

lookup client-fd resource

network connect toclient.example.com:9102

hello director bareos-dir calling

pw hash=xxxx

Director { Name = director-dir...

lookup baros-dir resource

Director { Name = director-dir Password = "+hAtR..."

check if password hashis correctaccept connection

Page 51: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

What about the Data Channel?

Director FileDaemon

StorageDaemonClient { Name = CLINAME Password = CLIPW}

Director { Name = DIRNAME}

Storage { Name = STORNAME Password = STORPW}

?Storage { Name = STORNAME Password = STORPW}

Client { Name = CLINAME Password = CLIPW}

Data is transferred directly betweenFiledaemon and Storage Demon

BUT: No Storage Resource ClientNo Client Resource in Storage

Page 52: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

active Client

Director FileDaemon

StorageDaemon

Director { Name = DIRNAME}

generateAuthorization key

Auth Key: ACDD-DAFAD-ZUHZ

Authorization keyClient Name

Address = STORADDR Auth Key = ACDD-DAFAD-ZUHZ

Storage { Name = STORNAME Password = STORPW Address= STORADDR}

Auth Key: ACDD-DAFAD-ZUHZClient Name: BackupClient1

Authorizati

on key

Storage Address

1

23

Page 53: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

start console  Connecting to Director localhost:9101  1000 OK: localhost­dir Version: 15.2.1 (24 August 2015)  Enter a period to cancel a command.  *

execute help

Page 54: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

estimate command*estimateThe defined Job resources are:     1: BackupClient1     2: BackupCatalog     3: RestoreFiles     Select Job resource (1­3): 1     Using Catalog "MyCatalog"     Connecting to Client localhost­fd at localhost:9102     2000 OK estimate files=576 bytes=53,164,275

Page 55: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

estimate listing *estimate listing [..] Using Catalog "MyCatalog" Connecting to Client bareos­fd at bareos:9102 ­rwxr­xr­x   1 root     root           13973 2014­09­17 15:15:46  /usr/sbin/grub­install.unsupported ­rw­r­­r­­   1 root     root             987 2014­09­17 15:15:46  /usr/sbin/envvars lrwxrwxrwx   1 root     root              24 2014­09­18 14:22:29  /usr/sbin/httpd2 ­> /usr/sbin/httpd2­prefork [..] ­rwxr­xr­x   1 root     root           14768 2014­09­17 15:15:46  /usr/sbin/switch_root ­rwxr­xr­x   1 root     root            1593 2014­09­17 15:15:46  /usr/sbin/grubonce drwxr­xr­x   2 root     root           12288 2014­09­18 14:22:29  /usr/sbin 2000 OK estimate files=310 bytes=18,987,521

Page 56: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

run job BackupClient1 *run Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" A job name must be specified. The defined Job resources are:      1: BackupClient1      2: CopyToTape      3: BackupCatalog      4: RestoreFiles Select Job resource (1­4): 1 Run Backup job JobName:  BackupClient1 Level:    Incremental Client:   bareos­fd Format:   Native FileSet:  Full Set Pool:     File (From Job resource) Storage:  File (From Job resource)

Page 57: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

check status by looking for messages*messages18­Sep 17:16 bareos­dir JobId 1: No prior Full backup Job record found.18­Sep 17:16 bareos­dir JobId 1: No prior or suitable Full backup found in catalog. Doing FULL backup.18­Sep 17:16 bareos­dir JobId 1: Start Backup JobId 1, Job=BackupClient1.2014­09­18_17.16.49_0818­Sep 17:16 bareos­dir JobId 1: Created new Volume "File­0001" in catalog.18­Sep 17:16 bareos­dir JobId 1: Using Device "FileStorage" to write.18­Sep 17:16 bareos­sd JobId 1: Labeled new Volume "File­0001" on device "FileStorage" (/var/lib/bareos/storage).18­Sep 17:16 bareos­sd JobId 1: Wrote label to prelabeled Volume "File­0001" on device "FileStorage" (/var/lib/bareos/storage)18­Sep 17:17 bareos­sd JobId 1: Elapsed time=00:00:15, Transfer rate=1.267 M Bytes/second18­Sep 17:17 bareos­dir JobId 1: Bareos bareos­dir 14.3.0 (21Aug14):  Build OS:               x86_64­suse­linux­gnu suse openSUSE 13.1 (Bottle) (x86_64)  JobId:                  1  Job:                    BackupClient1.2014­09­18_17.16.49_08  Backup Level:           Full (upgraded from Incremental)  Client:                 "bareos­fd" 14.3.0 (21Aug14) x86_64­suse­linux­gnu,suse,openSUSE 13.1 (Bottle) (x86_64)  FileSet:                "Full Set" 2014­09­18 17:16:52  Pool:                   "File" (From Job resource)  Catalog:                "MyCatalog" (From Client resource)

Page 58: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

restore files*restoreTo select the JobIds, you have the following choices:     1: List last 20 Jobs run     2: List Jobs where a given File is saved     3: Enter list of comma separated JobIds to select     4: Enter SQL list command     5: Select the most recent backup for a client[..]5[...]You have selected the following JobId: 1

Building directory tree for JobId(s) 1 ...  ++++++++++++++++++++++++++++++++++++++++++++309 files inserted into the tree.cwd is: /

$ find *[...]

Page 59: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

check restore*mess18­Sep 17:29 bareos­dir JobId 2: Start Restore Job RestoreFiles.2014­09­18_17.29.41_0918­Sep 17:29 bareos­dir JobId 2: Using Device "FileStorage" to read.18­Sep 17:29 bareos­sd JobId 2: Ready to read from volume "File­0001" on device "FileStorage" (/var/lib/bareos/storage).18­Sep 17:29 bareos­sd JobId 2: Forward spacing Volume "File­0001" to file:block 0:196.18­Sep 17:29 bareos­dir JobId 2: Bareos bareos­dir 14.3.0 (21Aug14):  Build OS:               x86_64­suse­linux­gnu suse openSUSE 13.1 (Bottle) (x86_64)  JobId:                  2  Job:                    RestoreFiles.2014­09­18_17.29.41_09  Restore Client:         bareos­fd  Start time:             18­Sep­2014 17:29:43  End time:               18­Sep­2014 17:29:45  Elapsed time:           2 secs  Files Expected:         1  Files Restored:         1  Bytes Restored:         49,296  Rate:                   24.6 KB/s  FD Errors:              0

check in system:$ find /tmp/bareos­restores//tmp/bareos­restores//tmp/bareos­restores/usr/tmp/bareos­restores/usr/sbin/tmp/bareos­restores/usr/sbin/mtx

Page 60: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

bconsole testWhat command shows possible available commands?What command is used to show how much data a backup willcontain, and how can the exact files be shown?What command is used to run a backup?What command is used to do a recover files?

Page 61: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Exercise 1BackupClient1 should additionally backup /etcHint: reload command can be used to update dirconfiguration without new start

Page 62: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Solution for Exercise 11.  Add line "File = /etc" to FileSet "Full Set" in /etc/bareos­dir.conf2.  open bconsole and type "reload"3.  run "estimate listing" to see if /etc would be backed up4.  alternatively, run job "BackupClient1"

Page 63: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

status commandshows status of system components

Page 64: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

status directorshows next scheduled jobs

shows running jobs

show terminated jobs

Scheduled Jobs:Level          Type     Pri  Scheduled          Name               Volume===================================================================================Incremental    Backup    10  19­Sep­14 23:05    BackupClient1      File­0001Incremental    Copy      10  19­Sep­14 23:05    CopyToTape         Full           Backup    11  19­Sep­14 23:10    BackupCatalog      File­0001

Running Jobs:Console connected at 19­Sep­14 13:51No Jobs running.

Terminated Jobs: JobId  Level    Files      Bytes   Status   Finished        Name ====================================================================     1  Full        310    18.98 M  OK       18­Sep­14 17:17 BackupClient1     2                1    49.29 K  OK       18­Sep­14 17:29 RestoreFiles

Page 65: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

status clientshows runnig jobs on client

shows terminated jobs on client Terminated Jobs:

info comes from local status filecan differ from director view as other director can also connectthis client

Running Jobs:Director connected at: 19­Sep­14 13:54No Jobs running.====

JobId  Level    Files      Bytes   Status   Finished        Name ======================================================================    1  Full        310    18.98 M  OK       18­Sep­14 17:17 BackupClient1    2                1    49.29 K  OK       18­Sep­14 17:29 RestoreFiles    3  Incr          0         0   OK       18­Sep­14 23:05 BackupClient1====

Page 66: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

status storageshows running jobsshows waiting jobsshows terminated jobsshows device status Autochanger "LTO­Changer" withdevices:

Device "FileStorage" (/var/lib/bareos/storage) is not open.Device "Drive­1" (/dev/nst0) is not open.

shows volume status

  "Drive­1" (/dev/nst0)

   Drive 0 is not loaded.

Used Volume status:====

====

Page 67: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

status schedulershows what jobs are triggered by which schedule

shows a preview for 7 days

Schedule               Jobs Triggered===========================================================WeeklyCycle                       BackupClient1                       CopyToTape

WeeklyCycleAfterBackup                       BackupCatalog

Scheduler Preview for 7 days:

Date                   Schedule                Overrides==============================================================Fri 19­Sep­2014 23:05  WeeklyCycle             Level=IncrementalFri 19­Sep­2014 23:10  WeeklyCycleAfterBackup  Level=FullSat 20­Sep­2014 23:05  WeeklyCycle             Level=IncrementalSat 20­Sep­2014 23:10  WeeklyCycleAfterBackup  Level=Full[...]

Page 68: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Exercise 2Full Backup of Job BackupClient1 should be scheduled in 5minutes

Page 69: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Solution for Exercise 21.  Add line "Run = Full at 15:05" to Schedule "WeeklyCycle" in

/etc/bareos­dir.conf2.  open bconsole and type "reload"3.  run "status schedule schedule=WeeklyCycle" and check if

schedule is updated4.  wait 5 minutes and check if backup starts

Page 70: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Exercise 3: backup partner's clientPart 1: Configure link between director and client

Page 71: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Solution for Exercise 3 p.11.  Add a client ressource to your director configuration pointing to

your partner's client2.  Add a director ressource to your client's config pointing to your

partner's director3.  Restart director and filedaemon4.  run status client to see if your partner's client is accessible

Page 72: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Exercise 3: backup partner's clientPart 2: configure a backup job for partner's client

Page 73: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Solution for Exercise 3 p.21.  Create a fileset to backup your partner's client2.  Create a job ressource to backup partner's client3.  Run backup of your partner's client4.  Run restore to your partner's client

Page 74: Workshop: Bareos Introduction Welcome to the · Workshop: Bareos Introduction. Agenda 1. Setup a virtual machine 2. Introduction of Hosts and Attendees 3. Install Bareos 4. Install

Open talkyour questions?other ideas:Disaster recoveryusage of bls/bextractcheck copy to tape setup in vm

Philipp Storz, Bareos GmbH & Co. KG Open Source Backup Conference 2015