Created: 30 December 2008
追加でインストールします。
# yum install gcc gcc-c++
# yum install mysql-server mysql-develビルドを開始します。
# CFLAGS="-g -O2" \
> ./configure \
> --enable-smartalloc \
> --with-mysql \
> --with-dump-email=admin@tomo.ac \
> --with-job-email=admin@tomo.ac \
> --with-smtp-host=localhost
Configuration on Tue Dec 30 13:02:37 JST 2008:
Host: i686-pc-linux-gnu -- redhat
Bacula version: 2.4.3 (10 October 2008)
Source code location: .
Install binaries: /sbin
Install config files: /etc/bacula
Scripts directory: /etc/bacula
Archive directory:
Working directory: /var/bacula/working
PID directory: /var/run
Subsys directory: /var/lock/subsys
Man directory: ${datarootdir}/man
Data directory: ${prefix}/share
C Compiler: gcc 3.4.6
C++ Compiler: /usr/bin/g++ 3.4.6
Compiler flags: -g -O2 -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti
Linker flags: -O
Libraries: -lpthread
Statically Linked Tools: no
Statically Linked FD: no
Statically Linked SD: no
Statically Linked DIR: no
Statically Linked CONS: no
Database type: MySQL
Database lib: -L/usr/lib/mysql -lmysqlclient_r -lz
Database name: bacula
Database user: bacula
Job Output Email: admin@tomo.ac
Traceback Email: admin@tomo.ac
SMTP Host Address: localhost
Director Port: 9101
File daemon Port: 9102
Storage daemon Port: 9103
Director User:
Director Group:
Storage Daemon User:
Storage DaemonGroup:
File Daemon User:
File Daemon Group:
SQL binaries Directory /usr/bin
Large file support: yes
Bacula conio support: no
readline support: no
TCP Wrappers support: no
TLS support: no
Encryption support: no
ZLIB support: yes
enable-smartalloc: yes
bat support: no
enable-gnome: no
enable-bwx-console: no
enable-tray-monitor:
client-only: no
build-dird: yes
build-stored: yes
ACL support: no
Python support: no
Batch insert enabled: yes
# make
:
# make install
:
#
# service mysqld start データベースを作成します。
# cd /etc/bacula
# sh create_bacula_database
Creating MySQL database
Creation of bacula database succeeded.
# sh make_bacula_tables
Making MySQL tables
Creation of Bacula MySQL tables succeeded.
# sh grant_bacula_privileges
Granting MySQL privileges
:
Privileges for bacula granted on bacula.
#
ディレクタサーバーの設定
とりあえずのテストのために、ディレクタサーバー、ファイルサーバー、ストレージサーバーを1つのサーバーにインストールしてテストします。
その場合は、以下のインストール直後のままの設定で問題ありません。
#
# Default Bacula Director Configuration file
#
# The only thing that MUST be changed is to add one or more
# file or directory names in the Include directive of the
# FileSet resource.
#
# For Bacula release 2.4.3 (10 October 2008) -- redhat
#
# You might also want to change the default email address
# from root to your address. See the "mail" and "operator"
# directives in the Messages resource.
#
Director {
Name = bv1-dir
DIRport = 9101
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/bacula/working"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = "FHvSEjx7QLmlsWLb6UN20FQ3ispwM0dHFfCA0CT5f/tI"
Messages = Daemon
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = bv1-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = Default
Priority = 10
}
#
# Define the main nightly save backup job
# By default, this job will back up to disk in
Job {
Name = "Client1"
JobDefs = "DefaultJob"
Write Bootstrap = "/var/bacula/working/Client1.bsr"
}
#Job {
# Name = "Client2"
# Client = bv12-fd
# JobDefs = "DefaultJob"
# Write Bootstrap = "/var/bacula/working/Client2.bsr"
#}
# 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
# WARNING!!! Passing the password via the command line is insecure.
# see comments in make_catalog_backup for details.
# Arguments to make_catalog_backup are:
# make_catalog_backup <database-name> <user-name> <password> <host>
RunBeforeJob = "/etc/bacula/make_catalog_backup bacula bacula"
# This deletes the copy of the catalog
RunAfterJob = "/etc/bacula/delete_catalog_backup"
Write Bootstrap = "/var/bacula/working/BackupCatalog.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=bv1-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /bacula-restores
}
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
#
# Put your list of files here, preceded by 'File =', one per line
# or include an external list with:
#
# File = <file-name
#
# Note: / backs up everything on the root partition.
# if you have other partitons such as /usr or /home
# you will probably want to add them too.
#
# By default this is defined to point to the Bacula build
# directory to give a reasonable FileSet to backup to
# disk storage during initial testing.
#
File = /root/bacula-2.4.3
}
#
# If you backup the root directory, the following two excluded
# files can be useful
#
Exclude {
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 = bv1-fd
Address = bv1
FDPort = 9102
Catalog = MyCatalog
Password = "gKRjoAVZgYY+h3speUtKUO5WAFaioSmaluaFhdw1UDuT" # 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 = bv12-fd
# Address = bv12
# FDPort = 9102
# Catalog = MyCatalog
# Password = "gKRjoAVZgYY+h3speUtKUO5WAFaioSmaluaFhdw1UDuT2" # 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 = bv1
SDPort = 9103
Password = "PCTv1fYs/pK7pziIEy0oqWefKhyw1qLPENVR1yvufYCN"
Device = FileStorage
Media Type = File
}
# Definition of DDS tape storage device
#Storage {
# Name = DDS-4
# Do not use "localhost" here
# Address = bv1 # N.B. Use a fully qualified name here
# SDPort = 9103
# Password = "PCTv1fYs/pK7pziIEy0oqWefKhyw1qLPENVR1yvufYCN" # password for Storage daemon
# Device = DDS-4 # must be same as Device in Storage daemon
# Media Type = DDS-4 # must be same as MediaType in Storage daemon
# Autochanger = yes # enable for autochanger device
#}
# Definition of 8mm tape storage device
#Storage {
# Name = "8mmDrive"
# Do not use "localhost" here
# Address = bv1 # N.B. Use a fully qualified name here
# SDPort = 9103
# Password = "PCTv1fYs/pK7pziIEy0oqWefKhyw1qLPENVR1yvufYCN"
# Device = "Exabyte 8mm"
# MediaType = "8mm"
#}
# Definition of DVD storage device
#Storage {
# Name = "DVD"
# Do not use "localhost" here
# Address = bv1 # N.B. Use a fully qualified name here
# SDPort = 9103
# Password = "PCTv1fYs/pK7pziIEy0oqWefKhyw1qLPENVR1yvufYCN"
# Device = "DVD Writer"
# MediaType = "DVD"
#}
# Generic catalog service
Catalog {
Name = MyCatalog
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 = admin@co-recipe.com = all, !skipped
operator = admin@co-recipe.com = 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/bacula/working/log" = all, !skipped
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = admin@co-recipe.com = 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
}
# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = bv1-mon
Password = "qtHT4QmEgDAOdzkB2LX2hSpzW3Dw2mA73K3C1EORB4Iq"
CommandACL = status, .status
}
ファイルサーバーの設定
とりあえずのテストのために、ディレクタサーバー、ファイルサーバー、ストレージサーバーを1つのサーバーにインストールしてテストします。
その場合は、以下のインストール直後のままの設定で問題ありません。
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 2.4.3 (10 October 2008) -- redhat
#
# 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 = bv1-dir
Password = "gKRjoAVZgYY+h3speUtKUO5WAFaioSmaluaFhdw1UDuT"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = bv1-mon
Password = "ZkpNF86lWOkewuIQnLvP/EASmkfJmi9texwxv7hP5m4P"
Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon {
Name = bv1-fd
FDport = 9102
WorkingDirectory = /var/bacula/working
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bv1-dir = all, !skipped, !restored
}
ストレージサーバーの設定
とりあえずのテストのために、ディレクタサーバー、ファイルサーバー、ストレージサーバーを1つのサーバーにインストールしてテストします。
その場合は、以下のインストール直後のままの設定に、"Archive Device"だけを追加設定します。
#
# Default Bacula Storage Daemon Configuration file
#
# For Bacula release 2.4.3 (10 October 2008) -- redhat
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# resource. If you change the Name and/or the
# "Media Type" in the Device resource, please ensure
# that dird.conf has corresponding changes.
#
Storage {
Name = bv1-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/bacula/working"
Pid Directory = "/var/run"
Maximum Concurrent Jobs = 20
}
#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = bv1-dir
Password = "PCTv1fYs/pK7pziIEy0oqWefKhyw1qLPENVR1yvufYCN"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
Director {
Name = bv1-mon
Password = "hMrFkpGQfWsrZ96bFrN65o0Trgv/p0Gebyj7qw/6r5e0"
Monitor = yes
}
#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
# same Name and MediaType.
#
Device {
Name = FileStorage
Media Type = File
Archive Device = /mnt/nfs/backup-bacula/test-centos5
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
#
# An autochanger device with two drives
#
#Autochanger {
# Name = Autochanger
# Device = Drive-1
# Device = Drive-2
# Changer Command = "/home/kern/bacula/bin/mtx-changer %c %o %S %a %d"
# Changer Device = /dev/sg0
#}
#Device {
# Name = Drive-1 #
# Drive Index = 0
# Media Type = DLT-8000
# Archive Device = /dev/nst0
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes;
# RemovableMedia = yes;
# RandomAccess = no;
# AutoChanger = yes
# #
# # Enable the Alert command only if you have the mtx package loaded
# # Note, apparently on some systems, tapeinfo resets the SCSI controller
# # thus if you turn this on, make sure it does not reset your SCSI
# # controller. I have never had any problems, and smartctl does
# # not seem to cause such problems.
# #
# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
# If you have smartctl, enable this, it has more info than tapeinfo
# Alert Command = "sh -c 'smartctl -H -l error %c'"
#}
#Device {
# Name = Drive-2 #
# Drive Index = 1
# Media Type = DLT-8000
# Archive Device = /dev/nst1
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes;
# RemovableMedia = yes;
# RandomAccess = no;
# AutoChanger = yes
# # Enable the Alert command only if you have the mtx package loaded
# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
# If you have smartctl, enable this, it has more info than tapeinfo
# Alert Command = "sh -c 'smartctl -H -l error %c'"
#}
#
# A Linux or Solaris tape drive
#
#Device {
# Name = DDS-4 #
# Media Type = DDS-4
# Archive Device = /dev/nst0
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes;
# RemovableMedia = yes;
# RandomAccess = no;
## Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
## Changer Device = /dev/sg0
## AutoChanger = yes
# # Enable the Alert command only if you have the mtx package loaded
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
## If you have smartctl, enable this, it has more info than tapeinfo
## Alert Command = "sh -c 'smartctl -H -l error %c'"
#}
#
# A FreeBSD tape drive
#
#Device {
# Name = DDS-4
# Description = "DDS-4 for FreeBSD"
# Media Type = DDS-4
# Archive Device = /dev/nsa1
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes
# Offline On Unmount = no
# Hardware End of Medium = no
# BSF at EOM = yes
# Backward Space Record = no
# Fast Forward Space File = no
# TWO EOF = yes
# If you have smartctl, enable this, it has more info than tapeinfo
# Alert Command = "sh -c 'smartctl -H -l error %c'"
#}
#
# A OnStream tape drive.
# You need the kernel osst driver 0.9.14 or later, and
# do "mt -f /dev/nosst0 defblksize 32768" once as root.
#
#Device {
# Name = OnStream
# Description = "OnStream drive on Linux"
# Media Type = OnStream
# Archive Device = /dev/nst0
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes
# Offline On Unmount = no
## The min/max blocksizes of 32768 are *required*
# Minimum Block Size = 32768
# Maximum Block Size = 32768
# If you have smartctl, enable this, it has more info than tapeinfo
# Alert Command = "sh -c 'smartctl -H -l error %c'"
#}
#
# A DVD device
#
#Device {
# Name = "DVD Writer"
# Media Type = DVD
# Device Type = DVD
# Archive Device = /dev/hdc
# LabelMedia = yes; # lets Bacula label unlabeled media
# Random Access = Yes;
# AutomaticMount = yes; # when device opened, read it
# RemovableMedia = yes;
# AlwaysOpen = no;
# MaximumPartSize = 800M;
# RequiresMount = yes;
# MountPoint = /mnt/cdrom;
# MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
# UnmountCommand = "/bin/umount %m";
# SpoolDirectory = /tmp/backup;
# WritePartCommand = "/etc/bacula/dvd-handler %a write %e %v"
# FreeSpaceCommand = "/etc/bacula/dvd-handler %a free"
#}
#
# For OpenBSD OS >= 3.6
#
#Device {
# Name = DDS-3
# Media Type = DDS-3
# Archive Device = /dev/nrst0
# Use MTIOCGET= no
# BSF at EOM = yes
# TWO EOF = no
# AutomaticMount = yes;
# AlwaysOpen = yes;
# RemovableMedia = yes;
# RandomAccess = no;
# If you have smartctl, enable this, it has more info than tapeinfo
# Alert Command = "sh -c 'smartctl -H -l error %c'"
#}
#
# A very old Exabyte with no end of media detection
#
#Device {
# Name = "Exabyte 8mm"
# Media Type = "8mm"
# Archive Device = /dev/nst0
# Hardware end of medium = No;
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = Yes;
# RemovableMedia = yes;
# RandomAccess = no;
# If you have smartctl, enable this, it has more info than tapeinfo
# Alert Command = "sh -c 'smartctl -H -l error %c'"
#}
#
# Send all messages to the Director,
# mount messages also are sent to the email address
#
Messages {
Name = Standard
director = bv1-dir = all
}以下のコマンドで起動します。
# /etc/bacula/bacula start
Starting the Bacula Storage daemon
Starting the Bacula File daemon
Starting the Bacula Director daemon
#エラーも出ずに起動したらOKです。
バックアップの実行
# bconsole
Connecting to Director bv1:9101
1000 OK: bv1-dir Version: 2.4.3 (10 October 2008)
Enter a period to cancel a command.
*label
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: File
Enter new Volume name: test1
Defined Pools:
1: Default
2: Scratch
Select the Pool (1-2): 1
Connecting to Storage daemon File at bv1:9103 ...
Sending label command for Volume "test1" Slot 0 ...
3000 OK label. VolBytes=199 DVD=0 Volume="test1" Device="FileStorage" (/mnt/nfs/backup-bacula/test-centos5)
Catalog record for Volume "test1", Slot 0 successfully created.
Requesting to mount FileStorage ...
3906 File device "FileStorage" (/mnt/nfs/backup-bacula/test-centos5) is always mounted.
*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
Level: Incremental
Client: bv1-fd
FileSet: Full Set
Pool: Default (From Job resource)
Storage: File (From Job resource)
When: 2008-12-30 15:00:08
Priority: 10
OK to run? (yes/mod/no): mod
Parameters to modify:
1: Level
2: Storage
3: Job
4: FileSet
5: Client
6: When
7: Priority
8: Pool
Select parameter to modify (1-8): 1
Levels:
1: Base
2: Full
3: Incremental
4: Differential
5: Since
Select level (1-5): 2
Run Backup job
JobName: Client1
Level: Full
Client: bv1-fd
FileSet: Full Set
Pool: Default (From Job resource)
Storage: File (From Job resource)
When: 2008-12-30 15:00:08
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=1
*status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4): 3
Automatically selected Client: bv1-fd
Connecting to Client bv1-fd at bv1:9102
bv1-fd Version: 2.4.3 (10 October 2008) i686-pc-linux-gnu redhat
Daemon started 30-12008 14:58, 0 Jobs run since started.
Heap: heap=557,056 smbytes=155,674 max_bytes=156,038 bufs=110 max_bufs=111
Sizeof: boffset_t=8 size_t=4 debug=0 trace=0
Running Jobs:
JobId 1 Job Client1.2008-12-30_15.00.03 is running.
Backup Job started: 30-12008 15:00
Files=1,619 Bytes=42,162,447 Bytes/sec=8,432,489 Errors=0
Files Examined=1,619
Processing file: /root/bacula-2.4.3/examples/reports/pool-query.txt
SDReadSeqNo=5 fd=5
Director connected at: 30-12008 15:00
====
Terminated Jobs:
====
You have messages.
*
30-12月 15:00 bv1-dir JobId 1: Start Backup JobId 1, Job=Client1.2008-12-30_15.00.03
30-12月 15:00 bv1-dir JobId 1: Using Device "FileStorage"
30-12月 15:00 bv1-sd JobId 1: Wrote label to prelabeled Volume "test1" on device "FileStorage" (/mnt/nfs/backup-bacula/test-centos5)
30-12月 15:00 bv1-sd JobId 1: Job write elapsed time = 00:00:06, Transfer rate = 7.694 M bytes/second
30-12月 15:00 bv1-dir JobId 1: Bacula bv1-dir 2.4.3 (10Oct08): 30-12月-2008 15:00:26
Build OS: i686-pc-linux-gnu redhat
JobId: 1
Job: Client1.2008-12-30_15.00.03
Backup Level: Full
Client: "bv1-fd" 2.4.3 (10Oct08) i686-pc-linux-gnu,redhat,
FileSet: "Full Set" 2008-12-30 15:00:18
Pool: "Default" (From Job resource)
Storage: "File" (From Job resource)
Scheduled time: 30-12月-2008 15:00:08
Start time: 30-12月-2008 15:00:20
End time: 30-12月-2008 15:00:26
Elapsed time: 6 secs
Priority: 10
FD Files Written: 1,754
SD Files Written: 1,754
FD Bytes Written: 45,939,600 (45.93 MB)
SD Bytes Written: 46,164,874 (46.16 MB)
Rate: 7656.6 KB/s
Software Compression: None
VSS: no
Storage Encryption: no
Volume name(s): test1
Volume Session Id: 1
Volume Session Time: 1230616714
Last Volume Bytes: 46,256,739 (46.25 MB)
Non-fatal FD errors: 0
SD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Backup OK
30-12月 15:00 bv1-dir JobId 1: Begin pruning Jobs.
30-12月 15:00 bv1-dir JobId 1: No Jobs found to prune.
30-12月 15:00 bv1-dir JobId 1: Begin pruning Files.
30-12月 15:00 bv1-dir JobId 1: No Files found to prune.
30-12月 15:00 bv1-dir JobId 1: End auto prune.
*quit
#
リストアの実行
# bconsole
Connecting to Director bv1:9101
1000 OK: bv1-dir Version: 2.4.3 (10 October 2008)
Enter a period to cancel a command.
*restore
First you select one or more JobIds that contain files
to be restored. You will be presented several methods
of specifying the JobIds. Then you will be allowed to
select which files from those JobIds are to be restored.
To select the JobIds, you have the following choices:
1: List last 20 Jobs run
2: List Jobs where a given File is saved
3: Enter list of comma separated JobIds to select
4: Enter SQL list command
5: Select the most recent backup for a client
6: Select backup for a client before a specified time
7: Enter a list of files to restore
8: Enter a list of files to restore before a specified time
9: Find the JobIds of the most recent backup for a client
10: Find the JobIds for a backup for a client before a specified time
11: Enter a list of directories to restore for found JobIds
12: Cancel
Select item: (1-12): 5
Automatically selected Client: bv1-fd
Automatically selected FileSet: Full Set
+-------+-------+----------+------------+---------------------+------------+
| JobId | Level | JobFiles | JobBytes | StartTime | VolumeName |
+-------+-------+----------+------------+---------------------+------------+
| 1 | F | 1,754 | 45,939,600 | 2008-12-30 15:00:20 | test1 |
+-------+-------+----------+------------+---------------------+------------+
You have selected the following JobId: 1
Building directory tree for JobId 1 ... +++++++++++++++++++++++++++++++++++++++++++++++
1 Job, 1,704 files inserted into the tree.
You are now entering file selection mode where you add (mark) and
remove (unmark) files to be restored. No files are initially added, unless
you used the "all" keyword on the command line.
Enter "done" to leave this mode.
cwd is: /
$ mark *
1,754 files marked.
$ done
Bootstrap records written to /var/bacula/working/bv1-dir.restore.1.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
test1 File FileStorage
1,754 files selected to be restored.
Run Restore job
JobName: RestoreFiles
Bootstrap: /var/bacula/working/bv1-dir.restore.1.bsr
Where: /bacula-restores
Replace: always
FileSet: Full Set
Backup Client: bv1-fd
Restore Client: bv1-fd
Storage: File
When: 2008-12-30 15:03:10
Catalog: MyCatalog
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=2
*status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4): 3
Automatically selected Client: bv1-fd
Connecting to Client bv1-fd at bv1:9102
bv1-fd Version: 2.4.3 (10 October 2008) i686-pc-linux-gnu redhat
Daemon started 30-12008 14:58, 2 Jobs run since started.
Heap: heap=557,056 smbytes=145,555 max_bytes=211,955 bufs=63 max_bufs=111
Sizeof: boffset_t=8 size_t=4 debug=0 trace=0
Running Jobs:
Director connected at: 30-12008 15:03
No Jobs running.
====
Terminated Jobs:
JobId Level Files Bytes Status Finished Name
======================================================================
1 Full 1,754 45.93 M OK 30-12008 15:00 Client1
2 1,754 45.93 M OK 30-12008 15:03 RestoreFiles
====
*quit
#
設定した、"/root/bacula-2.4.3" の内容と同じファイルが、"bacula-restores"にできておればOKです。