 |
rex_ray |
User type : Standard |
Register : 2012-Dec-30 |
|
Topics : 2 |
Replies : 4 |
-------------- |
|
| | | Thank you very much for this exhaustive guide on Bacula. As a result of your guide, I was able to understand and install this wonderful software.  | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi rex_ray, you are welcome. If you have any bacula related problems, post the problem here and I will help if I can. | | | |
 |
rex_ray |
User type : Standard |
Register : 2012-Dec-30 |
|
Topics : 2 |
Replies : 4 |
-------------- |
|
| | | Thanks for your offer. Am just taking my baby steps with Bacula as I have no previous experience working with a Backup Software. By the way, Wish you a Very Happy & Prosperous New Year. | | | |
 |
Jimmy |
-------------- |
|
| | | Hi,
Thanks for the awesome guide. I am backing up across a three drives. When the first drive gets full, how do i get get the job to continue on a second drive?
Thanks | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Jimmy, To my knowledge it is unfortunately NOT possible for Bacula to automatically continue writing on a second harddrive then the first harddrive is full.
I think there are 2 solutions to involve more than 1 physical harddrive as backup device for Bacula :
- Merge multiple physical harddrives into 1 virtual harddrive using eg. raid, OR
- In bacula-sd.conf define a Device section for each harddrive.
I think you can say that method 1 is the most space efficient method and if it was easy I think I would have used method 1, however in the above guide I have used method 2, please see the Bacula Configure Storage section.
For more info about backup to multiple disks, here are some explanation from the Bacula manual.
| | | |
 |
Jimmy |
-------------- |
|
| | | Hi, Thanks for your response.
I have tested using 2 disks listed in the device section.
The disks are 1TB each and the data being backed up is 1.8TB total.
I started a full backup job however once the 1st disk gets full, the job stops, waiting for more space. Do you know how i can manually continue the backup to disk2(device2)?
Thanks
Jimmy | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Jimmy I am sorry, I don't know if it is possible to continue manually on a second drive.
However, if your 1.8 TB data to backup is from multiple clients, then you could define your .conf files so that some of your clients backup on the first device and the other clients backup on the second device.
If your 1.8 TB data to backup is from a single client, then it is less nice, but you could define 2 FileSets, the first FileSet include half of your client data and the second FileSet include the other half of your client data. You would then need 2 Job definitions, one for each FileSet, and then let each Job backup to each their device - I am unsure how that will look in a restore scenario, but my guess is that it will be transparent. | | | |
 |
BvsDark |
User type : Standard |
Register : 2013-Jan-31 |
|
Topics : 0 |
Replies : 1 |
-------------- |
|
| | | Hey Im thankful, this is a great job, im having a big problem, when I perform a Back up all is good, but when im trying to restore it, and I browse the file, nothing appears to be restores, back up says that 11.4 mb wash backed but none of the files appear in from linux client or Windows, I dont have any issues related to conections or anything, everything just perform great but this! thank you ill be really glad if you can help me! | | BvsDark - Learning is what matters! | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi BvsDark I understand your post as : 1) you actually have a backup 2) you have run a restore that terminated with success 3) you cannot find the files that you have restored Ad 3) Then you restore, you need to select a client, that is the machine to which you want to restore the files. You also have to select Where on that client to restore. Say that you took a backup of "/var/www" and you now restore the files setting the Where value to "/myRestores" - your restored files will now be in "/myRestores/var/www" on the selected client. If you want to restore directly to the same place as from where you backup the files, you will need to set the Where value to "/". Here is a picture from a restore job ready to run :
 Also if you have not done already, be sure to go through the #bacula-restore section. | | | |
 |
