LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-14-2008, 07:08 AM   #1
rosv
Member
 
Registered: Jul 2008
Distribution: Slackware, ubuntu
Posts: 53

Rep: Reputation: 15
Backup using bacula


Hi.
I'm a first time bacula user and I can seem to get this show on the road.

I'm using ububtu 8.04 and bacula 2.2.8

When I try to start the director ( /etc/init.d/bacula-dir start ) I get:
* Starting Bacula Director: 14-Aug 14:03 bacula-dir: ERROR TERMINATION at parse_conf.c:483
Config error: Could not find config Resource MySQL referenced on line 31 : Catalog = MySQL
: line 31, col 18 of file /etc/bacula/bacula-dir.conf Catalog = MySQ [fail]

The problem is that i don't understand what I should put in the Catalog field.

My /etc/bacula/bacula-dir.conf:

Director { # define myself
Name = backupserver-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 = "*L" # Console password
#Messages = Daemon
DirAddress = 127.0.0.1
}



# Definition of "Tape Drive" storage device
Storage {
Name = HP
# Do not use "localhost" here
Address = backupserver # N.B. Use a fully qualified name here
SDPort = 9103
Password = "*"
Device = HP
Media Type = tape
}


Client {
Name = backupserver-fd
Address = backupserver
FDPort = 9102
Catalog = MySQL
Password = "*" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}

I'm using MySQL as the backend database.
My tape drive is working fine.

Thanx,
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-14-2008, 08:50 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,647

Rep: Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575
Have you started the database? The Bacula tutorial here:

http://www.bacula.org/en/dev-manual/...00000000000000

Touches on that. It would seem from the error message, that MySQL isn't running, or doesn't have the schema for Bacula.
 
Old 08-14-2008, 10:24 AM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
This is not a MySQL error but it's referencing it could not find a config resource named MySQL, which it seems you named your Catalog. Under your client config, you have Catalog = MySQL.

Somewhere in your bacula-dir.conf you should have something that looks like this:

Code:
# Generic catalog service
Catalog {
  Name = Catalog
  dbname = bacula; user = bacula; password = ""
}
You put the Name of the Catalog for the client configuration for Catalog, which by default is just Catalog. If you didn't change the default, you can simply put this for the client:

Code:
Client {
Name = backupserver-fd
Address = backupserver
FDPort = 9102
Catalog = Catalog
Password = "*" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
Or you could change the Catalog resource to this:

Code:
# Generic catalog service
Catalog {
  Name = MySQL
  dbname = bacula; user = bacula; password = ""
}
Can you post your full bacula-dir.conf file instead of bits and pieces of it because what you posted couldn't be the whole thing?

Last edited by trickykid; 08-14-2008 at 10:27 AM.
 
Old 03-17-2011, 02:04 AM   #4
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Rep: Reputation: 1
Unhappy bacula backup

hello,

i am new to linux though to backula software. .
urgently i have to complete configuring bacula.

bacula is running but i am getting error like below. .


linux-17br:~ # bacula-dir -t
bacula-dir: dird.c:950 Could not open Catalog "MyCatalog", database "bacula".
bacula-dir: dird.c:955 mysql.c:194 Unable to connect to MySQL server.
Database=bacula User=bacula
MySQL connect failed either server not running or your authorization is incorrect.
17-Mar 11:52 bacula-dir ERROR TERMINATION
Please correct configuration file: bacula-dir.conf


linux-17br:~ # bconsole
Connecting to Director linux-17br:9101

linux-17br:~ # tail -f /var/log/messages
Mar 17 12:28:43 linux-17br bconsole: bsock.c:134 Unable to connect to Director daemon on linux-17br:9101. ERR=Connection refused



and my /etc/bacula-dir.conf file is like below


# Default Bacula Director Configuration file

Director { # define myself
Name = linux-17br-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/bacula/working"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = "PZC4Grzm4MmAuTj3qLmGVp0Me+TqfmdvBd7lfjqBHagH" # Console password
Messages = Daemon
}

JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = linux-17br
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = File
Priority = 10
Write Bootstrap = "/var/bacula/working/%c.bsr"
}


#
# Define the main nightly save backup job
# By default, this job will back up to disk in /tmp
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
}

