Hello not sure what i am doing with bacula yet lots or options still
unclear about most of them, but i think i know what i want bacula to
do. Need to backup almost complete file systems of at least 2 servers I
wish to have a separate pools for each server not sure about the
labeling structure yet still confused about that. I am having problems
with my storage daemon and keep getting these errors.
Device status:
Device "fileontokyo" (/home/backups/bacula) is not open or does not exist.
Device "shoemasters.com" (/home/backups/bacula/shoemasters.com) is not
open or does not exist.
Device "computerking.ca" (/home/backups/bacula/computerking.ca) is not
open or does not exist.
These directories do exist and have perms like below is this an ok perm
setup for bacula to work with does it have access to what it need is it
secure enough?
under /
drwxr-xr-x 13 root wheel 512 Mar 25 15:15 home
under /home
drwxr-xr-x 5 root wheel 512 Mar 11 02:35 backups
under /home/backups
drwxr-xr-x 4 bacula wheel 512 Mar 25 15:41 bacula
under /home/backups/bacula
drwxr-xr-x 2 bacula wheel 512 Mar 25 15:41 shoemasters.com
under /home/backups/bacula/shoemasters.com
-rw-r----- 1 bacula wheel 217 Mar 25 15:41 06032501
I have looked at some other threads on this list and it seems the
following would be pudent to include as well as my bacula conf file
which are attached. I know these files are a mess but i am still
struggling with finding a sensible order and format for my purposes as
well as making them work.
*list volumes
Pool: Default
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | VolBytes | VolFiles | VolRetention
| Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 3 | 01 | Append | 1 | 0 | 31,536,000
| 1 | 0 | 1 | File | 0000-00-00 00:00:00 |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
Pool: shoemasters.com
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------------+---------------------+
| MediaId | VolumeName | VolStatus | VolBytes | VolFiles | VolRetention
| Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------------+---------------------+
| 4 | 06032501 | Append | 1 | 0 | 2,592,000
| 1 | 0 | 1 | shoemasters.com | 0000-00-00 00:00:00 |
| 5 | shoe01 | Append | 1 | 0 | 2,592,000
| 1 | 0 | 1 | File | 0000-00-00 00:00:00 |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------------+---------------------+
*list pools
+--------+-----------------+---------+---------+----------+-------------+
| PoolId | Name | NumVols | MaxVols | PoolType | LabelFormat |
+--------+-----------------+---------+---------+----------+-------------+
| 2 | Default | 1 | 0 | Backup | * |
| 3 | shoemasters.com | 2 | 0 | Backup | Recycle- |
+--------+-----------------+---------+---------+----------+-------------+
*list media
Pool: Default
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | VolBytes | VolFiles | VolRetention
| Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 3 | 01 | Append | 1 | 0 | 31,536,000
| 1 | 0 | 1 | File | 0000-00-00 00:00:00 |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
Pool: shoemasters.com
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------------+---------------------+
| MediaId | VolumeName | VolStatus | VolBytes | VolFiles | VolRetention
| Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------------+---------------------+
| 4 | 06032501 | Append | 1 | 0 | 2,592,000
| 1 | 0 | 1 | shoemasters.com | 0000-00-00 00:00:00 |
| 5 | shoe01 | Append | 1 | 0 | 2,592,000
| 1 | 0 | 1 | File | 0000-00-00 00:00:00 |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------------+---------------------+
*
#
# Default Bacula Storage Daemon Configuration file
# For Bacula release 1.36.2 (28 February 2005) -- freebsd 5.4-RELEASE
#
Storage {
Name = tokyo-sd
SDPort = 9103
WorkingDirectory = "/var/db/bacula"
Pid Directory = "/var/run"
Maximum Concurrent Jobs = 20
}
Director {
Name = tokyo-dir
Password = "22vu22"
}
Director {
Name = tokyo-mon
Password = "22vu22"
Monitor = yes
}
Device {
Name = fileontokyo
Media Type = File
Archive Device = /home/backups/bacula
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
LabelMedia = yes
}
Device {
Name = shoemasters.com
Media Type = shoemasters.com
Archive Device = /home/backups/bacula/shoemasters.com
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
Device {
Name = computerking.ca
Media Type = computerking.ca
Archive Device = /home/backups/bacula/computerking.ca
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
Messages {
Name = Standard
director = tokyo-dir = all
}
#BACULA DIR FILE
#
Director {
Name = tokyo-dir
DIRport = 9101
QueryFile = "/usr/local/share/bacula/query.sql"
WorkingDirectory = "/var/db/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 5
Password = "22vu22"
Messages = Daemon
}
Console {
Name = tokyo-mon
Password = "22vu22"
CommandACL = status, .status
}
Storage {
Name = fileontokyo
Address = tokyo.computerking.ca
SDPort = 9103
Password = "22vu22"
Device = fileontokyo
Media Type = File
}
#DEFAULTS FOR JOBS, FILESETS, POOLS, AND SCHEDULES----------------------------
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Schedule = "WeeklyCycle"
Storage = fileontokyo
Messages = Standard
Pool = Default
Priority = 10
}
FileSet {
Name = "DefaultFileSet"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /
}
Exclude {
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Accept Any Volume = yes # write on any volume in the pool
}
# differential (i.e. incremental since full) every other sunday,
# and incremental backups other days
Schedule {
Name = "WeeklyCycle"
Run = Full 1st sun at 02:05
Run = Differential 2nd-5th sun at 02:05
Run = Incremental mon-sat at 02:05
}
#MY JOBS
##########################################################################-
Job {
Name = "tokyo-job"
JobDefs = "DefaultJob"
Write Bootstrap = "/var/db/bacula/tokyo-catalog.bsr"
FileSet = tokyo-fileset1
Client = tokyo-fd
}
Client {
Name = tokyo-fd
Address = tokyo.computerking.ca
FDPort = 9102
Catalog = MyCatalog
Password = "22vu22" # password for FileD
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
FileSet {
Name = "tokyo-fileset1"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /
File = /var
File = /usr
File = /home
}
Exclude {
File = /proc
File = /tmp
File = /.journal
File = /.fsck
File = /usr/src
File = /usr/ports
File = /usr/obj
}
}
# shoemasters.com =============================================================
# shoemastes.com the main mail server
Job {
Name = "shoemasters.com"
Type = Backup
Level = incremental
Client = shoemasters.com-fd
Fileset = shoemasters.com
Messages = Standard
Storage = shoemasters.com
Pool = shoemasters.com
Schedule = shoemasters.com-monthly
# JobDefs = "DefaultJob"
Write Bootstrap = "/var/db/bacula/shoemasters.com.bsr"
# ClientRunBeforeJob = "/opt/zimbra/zimbra_hot_backupf.sh"
# ClientRunBeforeJob = "/opt/zimbra/bin/zimbra stop"
# ClientRunAfterJob = "/opt/zimbra/bin/zimbra start"
# ClientRunBeforeJob = "/opt/zimbra/zimbrastop.scr"
# ClientRunAfterJob = "/opt/zimbra/zimbrastart.scr"
}
# Client (File Services) to backup
Client {
Name = shoemasters.com-fd
Address = shoemasters.com
FDPort = 9102
Catalog = MyCatalog
Password = "22vu22" # password for FileD
# File Retention = 1 months # 30 days
# Job Retention = 1 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
FileSet {
Name = "shoemasters.com"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /
}
Exclude {
File = /tmp
File = /lost+found
File = /opt
}
}
Storage {
Name = shoemasters.com
Address = tokyo.computerking.ca
SDPort = 9103
Password = "22vu22"
Device = shoemasters.com
Media Type = shoemasters.com
}
Pool {
Name = shoemasters.com
Use Volume Once = yes
Pool Type = Backup
LabelFormat = "Recycle-"
AutoPrune = yes
VolumeRetention = 1 month
Maximum Volume Bytes = 671088640
Recycle = yes
}
Schedule {
Name = "shoemasters.com-monthly"
Run = Full 1st sun at 02:05
Run = Differential 2nd-5th sun at 02:05
Run = Incremental mon-sat at 02:05
}
#CATALOG
#####################################################################################
# This schedule does the catalog. It starts after the WeeklyCyc
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 2:10
}
# Generic catalog service
Catalog {
Name = MyCatalog
dbname = bacula; user = bacula; password = ""
}
# Backup the catalog database (after the nightly save)
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
Level = Full
FileSet="tokyo-catalog"
Schedule = "WeeklyCycleAfterBackup"
# This creates an ASCII copy of the catalog
RunBeforeJob = "/usr/local/share/bacula/make_catalog_backup bacula bacula"
# This deletes the copy of the catalog
RunAfterJob = "/usr/local/share/bacula/delete_catalog_backup"
Write Bootstrap = "/var/db/bacula/BackupCatalog.bsr"
Priority = 11 # run after main backup
client = tokyo-fd
}
# This is the backup of the catalog
FileSet {
Name = "tokyo-catalog"
Include {
Options {
signature = MD5
}
File = /var/db/bacula/bacula.sql
}
}
#Job {
# Name = "tokyo-job"
# JobDefs = "DefaultJob"
# Write Bootstrap = "/var/db/bacula/tokyo-catalog.bsr"
# FileSet = tokyo-catalog
# Client = tokyo-fd
#}
#MESSAGES
######################################################################################
# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
# to replace the %r in the from field (-f part) with a single valid
# email address in both the mailcommand and the operatorcommand.
#
mailcommand = "/usr/local/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\"
-s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/local/sbin/bsmtp -h localhost -f \"\(Bacula\)
%r\" -s \"Bacula: Intervention needed for %j\"
Mail = [EMAIL PROTECTED] = all, !skipped !terminate
operator = [EMAIL PROTECTED] = 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/db/bacula/log" = all, !skipped !terminate
}
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/local/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\"
-s \"Bacula daemon message\" %r"
Mail = [EMAIL PROTECTED] = all, !skipped
console = all, !skipped, !saved
append = "/var/db/bacula/log" = all, !skipped
}
#RESTORE JOBS -----------------------------------------------------------------
# Standard Restore template, to be changed by Console program
Job {
Name = "RestoreFiles"
Type = Restore
Client=tokyo-fd
FileSet="tokyo-fileset1"
Storage = fileontokyo
Pool = Default
Messages = Standard
Where = /home/bacula-restores
}
#reset the database
#
# cd <install-directory>
# /usr/local/share/bacula/drop_mysql_tables
# /usr/local/share/bacula/make_mysql_tables
#
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 1.36.2 (28 February 2005) -- freebsd 5.4-RELEASE
#
# There is not much to change here except perhaps the
# File daemon Name to
#
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = weiwobo-dir
Password = "bacula is being a bitch"
}
Director {
Name = tokyo-dir
Password = "22vu22"
}
Director {
Name = weiwobo-mon
Password = "bacula is being a bitch"
Monitor = yes
}
Director {
Name = tokyo-mon
Password = "22vu22"
Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = tokyo-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/db/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = tokyo-dir = all, !skipped
}