rex_ray |
User type : Standard |
Register : 2012-Dec-30 |
|
Topics : 2 |
Replies : 4 |
-------------- |
|
| | | Hi, My Backup Setup is as follows,
OS: CentOS 6.3 64 bit Bacula Version: 5.2.12 (Compiled from Source with MySQL support) Backup Media: Hard Drive
Am trying to backup a couple of folders on a Windows 2008 (64 Bit) Server. I have installed the latest 64 bit version of the file client on the Windows server. Manually running a backup works perfectly. The problem arises when running the backup through the scheduler. I get the dreaded "Bacula cannot find any appendable volumes" error. There is more than enough space in the harddrive so space shouldn't be a problem. I new to Bacula can you please point out what am doing wrong here,
My Bacula Configuration,
Only the Relevant sections of 'bacula-dir.conf',
# Backing up single client machine only
Client { Name = fin-hp-fd Address = 10.10.0.91 FDPort = 9102 Catalog = MasterCatalog Password = "password" # password for FileDaemon File Retention = 30 days # 30 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files }
# File based Back up to hard drive
Storage { Name = storage1 Address = 10.10.0.61 # N.B. Use a fully qualified name here SDPort = 9103 Password = "password" Device = hd1 Media Type = File }
# My single Job defs config
JobDefs { Name = "InternalStorage1" Type = Backup Client = fin-hp-fd FileSet = "Full Set" Storage = storage1 Schedule = "BackupCycle" Messages = Standard Write Bootstrap = "/var/bacula/working/%c.bsr" Priority = 10 }
# Backing up only a couple of folders FileSet { Name = "Full Set" Include { Options { signature = SHA1 } File = E:/test File = E:/test2 } }
Job { Name = "FinBackup" JobDefs = "InternalStorage1" Client = fin-hp-fd FileSet = "Full Set" Pool = "Full-Pool" }
Schedule { Name = "BackupCycle" Run = Level=Full Pool=Full-Pool fri at 13:30 Run = Level=Differential Pool=Diff-Pool mon-thu at 13:30 Run = Level=Incremental Pool=Inc-Pool hourly at 0:05 Run = Level=Incremental Pool=Inc-Pool hourly at 0:45 }
# Recycle Full Volumes after 3 months
Pool { Name = Full-Pool Pool Type = Backup Recycle = yes # automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 3 months Maximum Volume Files = 0 Maximum Volume Jobs = 1 Volume Use Duration = 0 Label Format = "Weekly-Full-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}-${Hour:p/2/0/r}-${Minute:p/2/0/r}" Maximum Volumes = 12 }
# Recycle Differential Volumes after 14 days
Pool { Name = Diff-Pool Pool Type = Backup Recycle = yes AutoPrune = yes Volume Retention = 14 days Maximum Volume Files = 0 Maximum Volume Jobs = 1 Volume Use Duration = 0 Label Format = "Daily-Diff-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}-${Hour:p/2/0/r}-${Minute:p/2/0/r}" Maximum Volumes = 7 }
# Recycle Incremental Volumes after 1 month
Pool { Name = Inc-Pool Pool Type = Backup Recycle = yes # automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 1 month Maximum Volume Files = 0 Maximum Volume Jobs = 1 Volume Use Duration = 0 Label Format = "Daily-Inc-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}-${Hour:p/2/0/r}-${Minute:p/2/0/r}" Maximum Volumes = 20 }
My Bacula Storage Daemon Configuration, (only the relevant part)
Device { Name = hd1 Media Type = File Archive Device = /media/Linux LabelMedia = yes; # lets Bacula label unlabeled media Random Access = Yes; AutomaticMount = yes; # when device opened, read it RemovableMedia = no; AlwaysOpen = no; } | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi rex_ray I can see you set maximum Volumes in your Pool definitions, so if your scheduler tries to start eg. a full backup and there already are 12 Volumes in the full Pool and none of them are expired, then Bacula cannot continue and you will get the "Bacula cannot find any appendable volumes" error. If the maximum Volumes setting is not the problem, then please : - Specify if it is a full, incremental or differential job that fails through the scheduler or if it is all of them.
- If you have a report on the failed job, please post that report
- Post the exact job properties then you run manually (so we can compare with the failed job report)
| | | |
 |
Anonymous |
-------------- |
|
| | | Hi, Thank you for your help. This problem arises due to the 'Volume Retention Period = 1 month' specified in the 'Inc-Pool'. With the incremental backup running every 15 mins and the retention period set too long, the volumes are not getting recycled and thus am getting this error. Secondly am dumping all the backups (full,diff,inc) into a single folder (/media/Linux) which also adds to this problem. Now I have addedd different storages to full, differential and incremental backups and tweaked the 'Volume Retention Period' appropriate to the setup. But still I have many doubts with Bacula and hope to ask your help in clearing them in the coming week. Once again thank you very much for your help. | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi rex_ray You are right, I realize now that in your Inc-Pool, you have : - Maximum volume jobs = 1
- Maximum volumes = 20
- Volume retention = 1 month
The above configuration means that if you run more than 20 jobs in 1 month, then you will run out of appendable volumes.
Some solutions : - Reduce the retention period (not recommended, I think 1 month is good)
- Increase maximum volumes (this may be the best solution, I want to try it out next time I upgrade our backup system)
- Set maximum volume jobs to zero and set a maximum volume bytes value (this is the solution I currently use) :
- Maximum volume jobs = 0
- Maximum volume bytes = 25G #This size works for me
- Maximum volumes = 20 #Here you need to adjust for how much data you have
- Volume retention = 1 month
Solution 3 will give you the ability to run as many jobs as needed as long as the data does not exceed 500 GB (25G x 20). | | | |
 |
rex_ray |
User type : Standard |
Register : 2012-Dec-30 |
|
Topics : 2 |
Replies : 4 |
-------------- |
|
| | | Hi, Sorry for being late. I removed the 'Maximum Volumes' option from the 'Inc-Pool' Pool but kept the Volume Retention at 7 days (i.e recycle the volumes after 7 days) The total size of the backup data is under 3.5 GB so I thought there is no need for the 'Maximum Volume Bytes' option. Also I want a new volume for each backup job so I used 'Maximum Volume Jobs = 1'. I read from a website that you have to keep Job, File, Volume Retention periods the same like shown below for reliable file restoration. Can you please tell me your opinion on this.
Pool {
Job Retention = 1 month File Retention = 1 month Volume Retention = 1 month
} | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi rex_ray The documentation is not clear on how retention periods exactly works, especially it is unclear to what extent the volume retention period guarantees a volume is not recycled. The following is what I believe to hold true : - File retention period sets then file records in the Catalog database will expire.
- Job retention period sets the minimum time for job records in the Catalog database will expire. A job record in the Catalog database cannot expire if there are file records referencing it.
- Volume retention period sets the minimum time before physical volumes will expire (however it may recycle before that, see below). A physical volume cannot expire if there are job records in the Catalog database referencing it.
Bacula can only write backup to volumes with status Append. If Bacula needs to write backup and no existing volumes are appendable, the following happens : - If auto labeling is true, Max volumes are higher than existing number of volumes and there are sufficient space on the harddrive, Bacula will create a new volume and set the status to Append.
- If no new volume could be created, there is at least one volume with status Purged and Recyle is set to Yes, then Bacula will recycle one of the purged volumes WHATEVER the volume retention (that is a fact) and set the status to Append.
- If no volume is purged and AutoPrune=Yes then Bacula will one last time prune all records in the Catalog database to try to set a volume to status Purged, subsequently recycle it and set the status to Append.
- If no appendable volumes could be found or created, Bacula will throw the "Bacula cannot find any appendable volumes" error.
To answer the question whether Volume, Job & File retention periods should be the same, I think it is best as it is more easy to understand, however in large scenarios it gives meaning to lower the File retention to avoid the Catalog database growing intolerably big (you can still restore jobs but not individual files). | | | |
 |
Anonymous |
-------------- |
|
| | | hello,
thank you very much for the awesome guide on bacula. anyway i have question, before completing install "apt-get install" package. i have error for bacula-directory-mysql, like "error 2002 (hy000): can't connect to local mySQL server through socket '/var/run/mysqld/mysqld.sock' (2) " it's that normal ??
i'm new for installing bacula. i'm trying install in ubuntu 10.04 on VMware now thank you  | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Anonymous (remember to logon before posting so you can get an email notification as soon as anyone replies to your post)
Default Bacula will use MySQL server to host the Catalog database. If MySQL is not already installed on the system, then Bacula installation script should install MySQL server as part of the Bacula installation process - I have not tried this option myself and this information, https://bugs.launchpad.net/ubuntu/+source/bacula/+bug/712291, suggest it may be error prone.
So you should answer this question : Did you install MySQL server BEFORE installing Bacula ? or did you rely on the Bacula installation script to install MySQL for you ?
I will recommend to : - Upgrade Ubuntu from your old 10.04 to a newer version if possible (be sure to have backup of ALL your user files & data before upgrading so that in case of disaster, you can restore the server), see how to upgrade eg. here : http://www.liberiangeek.net/2012/04/upgrade-to-ubuntu-12-04-from-ubuntu-10-04-via-the-terminal/
- Install MySQL server :
- shell> apt-get install mysql-client mysql server (you will be prompted to create a MySQL administrative (root) password)
- Check that MySQL is running : my guess is that a non-running MySQL server is the reason for your error.
- shell> service mysql status
- Check that you can login to Mysql :
- Install Bacula :
- shell> apt-get install bacula
- The Bacula installation script will now bypass installing MySQL server, however you will be prompted :
- Configure database for bacula-directory-mysql with dbconfig-common <- answer Yes
- The password of the mysql administrative (root) account <- type in the root password
- To create a password for bacula-directory-mysql (the bacula user) <- type in a password
Note that installing on VMware should not affect your installation, but I am not sure if a virtual machine is a good choice for a backup server. | | | |
 |
lennie |
User type : Standard |
Register : 2013-Mar-18 |
|
Topics : 0 |
Replies : 1 |
-------------- |
|
| | | Thanks for the guide, when i first looked at it, i thought "there's no way i'll get my head around that!!", but you laid it out quite simply.
I am, however encountering a problem. When I run the command "status storage" or "status client" (in bconsole), i get the following error:
"status storage Automatically selected Storage: storage1 Connecting to Storage daemon storage1 at 127.0.0.1:9103
Failed to connect to Storage daemon storage1."
and
status client= Automatically selected Client: xxxx-fd Connecting to Client xxxx-fd at 127.0.0.1:9102 Failed to connect to Client xxxx-fd. ====
As you can see, I've been using 127.0.0.1 as my DirAddress (in all the config files) because bconsole refused to connect using my global ip, so this may be the problem, but i've replaced 127.0.0.1 with both my local ip address and my global ip, but to no avail.
Please help
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi lennie Let's try to solve the client connection. Please post the following 2 things here : - the full bacula-fd.conf file content (for your xxxx-fd client)
- the bacula-dir.conf Client {} section (for your xxxx-fd client)
Also be sure to disable any firewall on the client machine and to restart both the director on the director machine and the file deamon on the client machine : director machine shell> service bacula-director restart client machine shell> service bacula-fd restart | | | |
 |
Anonymous |
-------------- |
|
| | | Hi Rasmus,
Here's my bacula-fd.conf file # # Default Bacula File Daemon Configuration file # # For Bacula release 5.2.5 (26 January 2012) -- ubuntu 12.04 # # 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 = presbyserver-dir Password = "xxxx" }
# # Restricted Director, used by tray-monitor to get the # status of the file daemon # Director { Name = presbyserver-mon Password = "xxxx" Monitor = yes }
# # "Global" File daemon configuration specifications # FileDaemon { # this is me Name = presbyserver-fd FDport = 9102 # where we listen for the director WorkingDirectory = /var/lib/bacula Pid Directory = /var/run/bacula Maximum Concurrent Jobs = 20 FDAddress =127.0.0.1 }
# Send all messages except skipped files back to Director Messages { Name = Standard director = presbyserver-dir = all, !skipped, !restored } and the bacula-dir.conf content: Client { Name = presbyserver-fd Address = 127.0.0.1 FDPort = 9102 Catalog = MyCatalog Password = "xxxx" File Retention = 30 days Job Retention = 6 months AutoPrune = yes }
Thanks for assisting
| | | |
 |
Anonymous |
-------------- |
|
| | | update:
The command "status client" is now producing the following:
*status client= Automatically selected Client: presbyserver-fd Connecting to Client presbyserver-fd at 127.0.0.1:9102
presbyserver-fd Version: 5.2.5 (26 January 2012) i686-pc-linux-gnu ubuntu 12.04 Daemon started 19-Mar-13 09:45. Jobs: run=0 running=0. Heap: heap=135,168 smbytes=13,265 max_bytes=13,352 bufs=48 max_bufs=49 Sizeof: boffset_t=8 size_t=4 debug=0 trace=0 Running Jobs: Director connected at: 19-Mar-13 09:45 No Jobs running. ====
Terminated Jobs: ====
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi lennie
Congratulations, your director now connects to your client (the last line "Terminated Jobs:" will start to fill up then you have run some backup/restore jobs). Also note that your client "presbyserver-fd" get automatically selected because you have only one client defined (if you had more than one client section in your bacula-dir.conf file, then you would get a list of clients to select from)
If you have still not got your director to connect to your storage daemon, then post the following 4 things here : - bacula-dir.conf Director {} section
- bacula-dir.conf Storage {} section
- bacula-sd.conf Director {} section (you likely have 2, I am interested in the section that does NOT have the monitor property)
- bacula.sd.conf Device {} section (if you have more than 1, then post them all)
Also be sure to restart your storage daemon : storage machine shell> service bacula-sd restart | | | |
 |
Anonymous |
-------------- |
|
| | | Hi Rasmus,
Thanks a lot, it seems like i'm now able to connect to the storage daemon. Here's my output when i run "status storage": status storage Automatically selected Storage: storage1 Connecting to Storage daemon storage1 at 127.0.0.1:9103
presbyserver-sd Version: 5.2.5 (26 January 2012) i686-pc-linux-gnu ubuntu 12.04 Daemon started 19-Mar-13 14:06. Jobs: run=0, running=0. Heap: heap=135,168 smbytes=16,068 max_bytes=16,186 bufs=61 max_bufs=63 Sizes: boffset_t=8 size_t=4 int32_t=4 int64_t=8 mode=0,0
Running Jobs: No Jobs running. ====
Jobs waiting to reserve a drive: ====
Terminated Jobs: JobId Level Files Bytes Status Finished Name =================================================================== 73 Full 0 0 Error 13-Mar-13 23:05 BackupClient1 74 Full 0 0 Error 13-Mar-13 23:10 BackupCatalog 75 Full 0 0 Error 14-Mar-13 23:05 BackupClient1 76 Full 0 0 Error 14-Mar-13 23:10 BackupCatalog 77 Full 0 0 Error 15-Mar-13 23:05 BackupClient1 78 Full 0 0 Error 15-Mar-13 23:10 BackupCatalog 79 Full 0 0 Error 16-Mar-13 23:05 BackupClient1 80 Full 0 0 Error 16-Mar-13 23:10 BackupCatalog 81 Full 0 0 Error 17-Mar-13 23:05 BackupClient1 82 Full 0 0 Error 17-Mar-13 23:10 BackupCatalog ====
Device status: Device "disk1" is not open or does not exist.
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi lennie
Congratulations again, it seems you have solved your connection problems (at least on localhost, then you start to connect to remote File Daemons, be sure to remember to start by disabling any firewall on the client then testing the connection)
The error status for the Terminated Jobs is expected for the dates shown, since your Director could not connect to your File Daemon nor your Storage Daemon.
The Device status : Device "disk1" is not open or does not exist. I think is also expected. First of all, a device not in use will have the status : Device "disk1" is not open. However since at that time (17-Mar) your Director had not yet been able to connect to your Storage Daemon, the Director have not been able to confirm whether disk1 exists - I guess that is the reason for the last part : or does not exist. | | | |
 |
Anonymous |
-------------- |
|
| | | Thanks Rasmus, you are a star! I'll go through the rest of the steps and let you know how it goes.
Thanks again! | | | |
 |
alain |
-------------- |
|
| | | Great tutorial. Thank you for sharing your knowledge with us 
terraltech.com
| | | |
 |
Riyaz |
-------------- |
|
| | | Best Bacula config tutorial ever available!!!!!!!!!!!!!!! | | | |
 |
Haxkers |
-------------- |
|
| | | Hi, it's very good tutorial! I have got school project and I must backup Pc. If I use "Run" all is ok, but when I use "status storage" it's *status storage Automatically selected Storage: storage1 Connecting to Storage daemon storage1 at 192.168.1.100:9103
Failed to connect to Storage daemon storage1. ==== You have messages. *message 18-dub 12:46 FH-dir JobId 0: Fatal error: bsock.c:135 Unable to connect to Storage daemon on 192.168.1.100:9103. ERR=Spojení odmítnuto
Can you help me please? propably I have problem with configuration.. My PC is DIR and SD. | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Haxkers The error "Failed to connect to Storage daemon" is likely because of one of the following reasons : - The storage daemon is not running
- Firewall on the storage daemon server does not allow incoming traffic on port 9103 (default SD port)
- Director cannot authenticate with storage daemon
ad1) Test if the storage daemon is running : storage daemon machine shell> service bacula-sd status If the storage daemon is NOT running then start it : storage daemon machine shell> service bacula-sd start
ad2) Test if your firewall allows incoming traffic on port 9103 : (here is an example for UFW) storage daemon machine shell> ufw status verbose ad3) Be sure you have configured bacula-dir.conf and bacula-sd.conf correctly with regard to authentication : - bacula-dir.conf Director{..} Name == bacula-sd.conf Director{..} Name
- bacula-dir.conf Storage{..} Password == bacula-sd.conf Director{..} Password
- bacula-dir.conf Storage{..} Address == bacula-sd.conf Storage{..} SDAddress
And then restart your storage daemon : storage daemon machine shell> service bacula-sd restart If you still cannot solve the connection problem then post the following 4 things here : - bacula-dir.conf Director {} section
- bacula-dir.conf Storage {} section
- bacula-sd.conf Director {} section (you likely have 2, I am interested in the section that does NOT have the monitor property)
- bacula-sd.conf Device {} section (if you have more than 1, then post them all)
| | | |
 |
Haxkers |
-------------- |
|
| | | Ok. I had problem with IP adress. Now, when I use "status storage" : Running Jobs: No Jobs running. ====
Jobs waiting to reserve a drive: ====
Terminated Jobs: JobId Level Files Bytes Status Finished Name =================================================================== 1 Full 0 0 Error 30-Mar-13 18:29 win1-backup 3 Full 0 0 Error 25-Apr-13 12:22 win1-backup ====
Device status: Device "disk1" is not open or does not exist. ====
Used Volume status: ====
I want to backup data on my one HDD.
and here are configs:
Director { Name = FH-dir DIRport = 9101 QueryFile = "/etc/bacula/scripts/query.sql" WorkingDirectory = "/var/lib/bacula" PidDirectory = "/var/run/bacula" Maximum Concurrent Jobs = 1 Password = "dir-123" # Console password Messages = Daemon DirAddress = 192.168.1.100
Storage { Name = storage1 Address = 192.168.1.100 SDPort = 9103 Password = "storage-123" Device = disk1 Media Type = File }
Director { Name = FH-dir Password = "storage-123" }
Device { Name = disk1 Media Type = File Archive Device = /media/disk1 LabelMedia = yes; Random Access = Yes; AutomaticMount = yes; RemovableMedia = no; AlwaysOpen = no;
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Haxkers Your posted configuration details look valid and also the result of the status storage command is expected : - You have tried to run 2 jobs but could not connect to storage daemon, so they failed, hence the 2 Error status codes
- Device "disk1" is not open or does not exist is not an error message. Then your device is not in use it will always display the message Device "disk1" is not open, however since your storage daemon have never actually used disk1, it's existence may never have been confirmed, I think that is the reason for the last part or does not exist.
Since your Director can now connect to your storage daemon, try to run a job by issuing the run command and see how it goes. If the job succeed, then try to issue the status storage command again, you should then get the device status Device "disk1" is not open. | | | |
 |
HAxkers |
-------------- |
|
| | | root@MrKaviar:/home/haxkers# bconsole Connecting to Director 192.168.1.100:9101 1000 OK: FH-dir Version: 5.0.2 (28 April 2010)
Enter a period to cancel a command.
* run
Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog"
A job name must be specified.
The defined Job resources are: 1: win1-backup 2: win1-restore
Select Job resource (1-2): 1
Run Backup job
JobName: win1-backup
Level: Incremental
Client: win1
FileSet: win1
Pool: pool1 (From Job resource)
Storage: storage1 (From Job resource)
When: 2013-04-25 22:35:22
Priority: 10 OK to run? (yes/mod/no): y
Job queued. JobId=4 You have messages.
| | | |
 |
Anonymous |
-------------- |
|
| | | And i Message: Error: dev.c:120 Unable to stat device /media/disk1: ERR=No such file Warning: Device "disk1" requested by DIR could not be opened or does not exist.r directory Error: dev.c:120 Unable to stat device /media/disk1: ERR=No such file or directory Now... How Can I open my dikc 1? | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | To be sure it is not a permission problem, try to do the following : - shell> chmod 777 /media
- shell> chmod 777 /media/disk1
, and then try to run a job again and see if the error persist. (If you solve the problem, it would be kind of you to post here what the problem was) | | | |
 |
aristotleahito |
User type : Standard |
Register : 2013-May-10 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | how are you going to restore a database server.. let say my fileset = / then use restore command > select a client > and the file name what if i just mark* and then type done is it possible? to restore the whole database server? | | take your time!! coz time is gold!! | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi aristotleahito I don't know if this is possible or on what operating system it may be possible, however it is a very interesting question. I guess it could be testet to some extent by creating a couple of virtual servers, installing different operating systems with different databases and then try it out. Until you know more, I would advise against this strategy. You better run some backup scripts for your database creating dump files and then have Bacula backup these dump files. (Schedule the database backup scripts using crontab on Linux or Task scheduler on Windows) | | | |
 |
Sam |
User type : Standard |
Register : 2013-May-28 |
|
Topics : 1 |
Replies : 1 |
-------------- |
|
| | | Hello Friend,
Many thanks for a great tutorial. I am a newbie for bacula and your tutorial helped a lot in understanding.
I have installed bacula on Ubuntu 12.04 Server and tried running a backup job and here is the messages I have received. Please help me.
backup-sd JobId 11: Warning: mount.c:217 Open device "backup" (/backup) Volume "pool1-0001" failed: ERR=dev.c:568 Could not open: /backup/pool1-0001, ERR=No such file or directory
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Sam The error message states that /backup/pool1-0001 does not exists. 1) Confirm that /backup/pool1-0001 exists on the server on which your storage daemon is running. 1.1) If /backup/pool1-0001 does not exist, then it is possible that the file have been manually deleted from the file system, so that the record is still existing in the Catalog database - you will then need to use the delete command (from within bconsole) to get pool1-0001 out of the Catalog database. 1.2) If /backup/pool1-0001 exits, then confirm : 1.2.1) that everyone have full access to the /backup directory. 1.2.2) that Bacula have read & write access to the /backup/pool1-0001 file : 1.2.2.1) storage daemon server shell> ps aux | grep bacula-sd : will show you what user and what group the bacula-sd process is executed under. 1.2.2.2) storage daemon server shell> ls -l /backup : will show you user & group access on all files under /backup. | | | |
 |
