Mam problem z dostosowaniem połączenia pomiędzy klientem, a serwerem. Jeśli backup ustawie z palca to wykonuje się, jednak gdy go zostawię do wykonania wszystko się sypie. Sądzę, że program po czasie po prostu wywala się na mordę, że tak powiem.
Mianowicie zauważyłem, że po kilkunastu minutach, godzince wyłącza się "File daemon", gdy restartuje serwer, wywala się automatycznie Bacula Storage Deamon, jednak co nadziwniejsze, jeszcze po ponownym restarcie, wszystko z powrotem staje.
Logi:
/var/bacula/log
Kod: Zaznacz cały
20-Aug 10:33 backup-dir JobId 0: Fatal error: bsock.c:135 Unable to connect to Storage daemon on backup:9103. ERR=Connection refused
20-Aug 10:33 backup-dir JobId 0: Fatal error: bsock.c:135 Unable to connect to Storage daemon on backup:9103. ERR=Connection refused
20-Aug 10:33 backup-dir JobId 0: Fatal error: bsock.c:135 Unable to connect to Storage daemon on backup:9103. ERR=Connection refused
20-Aug 10:33 backup-dir JobId 0: Fatal error: bsock.c:135 Unable to connect to Storage daemon on backup:9103. ERR=Connection refused
20-Aug 10:29 backup-dir JobId 0: Warning: bsock.c:129 Could not connect to Storage daemon on backup:9103. ERR=Connection refused
Retrying ...
20-Aug 10:34 backup-dir JobId 0: Warning: bsock.c:129 Could not connect to Storage daemon on backup:9103. ERR=Connection refused
Retrying ...
20-Aug 10:39 backup-dir JobId 0: Warning: bsock.c:129 Could not connect to Storage daemon on backup:9103. ERR=Connection refused
Retrying ...
20-Aug 10:45 backup-dir JobId 0: Warning: bsock.c:129 Could not connect to Storage daemon on backup:9103. ERR=Connection refused
Retrying ...
20-Aug 10:50 backup-dir JobId 0: Warning: bsock.c:129 Could not connect to Storage daemon on backup:9103. ERR=Connection refused
Retrying ...
20-Aug 10:55 backup-dir JobId 0: Warning: bsock.c:129 Could not connect to Storage daemon on backup:9103. ERR=Connection refused
Retrying ...
20-Aug 10:59 backup-dir JobId 0: Fatal error: bsock.c:135 Unable to connect to Storage daemon on backup:9103. ERR=Connection refused
21-Aug 23:05 backup-dir JobId 11: No prior Full backup Job record found.
21-Aug 23:05 backup-dir JobId 11: No prior or suitable Full backup found in catalog. Doing FULL backup.
20-Aug 23:05 backup-dir JobId 9: No prior Full backup Job record found.
20-Aug 23:05 backup-dir JobId 9: No prior or suitable Full backup found in catalog. Doing FULL backup.
20-Aug 23:05 backup-dir JobId 9: Start Backup JobId 9, Job=BackupClient1.2014-08-20_23.05.00_46
20-Aug 23:05 backup-dir JobId 9: Using Device "FileStorage"
20-Aug 23:05 backup-sd JobId 9: Job BackupClient1.2014-08-20_23.05.00_46 is waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
Storage: "FileStorage" (/backup)
Pool: File
Media type: File
21-Aug 00:05 backup-sd JobId 9: Job BackupClient1.2014-08-20_23.05.00_46 is waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
Storage: "FileStorage" (/backup)
Pool: File
Media type: File
21-Aug 02:05 backup-sd JobId 9: Job BackupClient1.2014-08-20_23.05.00_46 is waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
Storage: "FileStorage" (/backup)
Pool: File
Media type: File
21-Aug 06:05 backup-sd JobId 9: Job BackupClient1.2014-08-20_23.05.00_46 is waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
Storage: "FileStorage" (/backup)
Pool: File
Media type: File
21-Aug 14:05 backup-sd JobId 9: Job BackupClient1.2014-08-20_23.05.00_46 is waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
Storage: "FileStorage" (/backup)
Pool: File
Media type: File
22-Aug 06:05 backup-sd JobId 9: Job BackupClient1.2014-08-20_23.05.00_46 is waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
Storage: "FileStorage" (/backup)
Pool: File
Media type: File
Serwer bacula-dir.conf
Kod: Zaznacz cały
Director { # define myself
Name = backup-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 = 1
Password = "zaq1mko0DP" # Console password
Messages = Daemon
DirAddress = 192.168.16.11
}
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
File = /usr/sbin
}
#
# If you backup the root directory, the following two excluded
# files can be useful
#
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 = backup-fd
Address = 192.168.16.10
FDPort = 9102
Catalog = MyCatalog
Password = "zaq1mko0DP" # password for FileDaemon
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 = 192.168.16.11 # N.B. Use a fully qualified name here
SDPort = 9103
Password = "zaq1mko0DP"
Device = FileStorage
Media Type = File
}
# 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"; dbuser = "root"; dbpassword = "zaq1mko0DP"
}
#
# 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
}
# 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
}
# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = backup-mon
Password = "NHUtYnECry-DLNDfOcw0jRKx2O-M3wcYd"
CommandACL = status, .status
}
Schedule {
Name = SetPointHarmonogram
Run = Level=Full Pool=File on 1 at 23:00
Run = Level=Incremental Pool=File on 2-31 at 23:00
}
Pool {
Name = SetPoint
Pool Type = Backup
Maximum Volume Jobs = 7
Volume Retention = 21 days
Recycle = yes
AutoPrune = yes
}
Storage {
Name = SetPoint
Password = zaq1mko0DP
Address = backup
SDPort = 9103
Device = FileStorage
Media Type = File
Maximum Concurrent Jobs = 20
}
Job {
Name = SetPoint
Type = Backup
Level = Full
Client = backup-fd
FileSet = udzial
Schedule = SetPointHarmonogram
Storage = File
Pool = SetPoint
Messages = Standard
Enabled = No
}
FileSet {
Name = udzial
Include {
File = /Udzialy
Options {
Compression = GZIP5
}
}
}
Kod: Zaznacz cały
Director {
Name = backup-dir
Password = "zaq1mko0DP"
}
Director {
Name = backup-mon
Password = "zaq1mko0DP"
Monitor = yes
}
FileDaemon { # this is me
Name = backup-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
FDAddress = 192.168.16.10
}
Messages {
Name = Standard
director = backup-dir = all, !skipped, !restored
}
Kod: Zaznacz cały
Storage { # definition of myself
Name = backup-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/lib/bacula"
Pid Directory = "/var/run/bacula"
Maximum Concurrent Jobs = 20
SDAddress = 192.168.16.11
}
Director {
Name = backup-dir
Password = "zaq1mko0DP"
}
Director {
Name = backup-mon
Password = "zaq1mko0DP"
Monitor = yes
}
Device {
Name = FileStorage
Media Type = File
Archive Device = /backup
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
}
Messages {
Name = Standard
director = backup-dir = all
}
Device {
Name = SetPoint
Archive Device = /backup
Media Type = File
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
}
Kod: Zaznacz cały
Director {
Name = backup-dir
Password = "zaq1mko0DP"
}
Director {
Name = backup-fd
Password = "zaq1mko0DP"
Monitor = yes
}
FileDaemon { # this is me
Name = backup-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
FDAddress = 192.168.16.10
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = backup-dir = all, !skipped, !restored
}
