bacula interview questions
Top bacula frequently asked interview questions
I have a server with Debian Lenny and Bacula 2.2.8 installed. I decided to update the bacula.
I tried to follow several tutorials I found on the web but ended with this error "GLIBC_2.11' not found" after I execute a apt-get -f install
to install dependencies.
Source: (StackOverflow)
It currently is 700MB but it's conceivable that it'll grow beyond the 1GB. Normally I just copy this file to another location (for the curious, it's the database of a Zope instance,
a ZODB file).
This file changes little from day to day, but I understand Bacula can't do inside-the-file subdivision for incremental backups. Anyway, it doesn't matter. What I want to do is a full backup daily and keep two of them and a full backup weekly and also keep two of them. So
at any given time I can get yesterday, the day before yesterday, a week
ago and two weeks ago. Would you think that's a good idea?
I suppose I should make two schedules, daily and weekly. But which numbers should I have on the volumes and the pools to achieve this? Two volumes of 1.5GB? Any hints or guidance is welcome, I'm not a sysadmin and my experience with Bacula is very limited.
Source: (StackOverflow)
I'm trying to script bacula to delete old files that are not used any more. While there are over 1000 old files im not willing to do it manualy.
How far I've come
for filename in $(echo "list volume" |bconsole |grep Purged |awk -F\| '{print $3}')
do
echo "delete volume=2012-10-19_23h40m" | bconsole
done
But now I have the problem of the security question where someone have to enter "yes"/"no".
Are you sure you want to delete Volume "2012-10-19_23h40m"? (yes/no)
But the bconsole program is just exiting!
Any ideas?
Source: (StackOverflow)
On Bacula/Bareos, document stress the importance of Catalog bootstrap file must be save on somewhere safe, I know Catalog consist of MySQL DB dump and optional included Bacula/bareos config file, but how exactly does anyone recover from scratch in case the whole backup infrastructure is gone?
Is it just install all Bacula/bareos software, then import MySQL and config then fire up Director would do the trick?
Source: (StackOverflow)
I try to create a python client for bacula, but I have some problem with the authentication.
The algorithm is :
import hmac
import base64
import re
...
challenge = re.search("auth cram-md5 ()", data)
#exemple ''
passwd = 'b489c90f3ee5b3ca86365e1bae27186e'
hm = hmac.new(passwd, challenge).digest()
rep = base64.b64encode(hm).strp().rstrip('=')
#result with python : 9zKE3VzYQ1oIDTpBuMMowQ
#result with bacula client : 9z+E3V/YQ1oIDTpBu8MowB'
There's a way more simple than port the bacula's implemenation of base 64?
int
bin_to_base64(char *buf, int buflen, char *bin, int binlen, int compatible)
{
uint32_t reg, save, mask;
int rem, i;
int j = 0;
reg = 0;
rem = 0;
buflen--; /* allow for storing EOS */
for (i=0; i >= (rem - 6);
if (j
Source: (StackOverflow)
I have a blank screen while installing webacula and I can't figure out why.
-the login to the mysql database is correct
-Zend library added
-webacula.conf is in /etc/apache2 but returns :
apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Syntax error on line 8 of /etc/apache2/conf.d/webacula.conf: Cannot load mods-available/mod_rewrite.so into server: /etc/apache2/mods-available/mod_rewrite.so: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
does LoadModule rewrite_module modules/mod_rewrite.so refers to /mods-available/mod_rewrite.load ? or do I need to add something ?
If anyone knows webacula, contact me and I'll pay you a pint
edit : test_mod_rewrite/testlink1.html returns "mod_rewrite test ERROR"
Source: (StackOverflow)
I'm studying bacula and I need to understand this schedule:
Schedule {
Name = Daily
Run = Full 1st sun at 00:05
Run = Differential 2nd-5th sun at 00:05
Run = Incremental mon-sat at 00:05
}
And this is what I understand:
- There's a full backup every first Sunday of the month at 00:05
- There's a differential backup every Sunday of second, third, fourth, and fifth week of the month at 00:05
- There'a an incremental backup every day from Monday to Friday at 00:05
Is that correct?
In 2. the differential backup refers to the previous full/differential backup? So to the previous Sunday?
Source: (StackOverflow)
Is it possible to obtain the status of Bacula backup system Director in some parseable format?
It looks like the human-readable representation (one you can see when using bacula-console) is formed on the director side during the TCP control connection.
Source: (StackOverflow)
I often need to find a file in bacula catalog to restore, but don't know the path or the jobid it was backed up in, nor the full name of the file, just a portion of the name.
Optimal solution would be an sql search in bacula catalog. I tried all versions of mysql queries inside bconole using sqlquery command of the form:
SELECT FROM Filename WHERE Name LIKE '%filename_portion%';
but get error on the syntaxis of sql command...
Any suggestions of the correct sql query format for the task?
thanks
Anton
Source: (StackOverflow)
I'm learning how to use bacula, and I followed the instructions from here to configure it.
Now my problem is that I enter in my debian linux terminal
sudo bconsole
Then I get
Connecting to Director 127.0.0.1:9101
and then nothing happens!!!! I just go back to the terminal.
If I don't use sudo
, it gives an error that bconsole.conf is not accessible. I tried also to do this from root with su
, but also does the same as sudo.
Any ideas? Please assist.
If you require any additional information, please ask for it and I'll provide it.
Thanks.
Source: (StackOverflow)
I have a script:
-rwx------. 1 root root 135 Oct 15 12:00 /backup/purge.sh
#!/bin/bash
volume=`echo "list volumes" | bconsole|grep -i "Append\|Full"|awk '{print $4}'`
echo "purge volume=$volume yes" | bconsole
If I run it manually it runs.
If I put the script to crontab it doesn't run, however the log says it ran.
Oct 15 16:07:01 sdfdsfdsf CROND[36326]: (root) CMD (/backup/purge.sh)
The schedule:
07 16 * * * /backup/purge.sh
If I run manually:
/backup/purge.sh
Connecting to Director weewr:9101
1000 OK: 1 werewrewrewr Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
purge volume=Vol-0001 yes
This command can be DANGEROUS!!!
It purges (deletes) all Files from a Job,
JobId, Client or Volume; or it purges (deletes)
all Jobs from a Client or Volume without regard
to retention periods. Normally you should use the
PRUNE command, which respects retention periods.
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
1 File on Volume "Vol-0001" purged from catalog.
There are no more Jobs associated with Volume "Vol-0001". Marking it purged.
Source: (StackOverflow)
I am very new to this shell scripting and bacula. I want to create a script that schedules the backup using bacula?
How to do that?
Any lead is appreciated?
Thanks.
Source: (StackOverflow)
we are looking for a backup solution for our xen servers that meets the following requirements:
- makes backups while machines are running
- has easy to use disaster recovery without depending on complex infrastructure in case of a disaster
- can backup all kinds of linux and windows machines
- sends some kind of message if something is not working. We dont want to monitor everything manually
We tried Acronis Backup & Recovery 10 virtual edition but it is not compatible with linux vms. Bacula does not seem to have good disaster recovery, as far as we know.
My question:
What are good backup solutions for our requirements?
Thanks advance for your answers.
Cheers
Arne
Source: (StackOverflow)
I've recently installed Bacula on Centos7 Cloud HaaS from digital ocean. However, all the tests and steps were done correctly, the problem is when I try to connect to bacula's console using the command:
sudo bconsole
I get Connecting to Director localhost:9101 and nothing happens.
If i try listening:
netstat -ltnp
No outputs are present from the port 9101
After trying debugging using:
bacula-dir -d 100 -c /etc/bacula/bacula-dir.conf
I get the following output:
bacula-dir: dird.c:223-0 Debug level = 100
[root@panel ~]# 14-أكت 11:37 bacula-dir: ERROR TERMINATION at bsys.c:484
bacula-dir is already running. pid=2458
Check file /var/run/bacula-dir.9101.pid
Any clue what to do in order to get the bconole to work?
Source: (StackOverflow)
I have Bacula server that uses 2 storages.
I'm trying to restore file with the steps
root@archive:/etc/bacula/clients# bconsole
Connecting to Director 1.1.1.1:9101
1000 OK: archive.blablabla Version: 5.2.6 (21 February 2012)
Enter a period to cancel a command.
*messages
You have no messages.
*restore
The defined Catalog resources are:
1: MyCatalog
2: catalog_blablabla_ru
Select Catalog resource (1-2): 1'
Expected a positive integer, got: 1'
Select Catalog resource (1-2): 1
Using Catalog "MyCatalog"
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: Select full restore to a specified Job date
13: Cancel
Select item: (1-13): 12
Enter JobId to get the state to restore: 816
Selecting jobs to build the Full state at 2015-09-18 22:02:41
You have selected the following JobId: 816
Building directory tree for JobId(s) 816 ...
11 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: /
add *
13 files marked.
$ done
Bootstrap records written to /var/lib/bacula/archive.blablabla.restore.8.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
Vol0047 archive2 FileStorage2
Volumes marked with "*" are online.
13 files selected to be restored.
The defined Restore Job resources are:
1: first-restore
2: second-restore
3: third-restore
4: fourth-restore
5: fifth-restore
It chooses Storage (archive2) before I choose Restore Job. Looks like it read this config not from restore job definition.
Could anyone help me to understand how to define right storage if it set it before reading job config?
Source: (StackOverflow)