ariez |
-------------- |
|
| | | hi can you help me fix this error during backupcatalog
Could not stat "/etc/bacula/bacula.sql": ERR=No such file or directory
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | |
 |
Renier |
User type : Standard |
Register : 2013-Jun-25 |
|
Topics : 0 |
Replies : 1 |
-------------- |
|
| | | Rasmus - You're the man !! Thanks for such great assistance on Bacula .... No job so big or to small for you :-) Respect !! | | | |
 |
Ish |
-------------- |
|
| | | me accounting a problem , that when i hit the run command the default resources are shown. no updations
Plz do help... | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Ish Then you execute the run command, you should see a list of Job resources - do you see such a list ? If you see the Job resources list, you can then select which Job to execute by writing the number corresponding to the Job and then hit Enter - what happens after you have selected a Job resource ? | | | |
 |
RUK |
-------------- |
|
| | | Hi Rasmus,
Thanks for posting a nice bacula document. It really helped me.
I have some question, please help me finding my questions answer.
1. i want to know how to clear the JobIB queue in bacula. i use delete command using bconsle, it tells me that deletion is done but when i check the status the jobid still present. 2. i want to set the maximum volume size to 100M ans maximum volume to 9. So now my question is that when this 9 voulme finish does the bacula start over right the first backup or we need to provide the more backup space so that it can write data in other file. | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi RUK
ad 1) To clear a job from the job queue use the cancel command. After you execute the cancel command from bconsole, bconsole will return a list of jobs in the queue (including current running jobs) - you can then select which job to cancel. If you choose a currently running job, it can take several hours for the job to cancel. You can make it faster by exiting bconsole and restart the storage daemon (shell> service bacula-sd restart), however you will then lose the job queue (you can then run jobs manually, though keep in mind that manually runned jobs does not use the schedule and any backup level and pool overriding in the scedule therefore does not apply).
As a side note, you cannot use the delete command to cancel jobs (the delete command is used to delete entries in the Catalog database and have nothing to do with running or scheduled jobs).
ad 2) The answer to your question whether Bacula will overwrite existing volumes then all volumes are used and no more volumes can be created depends on your pool settings. Especially you will need to set the following in your Pool {} section : - Volume Retention = 61 days: Bacula will not recycle a volume before the retention period counting from the last writing to the volume (the last writing is calculated using the Catalog database not the filesystem, therefore purging a volume (delete all related records from the Catalog database) will make a volume recyclable. You may want to accommodate the 61 days to something that fit's your data size and your storage size.
- Recycle = yes : so that Bacula will automatically recycle purged volumes belonging to the pool (that is : delete the volume content and set the volume status to Append)
- AutoPrune = yes : so that Bacula will automatically apply the retention period then a new volume is needed and no volume can be created or change status to Append.
These 3 settings does NOT guarantee that Bacula will reuse your oldest volume then all volumes are full. If your backup fails because Bacula is not able to provide any appendable volume, you can manually purge the volumes you want to be overwritten, just execute the purge command in bconsole and take it from there.
| | | |
 |
RUK |
-------------- |
|
| | | Really Thanks to you !
I will keep posting you as i start working on bacula ....i must be having lots of questions.
Will you please explain me one more thing
In Pools function : how these 2 values work
- Maximum Volume Bytes
- Maximum Volumes
Will you please explain and what you think before setting these 2 values. | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi RUK The files you backup are kept within volumes. If you backup to harddrives, then the harddrive is called a backup device and the volumes are themselves just files on that harddrive - files into which the backup files are stored (if you backup to tape, then a volume is a tape and the tape drive is the backup device)
A pool is a group of volumes. You typically set volume properties on a group of volumes - that is : you set the volume properties using the pool {} section. If you want some volumes with different properties, you then create a second pool. Also the volume group (the pool) itself can have properties, eg. auto creating volumes then needed. - Maximum Volume Bytes is a volume property specifying the maximum size of the volume file - as backup files are stored within a volume file, the volume file will keep growing until Maximum Volume Bytes.
- Maximum Volumes is a volume group (pool) property specifying the maximum number of volumes allowed in the group - as backup files are stored within volume files belonging to the group and these volume files fill up new volume files needs to be added and in case of auto creating volumes Bacula will keep adding them until either no more space on the harddrive or until Maximum Volumes.
Sensible values for Maximum Volume Bytes and Maximum Volumes depend very much on different factors and different storage strategies - an understanding of this can only come with experience. However I will show you my full pool {} for one of my current backup solutions : - Pool {
- Name = full
- Pool Type = Backup
- Recycle = yes # Automatically delete volume content and change volume status to Append on pruned volumes
- AutoPrune = yes # If no other volume can be create or appended then automatically apply retention periods by deleting DB file, job & volume records
- Volume Retention = 93 days # Wait 93 days after last writing to the volume file before auto pruning the volume
- Maximum Volume Bytes = 25G # Volumes sizes are not allowed to grow beyond 25 GB
- Maximum Volumes = 30 # There can never be more than 30 volumes in the pool
- Label Format = full- # Automatically create new volumes then needed (unless there are 30 volumes)
- Catalog Files = yes # Also write all files stored to the Catalog database (otherwise individual files cannot be restored only jobs)
- Maximum Volume Jobs = 0 # No restriction on how many jobs in a single volume
- Maximum Volume Files = 0 # No restriction on how many files in a single volume
- Volume Use Duration = 0 # No restriction on over how long time the volume can be written
- }
| | | |
 |
RUK |
-------------- |
|
| | | Thank you Very much Rasmus,
I have one more issue working with bacula. 1. I want to know that do we need to comment all the pools{} parameter session, before creating our own pools{} session. 2. Could you please explain me, what is "BackupCatalog" ?, how to access this backupcatalog ? Is it mendatory to have backupcatalog, if i dont want to have backupcatalog, can i comment out Job Catalog{} parameters. Here is the file job catalog section. # Backup the catalog database (after the nightly save) Job { Name = "BackupCatalog" JobDefs = "jobdefs1" 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 = "/opt/bacula/working/%n.bsr" Priority = 11 # run after main backup } | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi RUK
Let me first suggest you to login then posting, that way you will get an email notification then a reply is written to your post.
Ad 1) You don't need to delete or out-comment the example pool {..} sections, the only harm they do is to clutter your bacula-dir.conf file (I prefer to delete them myself though).
Ad 2) I always delete the BackupCatalog example Job from the bacula-dir.conf file. Instead my standard database backup system will backup the catalog database. As my database backup files are not only transfered to Bacula but are also directly available for the last 7 days locally on the database servers, this system allows me to restore the catalog database in less than 2 minutes using a standard routine (I have had many databases in need of restore but never the Bacula catalog). | | | |
 |