Job {
Name = "BackupClient2"
Client = linux-17br
JobDefs = "DefaultJob"
}

# Backup the catalog database (after the nightly save)
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
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/make_catalog_backup.pl MyCatalog"
# This deletes the copy of the catalog
RunAfterJob = "/etc/bacula/delete_catalog_backup"
Write Bootstrap = "/var/bacula/working/%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= linux-17br
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /tmp/bacula-restores
}


# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
#

# disk storage during initial testing.
#
File = /sbin
}

#
# If you backup the root directory, the following two excluded
# files can be useful
#
Exclude {
File = /var/bacula/working
File = /tmp
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}

#
# When to do the backups, full backup on first sunday of the month,
# differential (i.e. incremental since full) every other sunday,
# and incremental backups other days
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/bacula/working/bacula.sql"
}
}

# Client (File Services) to backup
Client {
Name = linux-17br
Address = 192.168.1.53
FDPort = 9102
Catalog = MyCatalog
Password = "2Dc6wGj72gVG5lok5Vj+Acfag/68psdbqFkfiEw4L3g4" # 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 = linux-17br # N.B. Use a fully qualified name here
SDPort = 9103
Password = "R8IqOZ84oEu8dAgN6jOf6++m6dQUvbdSmBC4yKeocCaT"
Device = FileStorage
Media Type = File
}




# Generic catalog service
Catalog {
Name = MyCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:mysql"; dbaddress = 127.0.0.1; dbport =
dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}

# 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.
# What this does is, it sets the email address that emails would display
# in the FROM field, which is by default the same email as they're being
# sent to. However, if you send email to more than one address, then
# you'll have to set the FROM address manually, to a single address.
# for example, a 'no-reply@mydomain.com', is better since that tends to
# tell (most) people that its coming from an automated source.

#
mailcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/sbin/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
#
#
append = "/var/bacula/working/log" = all, !skipped
catalog = all
}


#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root@localhost = all, !skipped
console = all, !skipped, !saved
append = "/var/bacula/working/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
}


# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = linux-17br-mon
Password = "X8itQm8wag4xyq5+QgtINeJO731R/Njnkxp7URTJAVmt"
CommandACL = status, .status
}



please anyone help me out in this. .
 
Old 03-17-2011, 09:33 AM   #5
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,647

Rep: Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575
Quote:
Originally Posted by varunb View Post
hello,
i am new to linux though to backula software. urgently i have to complete configuring bacula.
bacula is running but i am getting error like below. .

linux-17br:~ # bacula-dir -t
bacula-dir: dird.c:950 Could not open Catalog "MyCatalog", database "bacula".
bacula-dir: dird.c:955 mysql.c:194 Unable to connect to MySQL server.
Database=bacula User=bacula
MySQL connect failed either server not running or your authorization is incorrect.
17-Mar 11:52 bacula-dir ERROR TERMINATION
Please correct configuration file: bacula-dir.conf

please anyone help me out in this. .
First, this is NOT URGENT FOR ANYONE HERE...we are volunteers, and answer what we'd like, when we'd like. Second, you re-opened a THREE YEAR OLD THREAD, and hijacked it for yourself. Open your own thread for your own question.

The error is very clear. You've either not configured the database, not STARTED the database, or specified it incorrectly in the config file. Go back, and read the instructions for Bacula, and follow them closely.
 
2 members found this post helpful.
Old 03-17-2011, 11:21 PM   #6
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Rep: Reputation: 1
hello sir,
ok i will do as what u have told. .

and i have created a database name bacula, and mentioned in bacula-dir.conf file also. . but still its not working. .
i' will try again. .

please sir if u have steps of configured the database,
n how to start the database and config. file example. . it would be very helpfull. .
 
Old 03-18-2011, 01:14 AM   #7
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Rep: Reputation: 1
hello sir,

i did changes, cleared from everything. .
but this error i got when i tried to open bconsole


linux-17br:/etc/bacula # bconsole
Connecting to Director linux-17br:9101
Director authorization problem.
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error during the TLS handshake.
 
Old 03-18-2011, 02:32 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by varunb View Post
hello sir,
ok i will do as what u have told.
But you did not:
Quote:
Originally Posted by TB0ne View Post
[snip] Open your own thread for your own question.
[snip]
TB0ne's advice reflects a lot of experience in how to use LQ efficiently and effectively for everyone so it's worth taking -- if only to keep the people who might answer your questions happy
 
