Bacula tidak akan menggunakan 2 perangkat tape secara bersamaan. (Cari # - # - # untuk TL; DR)
Mungkin sedikit latar belakang.
Dalam proses mencoba mendapatkan solusi cadangan yang layak (mencadangkan> 20TB tidak murah, atau mudah) $dayjob
, kami membeli banyak hal untuk membuatnya berfungsi.
Pertama, ada autochanger Spectra Logic T50e, 40 slot kebaikan LTO5, dan robot itu mendapatkan sepasang drive IBM HH5 Ultrium LTO5, yang terhubung melalui FibreChannel Arbitrated Loop ke server cadangan kami.
Ada server cadangan .. Dell R715 dengan CPU AMD 62xx 2x16 inti, dan RAM 32GB. Lezat. Server itu mendapat 2 kartu Emulex FCe-12000E, dan sebuah port ganda Intel X520-SR 10GE NIC.
Kami juga dijual Commvault Backup (non-NDMP).
Di sinilah menjadi sangat rumit.
Spectra Logic dan Commvault keduanya mengirim insinyur masing-masing, yang mengatur perpustakaan dan perangkat lunak. Commvault bekerja dengan baik, sejauh pengontrol bekerja dengan baik. Server Dell memiliki server Ubuntu 12.04, dan menjalankan MediaAgent untuk CommVault, dan memasang NAS BlueArc kami sebagai NFS ke beberapa titik mount, seperti /home
, dan beberapa hal masuk /mnt
.
Ketika mencadangkan dari NFS mountpoints, kami melihat ~ = 290GB/hr
throughput. Itu CRAP, mengingat kita punya TB 20-aneh untuk dilewati, dalam jendela cadangan <48 jam. Nilai maksimum yang terukur pada BlueArc adalah 700MB/s
( 2460GB/hr
), kecepatan tulis maksimum terukur pada perangkat kaset adalah 140MB / s, per drive, jadi itulah 492GB/hr
(atau gandakan, untuk total throughput).
Jadi, langkah selanjutnya adalah membandingkan kinerja NFS dengan IOzone, dan ternyata kami mendapatkan kinerja penulisan epik (melintasi> 20 utas), dan rasanya seperti menulis 1,5-2,5TB / jam, tetapi kinerja membaca tidak bisa diharapkan. Saya tidak pernah bisa mendapatkan lebih tinggi dari 343GB / jam maksimum. Jadi mari kita asumsikan bahwa 343GB/hr
ini adalah maksimum teoritis untuk kinerja baca pada NAS, maka kita secara teori harus bisa mendapatkan kinerja dari a) CommVault, dan b) agen cadangan lainnya.
Bukan kasusnya. Commvault sepertinya hanya memberi saya 200-250GB/hr
throughput, dan karena percobaan, saya menginstal Bacula untuk melihat keadaan permainannya. Jika, misalnya, Bacula secara konsisten memberikan kinerja dan kecepatan yang lebih baik daripada Commvault, maka kami dapat mengatakannya"**$.$ Refunds Plz $.$**"
# - # - #
Sayangnya, saya menemukan masalah yang berbeda dengan Bacula. Commvault tampaknya cukup senang membaca dari satu bagian dari mountpoint dengan satu utas, dan mengalirkannya ke perangkat Tape, sambil membaca dari beberapa direktori lain dengan utas lainnya, dan menulis ke drive ke-2 di autochanger.
Saya tidak bisa seumur hidup saya membuat Bacula untuk me-mount dan menulis ke dua tape drive secara bersamaan .
Hal yang sudah saya coba:
- Pengaturan
Maximum Concurrent Jobs = 20
di Director, File dan Storage Daemon - Pengaturan
Prefer Mounted Volumes = no
dalam Definisi Pekerjaan - Mengatur beberapa perangkat di sumber Autochanger.
Dokumentasi tampaknya sangat sentris dengan drive tunggal, dan kami merasa sedikit seperti kami telah mengikatkan roket ke seekor hamster, dengan yang ini. Mayoritas contoh konfigurasi Bacula adalah untuk drive DDS4, pertukaran pita manual, dan sistem FreeBSD atau IRIX.
Saya mungkin harus menambahkan bahwa saya tidak terlalu terganggu jika ini tidak mungkin, tetapi saya akan terkejut. Saya pada dasarnya ingin menggunakan Bacula sebagai bukti untuk menempelkannya ke vendor perangkat lunak bahwa mereka terlalu mahal;)
Saya membaca bahwa @KyleBrandt telah melakukan sesuatu yang mirip dengan solusi Tape modern ..
File Konfigurasi: bacula-dir.conf
#
# Default Bacula Director Configuration file
Director { # define myself
Name = backuphost-1-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run/bacula"
Maximum Concurrent Jobs = 20
Password = "yourekiddingright" # Console password
Messages = Daemon
DirAddress = 0.0.0.0
#DirAddress = 127.0.0.1
}
JobDefs {
Name = "DefaultFileJob"
Type = Backup
Level = Incremental
Client = backuphost-1-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = File
Priority = 10
Write Bootstrap = "/var/lib/bacula/%c.bsr"
}
JobDefs {
Name = "DefaultTapeJob"
Type = Backup
Level = Incremental
Client = backuphost-1-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = "SpectraLogic"
Messages = Standard
Pool = AllTapes
Priority = 10
Write Bootstrap = "/var/lib/bacula/%c.bsr"
Prefer Mounted Volumes = no
}
#
# Define the main nightly save backup job
# By default, this job will back up to disk in /nonexistant/path/to/file/archive/dir
Job {
Name = "BackupClient1"
JobDefs = "DefaultFileJob"
}
Job {
Name = "BackupThisVolume"
JobDefs = "DefaultTapeJob"
FileSet = "SpecialVolume"
}
#Job {
# Name = "BackupClient2"
# Client = backuphost-12-fd
# JobDefs = "DefaultJob"
#}
# Backup the catalog database (after the nightly save)
Job {
Name = "BackupCatalog"
JobDefs = "DefaultFileJob"
Level = Full
FileSet="Catalog"
Schedule = "WeeklyCycleAfterBackup"
# This creates an ASCII copy of the catalog
# Arguments to make_catalog_backup.pl are:
# make_catalog_backup.pl <catalog-name>
RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
# This deletes the copy of the catalog
RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup"
Write Bootstrap = "/var/lib/bacula/%n.bsr"
Priority = 11 # run after main backup
}
#
# Standard Restore template, to be changed by Console program
# Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
Name = "RestoreFiles"
Type = Restore
Client=backuphost-1-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /srv/bacula/restore
}
FileSet {
Name = "SpecialVolume"
Include {
Options {
signature = MD5
}
File = /mnt/SpecialVolume
}
Exclude {
File = /var/lib/bacula
File = /nonexistant/path/to/file/archive/dir
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
File = /usr/sbin
}
Exclude {
File = /var/lib/bacula
File = /nonexistant/path/to/file/archive/dir
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
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
}
# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}
# This is the backup of the catalog
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = "/var/lib/bacula/bacula.sql"
}
}
# Client (File Services) to backup
Client {
Name = backuphost-1-fd
Address = localhost
FDPort = 9102
Catalog = MyCatalog
Password = "surelyyourejoking" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
#
# Second Client (File Services) to backup
# You should change Name, Address, and Password before using
#
#Client {
# Name = backuphost-12-fd
# Address = localhost2
# FDPort = 9102
# Catalog = MyCatalog
# Password = "i'mnotjokinganddontcallmeshirley" # password for FileDaemon 2
# File Retention = 30 days # 30 days
# Job Retention = 6 months # six months
# AutoPrune = yes # Prune expired Jobs/Files
#}
# Definition of file storage device
Storage {
Name = File
# Do not use "localhost" here
Address = localhost # N.B. Use a fully qualified name here
SDPort = 9103
Password = "lalalalala"
Device = FileStorage
Media Type = File
}
Storage {
Name = "SpectraLogic"
Address = localhost
SDPort = 9103
Password = "linkedinmakethebestpasswords"
Device = Drive-1
Device = Drive-2
Media Type = LTO5
Autochanger = yes
}
# Generic catalog service
Catalog {
Name = MyCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport =
dbname = "bacula"; DB Address = ""; dbuser = "bacula"; dbpassword = ""
}
# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
Name = Standard
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
mail = root@localhost = all, !skipped
operator = root@localhost = mount
console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
# time to time as it will grow indefinitely. However, it will
# also keep all your messages if they scroll off the console.
#
append = "/var/lib/bacula/log" = all, !skipped
catalog = all
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root@localhost = all, !skipped
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
}
# Default pool definition
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}
# File Pool definition
Pool {
Name = File
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
}
Pool {
Name = AllTapes
Pool Type = Backup
Recycle = yes
AutoPrune = yes # Prune expired volumes
Volume Retention = 31 days # one Moth
}
# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = backuphost-1-mon
Password = "LastFMalsostorePasswordsLikeThis"
CommandACL = status, .status
}
bacula-sd.conf
#
# Default Bacula Storage Daemon Configuration file
#
Storage { # definition of myself
Name = backuphost-1-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/lib/bacula"
Pid Directory = "/var/run/bacula"
Maximum Concurrent Jobs = 20
SDAddress = 0.0.0.0
# SDAddress = 127.0.0.1
}
#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = backuphost-1-dir
Password = "passwordslinplaintext"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
Director {
Name = backuphost-1-mon
Password = "totalinsecurityabound"
Monitor = yes
}
Device {
Name = FileStorage
Media Type = File
Archive Device = /srv/bacula/archive
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
Autochanger {
Name = SpectraLogic
Device = Drive-1
Device = Drive-2
Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
Changer Device = /dev/sg4
}
Device {
Name = Drive-1
Drive Index = 0
Archive Device = /dev/nst0
Changer Device = /dev/sg4
Media Type = LTO5
AutoChanger = yes
RemovableMedia = yes;
AutomaticMount = yes;
AlwaysOpen = yes;
RandomAccess = no;
LabelMedia = yes
}
Device {
Name = Drive-2
Drive Index = 1
Archive Device = /dev/nst1
Changer Device = /dev/sg4
Media Type = LTO5
AutoChanger = yes
RemovableMedia = yes;
AutomaticMount = yes;
AlwaysOpen = yes;
RandomAccess = no;
LabelMedia = yes
}
#
# Send all messages to the Director,
# mount messages also are sent to the email address
#
Messages {
Name = Standard
director = backuphost-1-dir = all
}
bacula-fd.conf
#
# Default Bacula File Daemon Configuration file
#
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = backuphost-1-dir
Password = "hahahahahaha"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = backuphost-1-mon
Password = "hohohohohho"
Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = backuphost-1-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
#FDAddress = 127.0.0.1
FDAddress = 0.0.0.0
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = backuphost-1-dir = all, !skipped, !restored
}
Jawaban:
Ketika Anda mengeset fileset di bacula, itu akan benar-benar membaca pathspec baris demi baris dan membuat cadangan seperti ini.
Itu tidak akan membuat dua utas untuk membaca jalur file yang berbeda di agen.
Seperti yang dikatakan @SpacemanSpiff, jika Anda ingin melakukan ini, jalan ke depan adalah mengatur pekerjaan yang berbeda, satu untuk setiap filepec yang ingin Anda backup.
sumber
Saya punya tiga tips untuk Anda:
sumber