rukender_singh |
User type : Standard |
Register : 2013-Jul-23 |
|
Topics : 0 |
Replies : 3 |
-------------- |
|
| | | Hi Rasmus,
Now i have account :P
Thanks for your reply. Will you please suggest me any good GUI tool for bacula monitoring. | | | |
 |
Anonymous |
-------------- |
|
| | | Also Rasmas,
I have some problem understanding Pool concept. This is my bacula-dir.conf file Pool{} parameter configuration in my test environment. Pool { Name = pool1 Pool Type = Backup Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 61 days # one year Maximum Volume Bytes = 1G Maximum Volumes = 20 Label Format = pool1- Catalog Files = yes Maximum Volume Jobs = 0 Maximum Volume Files = 0 Volume Use Duration = 0 } Here in this pool configuration my "Maximum Volume Bytes is 1G" and "Maximum Volumes is 20". It means that i would be having 1GB backup file. once this 1GB fills then it will creat another pool label and start writing in the new pool label. Ex: my current pool label is pool1-0002, once backup file in this pool level exceeds to more than 1GB, it will create another label i.e pool1-0003, am i right ? But, in my test environment i m facing some problem i.e
[root@rukender]# ls -ltrh /backup/ total 1.2G -rw-r-----. 1 root root 1.2G Jul 23 01:05 pool1-0002
As u can see, in my test machine, pool1-0002 exceed to more than 1GB, but still i have only one label, but there must be another pool label once it axceed to 1GB, why there is no other new pool label i.e pool1-0003? | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Anonymous
You have understood the concepts correctly and I would be equally confused seeing the 1.2GB pool1-0002 file. I have never experienced a similar situation myself, the volume sizes have always stopped exactly on the byte at maximum volume bytes. I think there is something at play cheating us, eg. maybe the volume size was above 1 GB before your pool definition was recognized by Bacula or something like that. | | | |
 |
rukender_singh |
User type : Standard |
Register : 2013-Jul-23 |
|
Topics : 0 |
Replies : 3 |
-------------- |
|
| | | ya, you are right i m still confused.
i want to tell you that initially when i start configuring the bacula-dir.conf time at that time i put the Maximum Volume Bytes as 20GB. But after clearifying the concept of this i changed it to 1GB. Maybe this is the reson ?, also if it is the reson than could you please help me to fix it.
one more thing is that why my pool cycle start from pool1-0002 why not form pool1-0001? | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Indeed an earlier bacula-dir.conf file have most likely been the reason. To clean up the mess, I would suggest to use the delete command from within bconsole to delete all your volumes (don't delete your volume files directly on the filesystem - your Catalog database would then not be consistent with your files). Also keep in mind all backup done so far will be lost.
After cleaning up restart your daemons : shell> service bacula-director restart shell> service bacula-sd restart client shell> service bacula-fd restart (different if your client is windows)
Then run a full backup. | | | |
 |
rukender_singh |
User type : Standard |
Register : 2013-Jul-23 |
|
Topics : 0 |
Replies : 3 |
-------------- |
|
| | | Hi Rasmus,
I tried to follow you, I tried Delete option from my bconsole. first it ask me what i want to delete then i gave it my Volume name, then it gave me 4 option in between i choose to delete pool and then it was asking for pool name which i want to delete. All this task performed sucessfully but still i m able to see my pool in my storage location, its not deleted from the storage area.
Will you tell me the way how to fix this problem, so that once the backup pool reach to its limit it will start writing to the new pool ID automatically | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Ruk
Account good 
Unfortunately Bacula is not strong on the no-pay GUI side or at least it was not 3 years ago. If I were to explore the no-pay GUI options for Bacula, I would start here : http://www.bacula-web.org/ | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi rukender_singh
Your original problem was that you had a volume file bigger than the maximum volume bytes set for the pool to which the volume belong. Most likely that had happened because you have had a different maximum volume bytes setting earlier. To remove the volume that was too big, you should from inside bconsole have issued the delete command and then deleted the volume (by selecting volume and then the pool to which the volume belongs). Instead it seems you have tried to delete a pool. I am not sure what it is you see in your storage area, I guess it is your volume files you can see, however also note that even if you delete pool records from the database, the pool will be recreated from your bacula-dir.conf if not deleted from there (I don't think such a recreated pool will pick up the old volume files though, but I am not sure).
Right now your bacula system is likely in a mess. However I think that you should try again from within bconsole to delete all volumes and then AFTER that delete all volume files from the filesystem - this will hopefully make your catalog database and filesystem consistent again. | | | |
 |
Rukender |
-------------- |
|
| | | Hi Rasmus,
I have a problem in bacula. When i m trying to take a first time backup bacula took full backup. Till here its good. But, when i m trying to take incermental backup by adding 1MB file in the backup folder at that time bacula is again taking full backup instead of backuping only 1MB file it backup all the files in incremental backup. Please help me to solve this problem. here output of status client command form bconsole. 1 Full 0 0 Error 06-Mar-13 08:23 snmpagent2-Backup 3 Full 992 197.7 M OK 06-Mar-13 08:27 snmpagent2-Backup 4 Incr 993 199.0 M OK 06-Mar-13 08:33 snmpagent2-Backup 5 Incr 992 199.0 M OK 06-Mar-13 08:40 snmpagent2-Backup | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Rukender
I am a couple of days late with the answer. If you still have the problem, then compare datetime stamps on the files you backup using : 1) shell> ls -l 2) shell> ls -c : especially if ls -c shows identical datetime stamps on your files, you may have another process running that touch your files making Bacula include all files in the incremental backup. | | | |
 |
Rukender |
-------------- |
|
| | | Hi Rasmus, Thanks for your reply!
I have some questions please try to help me. 1. If i start talking backup for a system and after sometime i made changes in bacula-dir.conf file and change some pool setting, then in this case how can i start taking full backup with the new confiuration and deleting all the previous backup. How it will be possible and how to perfom this task sucessfully.Please explain for me in little brief. I tried it from my side but not sucessfull to perfom.
2. how to clean all my previous JOBID using DELETE command from bconsole, i tried it from side it ask me for which jobid i want to delete but if i gave the jobid nothing happen, that jobid still shows up in the list.
| | | |
 |
olop |
User type : Standard |
Register : 2013-Jul-19 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | Help.. When i start the console program (bconsole), i can't connected to director. root@olop-Aspire-V3-471G:~# bconsole Connecting to Director 192.168.1.4:9101 I use ubuntu 12.04 Can you help me? Thanks before..
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi olop
To resolve connection problems between bconsole and Bacula Director, you can try the following steps :
1) If bconsole is NOT installed on the same machine as Director, then try to disable any firewall on both the bconsole machine and especially on the Director machine to determine whether the connection problem lay with the firewall - in fact : don't enable any firewall before you have solved the connection problem.
2) Your bconsole must contact the Director using the Director Name, Password and IP - if any of these mismatch, then the bconsole will be unable to connect. The 2 config files that you need to compare are bacula-dir.conf (on the machine on which the Director is installed) and bconsole.conf (on the machine on which the bconsole is installed - most often that is the same machine). In both config files you need to look for the Director {..} section : - bacula-dir.conf Director {..} Name == bconsole.conf Director {..} Name
- bacula-dir.conf Director {..} Password == bconsole.conf Director {..} Password
- bacula-dir.conf Director {..} DirAddress == bconsole.conf Director {..} Address
3) Director shell> service bacula-director status : test if the Director service is actually started (if not, then shell> service bacula-director start)
4) telnet the Director from your bconsole machine : bconsole shell> telnet 192.168.1.4 9101 : if you can telnet, then there is no firewall problem and you have also double confirmed that Director is running (you quit telnet by holding ctrl and pres ])
5) run nmap to see what ports are available : bconsole shell> nmap 192.168.1.4 director shell> nmap localhost | | | |
 |