Old 03-18-2011, 10:08 AM   #9
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,647

Rep: Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575
Quote:
Originally Posted by varunb View Post
hello sir,
ok i will do as what u have told. .

and i have created a database name bacula, and mentioned in bacula-dir.conf file also. . but still its not working. .
i' will try again. .

please sir if u have steps of configured the database,
n how to start the database and config. file example. . it would be very helpfull. .
First, spell out your words and write clearly. That text-speak garbage doesn't make anyone want to wade through your question to try to read it.

If you want the 'steps', then again, you need to read the documentation. The installation/configuration steps are detailed in it.
 
Old 03-28-2011, 01:13 AM   #10
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Rep: Reputation: 1
hi,

now the problem is if i run the command bconsole i'll get the error like below.

linux-17br:~ # bconsole
Connecting to Director linux-17br:9101
Director authorization problem.
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error during the TLS handshake.
Please see http://www.bacula.org/en/rel-manual/...00000000000000 for help.


if i go to that URL
page error will appear. .

i really dont have idea on this. .

@TB0ne Guru: whats your problem sir? be cool thats what i suggest you. .
and please help people and people will help you. . and myself still in learning stage, give me some time to speak better and not the garbage.
 
Old 03-28-2011, 10:22 AM   #11
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,647

Rep: Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575
Quote:
Originally Posted by varunb View Post
hi,
now the problem is if i run the command bconsole i'll get the error like below.

linux-17br:~ # bconsole
Connecting to Director linux-17br:9101
Director authorization problem.
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error during the TLS handshake.
Please see http://www.bacula.org/en/rel-manual/...00000000000000 for help.

if i go to that URL page error will appear. .
i really dont have idea on this. .
If you just went to the Bacula page, and AGAIN, looked at the documentation, you'd find it.
http://www.bacula.org/5.0.x-manuals/...00000000000000

The link you post is for Bacula 5.0.x, but in your original post you say it's 2.2.8. Which is it? And the documentation for 5.1.x is still under development. The error is very clear. You've got a wrong password somewhere, and that's addressed in the Bacula docs.
Quote:
@TB0ne Guru: whats your problem sir? be cool thats what i suggest you. .
and please help people and people will help you. . and myself still in learning stage, give me some time to speak better and not the garbage.
I do help people, my problem is when people don't even TRY to help themselves, by reading the docs, and paying attention. Text-speak garbage doesn't make anyone want to try to decipher your post. If you can't be bothered spelling out your words, why should anyone here be bothered to write out an answer for you??

I "suggest you" try to read and understand the documentation, rather than sitting there being 'cool'.
 
Old 03-29-2011, 12:33 AM   #12
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Rep: Reputation: 1
ok sir. .

thank you. .
 
Old 10-29-2011, 07:07 AM   #13
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 40

Rep: Reputation: 0
A simple question about bacula.
When i do a backup with disk it use
the same volume (marked as appendable)
for all backups.
I want one volume for every backup,
how to do this?
I used
Maximum Volume Jobs = 1
in pool.
Is correct?
Thanks
 
Old 10-29-2011, 08:51 AM   #14
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,647

Rep: Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575
Quote:
Originally Posted by camerabambai View Post
A simple question about bacula.
When i do a backup with disk it use the same volume (marked as appendable) for all backups. I want one volume for every backup, how to do this? I used Maximum Volume Jobs = 1 in pool. Is correct?
Thanks
This is addressed in the documentation, so read it. That appears correct, though.

And you need to open your own thread for your own question...this one is from March.
 
  


Reply

Tags
backup, bacula, mysql, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bacula - backup growing to large neocontrol Linux - Software 6 10-14-2008 03:53 PM
bacula - trying to backup a file with a changing name? neocontrol Linux - Server 1 05-07-2008 08:40 PM
Help with Bacula OR choosing backup software jantman Linux - Software 3 10-15-2007 06:39 PM
Bacula TLS how-to? yanik Linux - Software 1 10-06-2006 02:13 AM
LXer: Bacula Network Backup Implementation Guide LXer Syndicated Linux News 0 06-06-2006 04:54 PM


All times are GMT -5. The time now is 07:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration