Starting the Bacula
Console
Continue for
Part1
Bacula's console is your main interface to the Director
daemon.If you want to start bconsole program use the following
command
#bconsole
* help
this will give you all the available commands for bconsole
If you want to know more options about bconsole and how to use
check
here
Label a Volume
Bacula puts a label on each Volume for identification by writing
a special header at the start of the Volume. In the case of
tapes, you should also physically label the tape with the same
name. This will allow you to identify Volumes when you need
them. When the time comes to restore a particular file, Bacula
will tell you what Volumes are needed.
I would suggest before labelling Set the default block size of
the device to 0 bytes using the following command
#mt -f /dev/nst0 defblksize 0
Now you need to use label command to label a volume
#bconsole
*label
Enter new Volume name:
If Bacula complains:
Media record for Volume xxxx already exists.
It means that the volume name xxxx that you entered already
exists in the Media database. You can list all the defined Media
(Volumes) with the list media command. Note, the LastWritten
column has been truncated for proper printing.
Once Bacula has verified that the volume does not already exist,
it will prompt you for the name of the Pool in which the Volume
(tape) is to be created. If there is only one Pool (Default), it
will be automatically selected.
If the tape is successfully labeled, a Volume record will also
be created in the Pool. That is the Volume name and all its
other attributes will appear when you list the Pool. In
addition, that Volume will be available for backup if the
MediaType matches what is requested by the Storage daemon.
When you labeled the tape, you answered very few questions about
it -- principally the Volume name, and perhaps the Slot.
However, a Volume record in the catalog database (internally
known as a Media record) contains quite a few attributes. Most
of these attributes will be filled in from the default values
that were defined in the Pool (i.e. the Pool holds most of the
default attributes used when creating a Volume).
If you want more options and details of those click
here
Running a Backup Job
Bacula comes with a preset backup job that will get you started.
It will backup the directory from which Bacula was installed.
Once you get going and have created your own jobs, you can
safely remove this job from the Director configuration file.
Bacula runs jobs automatically at the time set within the
Schedule resource for the Job in question.
Re-label a Tape
Re-labelling is a process by which a tape already added to the
backup system, can be renamed and added to the same or new tape
pool.
WARNING: The tape needs to be
purged and all the data will be lost during the process. Hence,
care has to be talken before commencing the process.
To relabel a Tape,
Insert the appropriate tape that needs to be re-labelled in the
Tape drive and wait the Ready light is solid.
Launch Bacula console using
#bconsole
Type purge and press enter.
Select the number equivalent to the Pool to which the Tape
belongs to.
Enter the Media Name or the Media ID (Media ID can be found from
the command list media) and press enter.
This will purge the Tape.
Now, type unmount to unmount the tape.
Type mount to re-mount the tape.
Now, type relabel and press enter.
Select the number of the Pool to which the Tape belongs to and
press enter.
Enter the Media ID or Media Name and press enter.
Enter the New Volume Name and press enter.
Select the number of the pool to which this relabelled tape
should be added.
To confirm changes, type list media and press enter. This will
show a list of tape media added to the system and the relabelled
media will be available in the list and at the same the old
label name will be removed.
Running job manually in Bacula
#bconsole
*run
A job name must be specified.
The defined Job resources are:
1: Client1
2: BackupCatalog
3: RestoreFiles
Select Job resource (1-3): 1
Run Backup job
JobName: Client1
FileSet: Full Set
Level: Full
Client: client1-fd
Storage: DLT
Pool: Default
When: 2006-04-02 16:30:33
Priority: 10
OK to run? (yes/mod/no): yes
Run command submitted.
Here's the output of the job as it runs
06-Apr 03:10 backup1-dir: Start Backup JobId 61,
Job=NightlySaveonline.2006-04-06_03.10.00
06-Apr 03:10 backup1-dir: Bacula 1.36.2 (28Feb05): 06-Apr-2006
03:10:57
JobId: 1
Job: NightlySaveonline.2006-04-06_03.10.00
Backup Level: Full
Client: client1-fd
FileSet: "Full Set" 2006-04-01 12:55:14
Pool: "Default"
Storage: "DLT"
Start time: 06-Apr-2006 03:10:02
End time: 06-Apr-2006 03:10:57
FD Files Written: 28,554
SD Files Written: 28,554
FD Bytes Written: 303,078,112
SD Bytes Written: 306,466,453
Rate: 5510.5 KB/s
Software Compression: None
Volume name(s): default-1
Volume Session Id: 59
Volume Session Time: 1143891899
Last Volume Bytes: 7,179,433,484
Non-fatal FD errors: 0
SD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Backup OK
06-Apr 03:10 backup1-dir: Begin pruning Jobs.
06-Apr 03:10 backup1-dir: No Jobs found to prune.
06-Apr 03:10 backup1-dir: Begin pruning Files.
06-Apr 03:10 backup1-dir: No Files found to prune.
06-Apr 03:10 backup1-dir: End auto prune.
This information will also be sent to you via email, depending
on the settings within your Director configuration file. (Look
for the Messages resource).
Bacula Client Configuration
You have seen the bacula server side configuration as described
above.Now we need to add the clients for your server for this
you need to install "bacula-fd" package in your client machine
using the following command in debian
#apt-get install bacula-fd
If you want to install bacula client in redhat linux you need to
download the required rpm package
#rpm -ivh bacula-fd
This will install Bacula client and the configuration locate at
/etc/bacula/bacula-fd.conf
Client bacula-fd.conf file looks like below
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = backup1-dir
Password = "bacula"
}
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = client1-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = backup1-dir = all, !skipped
}
In this file important thing is password filed should match the
same as in your bacula-dir.conf file.
If you want to know more about the bacula configuration files
and password authentication check
here
Bacula Network Connection Ports
Communication from Console to Bacula-dir using Port Number 9101
Communication from Bacula-dir to bacula-sd using Port Number
9103
Communication from Bacula-dir to bacula-fd using Port Number
9102
Communication from Bacula-fd to bacula-sd using Port Number 9103
Where it should be obvious that DIR represents the Director, FD
the File daemon or client, and SD the Storage daemon.
Restoring Files from Tape drive using
Bacula
I would suggest to follow this link it is very clear and every
one can understand very easily.
http://www.bacula.org/dev-manual/Bacula_Consol_Restor_Comman.html
Bacula GUI Programs
http://www.bacula.org/dev-manual/GUI_Programs.html
Bacula Tips and
Suggestions
http://www.bacula.org/rel-manual/Tips_Suggestions.html
What To Do When Bacula
Crashes
http://www.bacula.org/rel-manual/What_Do_When_Bacula.html
Disaster Recovery Using
Bacula
http://www.bacula.org/rel-manual/Disast_Recove_Using_Bacula.html
Bacula Security Issues
http://www.bacula.org/rel-manual/Bacula_Security_Issues.html
Bacula and Firewalls
http://www.bacula.org/rel-manual/Dealing_with_Firewalls.html
Autochargers and Bacula
http://www.bacula.org/dev-manual/Autochanger_Support.html
Continue for Part1