aristotleahito |
User type : Standard |
Register : 2013-May-10 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | hi rasmus.. have you tried using webacula? thanks using postgresql? thanks | | take your time!! coz time is gold!! | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi aristotleahito. I have never tried to use webacula nor postgresql with bacula. While I am a happy CLI cowboy myself, I definitely think a web based GUI could be valuable for many - if you try it you are most welcome to post your experience with webacula here. | | | |
 |
olop |
User type : Standard |
Register : 2013-Jul-19 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | Hi.. I want to make my bacula email notifications on backup and restore
My configuration is messages { Name = Standard mailcommand = "/ usr / lib / bacula / bsmtp-h localhost-f \" \ (Bacula \) \ <bacula.situmorang@gmail.com\> \ "-s \" Bacula:% t% e of% c% l \ "% r" operatorcommand = "/ usr / lib / bacula / bsmtp-h localhost-f \" \ (Bacula \) \ <bacula.situmorang@gmail.com\> \ "-s \" Bacula: Intervention needed for% j \ "% r " mail = situmorang.olop @ gmail.com = all,! skipped operator = situmorang.olop @ gmail.com = mount console = all,! skipped,! saved # append = "/ var / lib / bacula / log" = all,! skipped catalog = all }
for mailcommand and operatorcommand i use bacula.situmorang@gmail.com, for mail and comman i use situmorang.olop@gmail.com
but it not works, email not sending..
can you help me?
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi olop
I can see you have configured the operatorcommand to connect to an MTA (Mail Transfer Agent) on localhost - you should be sure that you actually do have an MTA on localhost, to test you can try the following :
- shell> dpkg -l | grep mail : look for mail related packages (likely only works on debian based OS)
- shell> telnet localhost 25 : test if any daemon is listening on port 25
- shell> helo localhost : to be sure that the daemon is an MTA issue the helo command
- shell> nmap localhost : another way to test what daemons are listening on what ports
- shell> mail "test body" -s "test subject" situmorang.olop@gmail.com : sending an email from the command line to confirm that mail actually can be sent
| | | |
 |
Nacho |
User type : Standard |
Register : 2013-Sep-06 |
|
Topics : 0 |
Replies : 1 |
-------------- |
|
| | | Hi Rasmus,
First of all, thank you very much for this wonderful tutorial that helped me a lot in my installation and configuration of Bacula backup system. After doing some tests successful backup and restoration I found a problem on a Windows server, which approximately two hours after the start of Job, it disrupts the connection. I solved this problem by adding a Heartbeat Interval in the bacula-sd.conf and bacula-fd.conf ... So my question is, if it is possible to resume a Job that has been interrupted by this or another cause.
PS: Thanks again and sorry for my basic english.
Cheers! | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Nacho
It is to my knowledge NOT possible to resume a job and I would recommend NOT to fiddle with the bacula database JobStatus fields in order to get Bacula to resume a job.
Better to accept you have a failed job and start again. If your heatbeat solution does not solve the problem with lost connections, then try to split the bacup job up in 2 or 3 backup jobs each having less to backup.
I have no installations with more than 2 TB of data to backup, so I work with relatively small data, however if your data are big, maybe it would be a good idea to look into virtual full backup, see more here : http://www.bacula.org/de/dev-manual/New_Features.html. | | | |
 |
Joe |
-------------- |
|
| | | Hello. I followed your tutorial everything seems to be working fine. I using VM to make tests.I am using a Windows & VM and A Ubuntu Server as clients. For the ubuntu backup I used label and I performed the backup with sucess but there is a file with the label and I can't cd into it to see the files that have been backed up. On the windows client I did not used label and I am using a mounted drive but I don't see any backup files for it. Can you explain how Bacula stores the backup files and how can have access to it and restore? Thannks. | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi Joe
The files you want to backup from various clients are stored within volumes. In case you use a harddrive or directory for backup device, your volumes are themselves files - so your backup files are stored within volume files and these volume files are stored on your backup device (most typically the backup device will be just a directory).
The storage daemon is responsible for handling backup devices. In case the backup device is either a harddrive or a directory (most typically), the volumes will be files, while if the backup device is a tape drive, the volumes will be tapes.
Your backup device is appointed in bacula-sd.conf in the Device{..} section as "Archive Device".
Here is a device section from one of my own bacula-sd.conf files: Device { Name = disk1 Media Type = File Archive Device = /bacula LabelMedia = yes; Random Access = Yes; AutomaticMount = yes; RemovableMedia = no; AlwaysOpen = no; } , you can see that the volume files are stored in the directory "/bacula" on the server on which the storage daemon is running (the storage daemon is running on our backup server of course).
backup server shell> cd /bacula : navigate to the backup device folder (your backup folder may be in a different path). backup server shell> ls -lh : list all the volume files.
(Note that you cannot directly use the volume files for restore, you will of course need to issue the restore command from within the bconsole prompt). | | | |
 |
pquesinb |
User type : Standard |
Register : 2014-Jan-07 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | I have a question about the possibility of expiring jobs. Not in the sense of a job that has run successfully and needs to be aged out of the catalog, but a job in the queue that's ready to be run.
I've got Bacula backing up a number of virtual machines to LTO tape but occasionally the backup doesn't run for some reason, office is closed so the employee doesn't change the tape, etc. What subsequently happens is the job gets queued up and then runs later when the tape is changed, several jobs might start running during the day while files are open and in use instead of at night when they're supposed to. Is there a way to keep from queuing those jobs up or expire them if they don't start within say, an hour or so?
Thanks and keep the great info coming.
- Phil | | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi pquesinb
I am not aware of a setting to automatically cancel a job in case the job have not started within a set time after it is sceduled to run.
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi pquesinb
Ok, I just found the setting, it is called Max Start Delay and needs to be set in the Job resource (or JobDefs).
| | | |
 |
pquesinb |
User type : Standard |
Register : 2014-Jan-07 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | Hi Rasmus,
Thank you!
That setting works quite well, although it appears to have one limitation: The first job will start even if the right tape isn't available, then will complete once the tape is changed (the next day or whenever). The rest of the jobs will then cancel out. The cron job would likely be a good way to deal with that.
This isn't a big problem for us since the first job queued is a very small backup job, only a couple-hundred MB. The next job after that is the big one, which will use a significant chunk of the tape's remaining capacity.
Thanks for finding that!
Cheers,
- Phil | | | |
 |
Anonymous |
-------------- |
|
| | | Very good tutorial ! All is clear, you help me so much ! Thanks a lot best regards a new bacula's user | | | |
 |
avecsi |
User type : Standard |
Register : 2014-Feb-26 |
|
Topics : 0 |
Replies : 3 |
-------------- |
|
| | | Dear Rasmus, 26-Feb 15:05 FH-dir JobId 3: No prior Full backup Jobrecord found. 26-Feb 15:05 FH-dir JobId 3: No prior or suitable Fullbackup found in catalog. Doing FULL backup. 26-Feb 15:05 FH-dir JobId 3: Start Backup JobId 3,Job=BackupClient1.2014-02-26_15.05.26_06 26-Feb 15:05 FH-dir JobId 3: Using Device"disk1" 26-Feb 15:05 FH-sd JobId 3: Volume "pool1-0001"previously written, moving to end of data. 26-Feb 15:05 FH-sd JobId 3: Ready to append to end ofVolume "pool1-0001" size=616 26-Feb 15:05 lmic-w-p-app01-fd JobId 3:Fatal error: VSS API failure calling "InitializeForBackup".ERR=Unexpected error. The error code is logged in the error log file. 26-Feb 15:05 lmic-w-p-app01-fd JobId 3: Fatal error: VSSwas not initialized properly. ERR=The operation completed successfully. 26-Feb 15:05 lmic-w-p-app01-fd JobId 3: Error: VSS APIfailure calling "BackupComplete". ERR=Object is not initialized;called during restore or not called in correct sequence.
26-Feb 15:05 lmic-w-p-app01-fd JobId 3: Fatal error: VSSAPI failure calling "GatherWriterStatus". ERR=Object is notinitialized; called during restore or not called in correct sequence. 26-Feb 15:05 FH-sd JobId 3: Job write elapsedtime = 00:00:05, Transfer rate = 0 Bytes/second 26-Feb 15:05 FH-dir JobId 3: Error: Bacula FH-dir 5.2.5 Build OS: x86_64-pc-linux-gnu ubuntu 12.04 JobId: 3 Job: BackupClient1.2014-02-26_15.05.26_06 Backup Level: Full (upgraded from Incremental) Client: "lmic-w-p-app01-fd"5.2.10 (28Jun12) Microsoft Windows Server 2008 R2 Standard Edition Service Pack1 (build 7601), 64-bit,Cross-compile,Win32 FileSet: "Full Set" 2014-02-2614:20:59 Pool: "pool1" (From Jobresource) Catalog: "MyCatalog" (FromClient resource) Storage: "storage1" (From Jobresource) Elapsed time: 5 secs Priority: 10 FD FilesWritten: 0 SD FilesWritten: 0 FD BytesWritten: 0 (0 B) SD BytesWritten: 0 (0 B) Rate: 0.0 KB/s SoftwareCompression: None VSS: yes Encryption: no Accurate: no Volumename(s): Volume SessionId: 2 | | Andrew | |
 |
avecsi |
User type : Standard |
Register : 2014-Feb-26 |
|
Topics : 0 |
Replies : 3 |
-------------- |
|
| | | Volume SessionTime: 1393425613 Last VolumeBytes: 1,034 (1.034 KB) Non-fatal FDerrors: 2 SD Errors: 0 FD terminationstatus: Error SD terminationstatus: Canceled Termination: *** Backup Error *** I got this message in email. This is the first time I would like to test the backup. The agent has access to the files . 
Could you please help me out where should I search? /var/log/bacula/log has the same message,what i received in email
Thanks, | | Andrew | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi avecsi
Your windows OS is probably 64 bit and the VSS (Volume Shadow Copy) service on a 64 bit system cannot be used from a 32 bit process. If therefore your Bacula win-client is the 32 bit version, you will get the above error (I think).
Be sure you have installed the Bacula 64 bit win-client. | | | |
 |
avecsi |
User type : Standard |
Register : 2014-Feb-26 |
|
Topics : 0 |
Replies : 3 |
-------------- |
|
| | | Thanks. That was the problem. Great tutorial.
Without bacula how can I restore the backup? Bacula created a pool1-0001.gz file. | | Andrew | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Good to hear you got the problem solved.
With regard to restoring, you are under normal circumstances not supposed to restore from Bacula volumes by other means than Bacula. However there are several Bacula tools that can look inside your volumes, especially "bextract" is a tool that can restore files from Bacula volumes. | | | |
 |
Rock |
-------------- |
|
| | | Quite honestly, this is the best basic tutorial I have read for Bacula. There are so many articles that teaches you how to install but as soon as the article gets thru running services, you are left off not knowing config file descriptions. Because of this article I was able to understand Bacula in single day. 1 or more days i'll be able to go deep down to advance configuration. Thanks for this sample tutorial.... | | | |
 |
mmar |
User type : Standard |
Register : 2014-Jul-23 |
|
Topics : 0 |
Replies : 1 |
-------------- |
|
| | | Hi, I have a problem when restore a file from bconsole:
23-jul 09:47 bacula-dir JobId 2611: Fatal error: Socket error on Store end command: ERR=Conexión reinicializada por la máquina remota 23-jul 09:47 bacula-sd JobId 2611: Error: bsock.c:382 Socket is terminated=1 on call to client x.x.x.x:9102
and then the bacula service on client disable so I have to start again.
Could you help me?
Thanks!
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi mmar From your error messages, it apparently look like a network problem. Please follow this procedure : - Disable all firewalls on director server, storage server and client machine
- Director server shell> bconsole
- *> status storage (depending on your configuration you will have different options)
- *> status client (depending on your configuration you will have different options)
If you get any error, please post here. If you get no errors, then try to re-enable any firewall and see if the error is because of a firewall setting. | | | |
 |
siddhartha0111 |
User type : Standard |
Register : 2014-Sep-29 |
|
Topics : 0 |
Replies : 1 |
-------------- |
|
| | | 29-Sep 16:11 bacula-dir JobId 0: Fatal error: postgresql.c:227 Unable to connect to PostgreSQL server. Database=bacula User=bacula Possible causes: SQL server not running; password incorrect; max_connections exceeded. 29-Sep 16:11 bacula-dir ERROR TERMINATION Please correct configuration file: /etc/bacula/bacula-dir.conf
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi siddhartha0111 I have never tried to install bacula with PostgreSQL and I have never seen the error you got.
Your error also suggest that you need to edit your bacula-dir.conf file, however this file does NOT contain the credentials for your catalog nor is the bacula-dir.conf file related to any of the 3 possible causes mentioned in the error message.
Also I think the debugging and best course of action would depend on whether your bacula installation is new. If your bacula installation is new, I would advice you to remove your installation and then reinstall using MySql, please follow the installation instructions carefully | | | |
 |
bella@UTM |
-------------- |
|
| | | Hi, im using bacula 5.2.6, im trying to connect bconsole with director and its display.. connecting to director x.x.x.x:9101, and then its return to system prompt.
what is the problem and solution?
thanks.. | | | |
 |
viroteb |
User type : Standard |
Register : 2014-Dec-18 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | Hi Rasmus I am a newbie in Linux. I am trying to backup two servers, Alfresco and Moodle in my office. (I live in Bangkok too!) I really appreciate your great easy to understand guild on bacula. I have followed you guild and succeeded in backup job. However when I tried to restore, some errors occured. The restore job description in bacula-dir.conf is as follows: Job { Name ="alfresco-restore" Type = Restore Client=alfresco FileSet="alfresco" Storage ="storage1" Pool ="pool1" Messages = Standard Where =/var/bacula-restores } Job { Name ="moodle-restore" Type = Restore Client=moodle FileSet="moodle" Storage ="storage2" Pool ="pool2" Messages = Standard Where =/var/bacula-restores } # List of files to be backed up FileSet { Name ="alfresco" Include { Options { signature = MD5 } File =/opt/alfresco-5.0.b/alf_data } } FileSet { Name ="moodle" Include { Options { signature = MD5 } File =/var/www/moodledata }
The error messages are as follows: 5-Dec 16:51 bacula-dir JobId 52: Error: Bacula bacula-dir 5.2.6 (21Feb12): Build OS: x86_64-pc-linux-gnu ubuntu 14.04 JobId: 52 Job: alfresco-restore.2014-12-15_16.51.02_04 Restore Client: alfresco Start time: 15-Dec-2014 16:51:04 End time: 15-Dec-2014 16:51:04 Files Expected: 0 Files Restored: 0 Bytes Restored: 0 Rate: 0.0 KB/s FD Errors: 2 FD termination status: SD termination status: Termination: *** Restore Error ***
Could you guild me how to solve this problem?
| | | |
 |
viroteb |
User type : Standard |
Register : 2014-Dec-18 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | Some additional information related to my previous problem, when I run restore command as follows: Select the Client (1-3): 1 Automatically selected FileSet: alfresco +-------+-------+----------+-------------+---------------------+------------+ | JobId | Level | JobFiles | JobBytes | StartTime | VolumeName | +-------+-------+----------+-------------+---------------------+------------+ | 33 | F | 4,250 | 180,981,416 | 2014-12-07 23:05:03 | pool1-0004 | | 47 | D | 1,087 | 101,980,894 | 2014-12-14 23:05:03 | pool1-0004 | | 50 | I | 480 | 59,747,632 | 2014-12-15 12:45:18 | pool1-0004 | | 53 | I | 358 | 39,140,893 | 2014-12-15 23:05:03 | pool1-0004 | | 55 | I | 475 | 62,895,786 | 2014-12-16 23:05:02 | pool1-0004 | | 57 | I | 396 | 61,164,226 | 2014-12-17 23:05:02 | pool1-0004 | | 59 | I | 522 | 64,506,300 | 2014-12-18 16:58:08 | pool1-0004 | +-------+-------+----------+-------------+---------------------+------------+ You have selected the following JobIds: 33,47,50,53,55,57,59
Building directory tree for JobId(s) 33,47,50,53,55,57,59 ... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6,193 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: / $ dir ---------- 0 root root 0 1970-01-01 07:00:00 /opt/ $ mark No files marked. $ It seems that there are no file in the /opt directory. Though I have defined it in the bacula-dir.conf as previously shown. FileSet { Name = "alfresco" Include { Options { signature = MD5 }
File = /opt/alfresco-5.0.b/alf_data } } Please guide me on how to solve this problem.
Viroteb
| | | |
 |
Rasmus |
User type : Admin |
Register : 2012-Dec-21 |
|
Topics : 0 |
Replies : 108 |
-------------- |
|
| | | Hi viroteb Sorry for the 2 month waiting (I have been extremely busy). Hopefully you have already solved your problem, however if your question is still relevant, I would like to see your backup job definitions (not your restore job defintions) and I would also like to see your pool definitions. | | | |
 |
Anonymous |
-------------- |
|
| | | |
 |
florek |
User type : Standard |
Register : 2015-Jul-18 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | Hello, Very thanks to this helpful tutorial. I have configure bacula and it works well. Now, i want to back up the databases of remote servers but i don't know how to do? Please, i need your help. | | | |
 |
florek |
User type : Standard |
Register : 2015-Jul-18 |
|
Topics : 0 |
Replies : 2 |
-------------- |
|
| | | Hello everyone, I have configured my bacula to use secure communications with TLS encryption. So, I have create my own Certificate authority and certificate and keys for my bacula server and clients. I have just started by the the tls communications between bconsole and the director, in order to come out with difficulties. But I have encountered this problem (in the prompt command) when running the bconsole command:
Connecting to Director bacula:9101 TLS negotiation failed 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/Bacula_Freque_Asked_Questi.html#SECTION003760000000000000000 for help.
and in the file /var/log/bacula.log, we have: 20-Jul 01:21 bacula-dir: ERROR in authenticate.c:403 TLS negotiation failed. 20-Jul 01:21 bacula-dir: ERROR in authenticate.c:418 Unable to authenticate console "*UserAgent*" at client:127.0.0.1:36131.
Here is my configuration files (only tls part): /etc/bacula/bacula-dir.conf Director { TLS Enable = yes TLS Require = yes TLS Verify Peer = yes TLS Allowed CN = "bacula" TLS CA Certificate File = /etc/bacula/keys/ca.crt TLS Certificate = /etc/bacula/keys/director.crt TLS Key = /etc/bacula/keys/director.key }
/etc/bacula/bconsole.conf Director { Name = bacula-dir DIRport = 9101 address = bacula Password = "dir_bacula" TLS Enable = yes TLS Require = yes TLS CA Certificate File = /etc/bacula/keys/ca.crt TLS Certificate = /etc/bacula/keys/console.crt TLS Key = /etc/bacula/keys/console.key }
Please, I need your help. | | | |
 |
Anonymous |
-------------- |
|
| | | Hello,
I am French and i have a problem with the installation of Bacula. I want to install Bacula Client on a Windows 8. First, i Install bacula-win64-5.2.10, the installation doesn't go to the end. The last screan freeze. Second, The service Bacula doesn't want to start. Can you help me. Thanks Michel Escudié | | | |
 |
Anonymous |
-------------- |
|
| | | Tengo Problemas con Bacula en el estado de la ONU ranura de almacenamiento del heno Que Me Dicen: No se encuentra en el catálogo. Slot = 3 InChanger establece en cero. Tengo 2 drive de almcenamiento 24 ranuras pero no las reconoce todas.
Status | Media Type | Pool | ------+------------------+-----------+----------------------+--------------------| 1 | VXS002L6 | Full | LTO-6 | FullPool | 2*| VXS003L6 | Append | LTO-6 | DifPool | 3*| VXS004L6 | ? | ? | ? | 4*| VXS005L6 | ? | ? | ? | | | | |
 |
Anonymous |
-------------- |
|
| | | Tengo Problemas con Bacula en el estado de la ONU ranura de almacenamiento del heno Que Me Dicen: No se encuentra en el catálogo. Slot = 3 InChanger establece en cero. Tengo 2 drive de almcenamiento 24 ranuras pero no las reconoce todas.
Status | Media Type | Pool | ------+------------------+-----------+----------------------+--------------------| 1 | VXS002L6 | Full | LTO-6 | FullPool | 2*| VXS003L6 | Append | LTO-6 | DifPool | 3*| VXS004L6 | ? | ? | ? | 4*| VXS005L6 | ? | ? | ? | | | | |
 |
johnny |
User type : Standard |
Register : 2016-Aug-04 |
|
Topics : 0 |
Replies : 1 |
-------------- |
|
| | | Hi I want to back up microsoft office documents in chinese characters like 苹果.docx or 苹果.xlsx. My backup is working fine however it cannot backup chinese files. The error code is Could not stat"/home/it/20mount/group/July/??.docx": ERR=No such file or directory Any ideas? I think it has something to do with utf-8 but I am not sure how I am using ubuntu 10.04 , bacula version 5.0.1 , mysql server 5.1.73 | | | |
 |
Anonymous |
-------------- |
|
| | | Dear Sir,
I meet a problem with bacula. I am a new user who use it. I meet an error when I delete all backup and backup again I can backup only one host - other few hosts can not backup. I need you help and how can I backup it again like the first time of backup. I am looking forward to hearing from you soon. Thank in advance!
Ratha | | | |
 |
Balaraju G |
-------------- |
|
| | | Hi Friends i have installed the bacula along with webmin. I have configured the server and client,Now backups are working fine. I have problem with volume pool retention. I have configure volume pool as 2 days. but its not retaining. can any body suggest where am doing the mistake | | | |
 |
Brad Thompson |
-------------- |
|
| | | |
 |
Anonymous |
-------------- |
|
| | | I am testing Bacula and I have noticed a strange thing on linux based clients; Windows clients - OK. It has occurred only in BAT (bconsole, OK). The backup and restore work fine but the Folders (Files) are not shown on the Restore (bRestore) page. When I tried to restore somthing an error pops up: Can't create the restore list. No errors detected in the log file (as far as nothing has happened). If you give me some clues how to troubleshoot this issue I will much appreciate it. Thanks. | | | |