- Installed bacula-client and bacula-traymonitor packages (sudo apt-get install bacula-client bacula-traymonitor)
- Copied /etc/bacula/bacula-fd.conf and /etc/bacula/tray-monitor.conf from the old laptop
- Changed the host name in both the above files
- Added my new laptop to /etc/bacula/bacula-dir.conf on the bacula director host by copying the job definition of the old laptop and renaming it
Showing posts with label Bacula. Show all posts
Showing posts with label Bacula. Show all posts
Thursday, 27 October 2011
A New Computer -- Backups
I'd love to find a new backup solution, but the reality is I have Bacula working reasonably consistently right now, and it's the easiest thing to get set up quickly. So I:
Sunday, 14 November 2010
Configuring Bacula Tray Monitor on Ubuntu
I use Bacula to back up my servers and desktop/laptop computers. It's always bugged me that I didn't have a little icon on my Ubuntu desktop showing the status of the backup: whether it was running or not and some indication of progress. Most backup systems have this. In Bacula it's called the tray monitor. The configuration file documentation seemed straightforward, but it took a lot of fiddling to get it right.
I think I have a fairly typical situation:
I think I have a fairly typical situation:
- A backup server with a direct attached backup storage device (in my case, two: a USB-connected 1 TB hard drive, and a DAT-72 tape drive)
- Several clients being backed up on a regular schedule
- One client is the laptop I use as my normal workstation. This is the one I want to put the tray monitor on
- I'm already successfully backing up this configuration, so all my passwords in my Bacula configuration files are correct, and all my firewalls are configured to allow the backup to work
- The laptop and the backup server are both running Ubuntu 10.04
- I installed the tray monitor software on my laptop:
- On my laptop I changed the tray monitor configuration file (
/etc/bacula/tray-monitor.conf
) to look like this: - Still on the laptop, I added the following to the file daemon, aka backup client, configuration file (
/etc/bacula/bacula-fd.conf
): - I restarted the file daemon on the laptop (don't forget this or you'll confuse yourself horribly):
- On the backup server, I added the following to the director configuration file (
/etc/bacula/bacula-dir.conf
): - Finally, I reloaded the configuration file on the backup server:
- Now all I had to do is start the tray monitor. The command line is:
sudo apt-get install bacula-traymonitor
Monitor {
Name = backup02-mon
Password = "Monitor-Password"
RefreshInterval = 5 seconds
}
Client {
Name = pacal-mon
Address = pacal.pender.jadesystems.ca
FDPort = 9102
Password = "Monitor-Password"
}
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
Director {
Name = backup02-mon
Password = "Monitor-Password"
Monitor = yes
}
sudo service bacula-fd restart
# Restricted console used by tray-monitor to get the status of the director
Console {
Name = backup02-mon
Password = "Monitor-Password"
CommandACL = status, .status
}
sudo bconsole
reload
exit
bacula-tray-monitor -c /etc/bacula/tray-monitor.conf
- Select System-> Preferences-> Main Menu
- Select "System Tools" on the left side of the window
- Click on the "New Item" button on the right side of the window
- Fill in the "Name:" box with "Bacula Tray Monitor" and the "Command:" box with the command line above
- Click "OK"
- Click "Close" in the "Main Menu" window
- I used a separate password specifically for the monitor. The tray monitor's configuration file has to be readable by an ordinary user without special privileges. So anyone can see the password. Don't use the same password for the monitor as you use for the director or the file daemons, or you'll be making it easy for anyone who gets access to your computer to read all the files on your network.
- You have to change to above bits of configuration file to match your particular configuration. Change: "laptop.example.com" to the fully qualified domain name of the computer on which you're installing the tray monitor. Change "Monitor-Password" to something else more secure that everyone who reads this blog doesn't know about.
- "backup02-mon" and "laptop-mon" are both names you can change to be anything you want them to be. In my case, "backup02-mon" means the monitor on the backup server (hostname: backup02), and "laptop-mon" means the monitor on the laptop (hostname: laptop)
Thursday, 14 May 2009
Ubuntu VMs and Time
Ubuntu 8.04 in VMs under VMWare Server 2.0.1 need the kernel parameter "clocksource=acpi_pm" when they boot. Edit /boot/grub/menu.lst and add "clocksource=acpi_pm" to the end of the line that starts "# kopt=". Don't remove the "#". In this context it's not a comment. After you save the file, run "sudo update-grub" and then reboot.
If the guest doesn't have this kernel parameter specified, time runs backwards on the guest O/S, or time hangs or gets stuck. This was showing up especially on my backup server running bacula, and the backup clients that had large amounts of data. I suspect that high loads exacerbate the problem.
If the guest doesn't have this kernel parameter specified, time runs backwards on the guest O/S, or time hangs or gets stuck. This was showing up especially on my backup server running bacula, and the backup clients that had large amounts of data. I suspect that high loads exacerbate the problem.
Monday, 21 April 2008
Tape Rotation with Bacula
I love the topic of backups. I say that because it's IT's dirty secret. No one should keep data in one place only, yet it's very difficult to set up a backup solution. Different organizations have different needs, and so backup software has to provide a lot of options. But the need for options means when you just want to get basic backup running quickly, it's a challenge.
This post is part of a series about rolling your own backup solution. There are other ways to do it, but I wanted to do my own solution one more time...
I'm backing up a Windows XP desktop and a Windows XP laptop, a Dell SC440 which is the VMWare host, plus a number of Linux VMs that provide my basic infrastructure: DNS, DHCP, file server, Subversion server, test platforms for software development, and the backup server itself.
I chose tape in part because I can take the backup off-site. I'll take a tape off-site once a week. That means I might lose a week's worth of work if my house burns down, but I'm not ready to invest in the time and effort to swap tapes every day, either.
The Bacula documentation has a good section on backup strategies, but none of them include mine. I'll have to figure it out myself.
Bacula manages tapes in a tape pool. A pool is just a group of tapes. (Bacula calls tapes "volumes".) I want to let Bacula fill up one tape per week before it uses another, which is the default behaviour. At the end of the week, I want to eject the tape and use another. I'll let Bacula automatically recycle the tapes, meaning that after a week (in my case), Bacula will reuse a tape, overwriting the old backups on it.
Anyway, I started with a rotation to do a full backup Sunday night, incremental backups all week, and then eject the tape Saturday night after the last incremental. With three tapes I would always have last week's tape off site, except on Sunday.
I really only got started when I realized that that's a lot of tape wear given that the off-site happens once a week and that I have a fair bit of disk space on my main server. So my next idea is:
Take a full backup Monday night to disk, and incrementals up to Sunday night. Then, Monday morning write the whole disk volume to tape and take it off-site. That way I only run the tape once a week, and hopefully in a scenario that minimizes the chance of shoe-shining. I'll write the data to disk without compression, and let hardware compression compress the data to tape.
This also has the nice property that last week's backups are also on the disk (if I have enough disk space), so if I need a file I can get it from disk rather than retrieving the tape.
This post is part of a series about rolling your own backup solution. There are other ways to do it, but I wanted to do my own solution one more time...
I'm backing up a Windows XP desktop and a Windows XP laptop, a Dell SC440 which is the VMWare host, plus a number of Linux VMs that provide my basic infrastructure: DNS, DHCP, file server, Subversion server, test platforms for software development, and the backup server itself.
I chose tape in part because I can take the backup off-site. I'll take a tape off-site once a week. That means I might lose a week's worth of work if my house burns down, but I'm not ready to invest in the time and effort to swap tapes every day, either.
The Bacula documentation has a good section on backup strategies, but none of them include mine. I'll have to figure it out myself.
Bacula manages tapes in a tape pool. A pool is just a group of tapes. (Bacula calls tapes "volumes".) I want to let Bacula fill up one tape per week before it uses another, which is the default behaviour. At the end of the week, I want to eject the tape and use another. I'll let Bacula automatically recycle the tapes, meaning that after a week (in my case), Bacula will reuse a tape, overwriting the old backups on it.
Anyway, I started with a rotation to do a full backup Sunday night, incremental backups all week, and then eject the tape Saturday night after the last incremental. With three tapes I would always have last week's tape off site, except on Sunday.
I really only got started when I realized that that's a lot of tape wear given that the off-site happens once a week and that I have a fair bit of disk space on my main server. So my next idea is:
Take a full backup Monday night to disk, and incrementals up to Sunday night. Then, Monday morning write the whole disk volume to tape and take it off-site. That way I only run the tape once a week, and hopefully in a scenario that minimizes the chance of shoe-shining. I'll write the data to disk without compression, and let hardware compression compress the data to tape.
This also has the nice property that last week's backups are also on the disk (if I have enough disk space), so if I need a file I can get it from disk rather than retrieving the tape.
Sunday, 13 April 2008
Bacula Catalog Job and MySQL
To make the Bacula catalog job work:
- Edit /etc/bacula/bacula-dir.conf on the backup server
- Change where it says -u
-p to -u bacula - Edit ~bacula/.my.cnf and put this:
[client]
password=your_secret_password
- chmod 400 ~bacula/.my.cnf ; chown bacula:bacula ~bacula/.my.cnf
Bacula Notes
The Bacula documentation is good, but given the complex and interdependent nature of the backup problem, it's pretty overwhelming at first.
One thing that's not immediately obvious is where the configuration files are. The bacula-fd.conf file for Windows XP clients is at C:\Documents and Settings\All Users\bacula\bacula-fd.conf. On Ubuntu using the packages installed from universe, the configuration files are in /etc/bacula.
If you get errors that the server can't connect to the client, make sure the director definition in the client's bacula-fd.conf allows the director to connect, and that the client's password matches the server's password in the client resource of /etc/bacula/bacula-dir.conf. There's a helpful picture of what you need to do in the Bacula documentation.
One thing that's not immediately obvious is where the configuration files are. The bacula-fd.conf file for Windows XP clients is at C:\Documents and Settings\All Users\bacula\bacula-fd.conf. On Ubuntu using the packages installed from universe, the configuration files are in /etc/bacula.
If you get errors that the server can't connect to the client, make sure the director definition in the client's bacula-fd.conf allows the director to connect, and that the client's password matches the server's password in the client resource of /etc/bacula/bacula-dir.conf. There's a helpful picture of what you need to do in the Bacula documentation.
Thursday, 10 April 2008
Another SCSI Package
This is useful:
sudo apt-get install lsscsiIt shows you what SCSI devices you have attached to a machine and some important values.
Wednesday, 9 April 2008
Installing Bacula
To install bacula with MySQL (after you do this):
sudo apt-get install mysql-server bacula-director-mysql
Then you have to set up exim4, the mail system. Choose:
mail sent by smarthost; no local mail
After you install the MySQL version of the bacula director, you can install the rest of bacula this way, and also install some recommended packages:
sudo apt-get install bacula
sudo apt-get install dds2tar scsitools sg3-utils
I had these notes from an earlier set-up of exim4:
sudo apt-get install mysql-server bacula-director-mysql
Then you have to set up exim4, the mail system. Choose:
mail sent by smarthost; no local mail
After you install the MySQL version of the bacula director, you can install the rest of bacula this way, and also install some recommended packages:
sudo apt-get install bacula
sudo apt-get install dds2tar scsitools sg3-utils
I had these notes from an earlier set-up of exim4:
Look into setting up /etc/aliases later to redirect mail to more useful places. Also, make sure the domain of the outgoing address is one known to the outside world (e.g. jadesystems.ca) or the SMTP server will probably reject the message.
Bacula: Backups
To install bacula on Ubuntu, you need to add the universe repositories to /etc/apt/sources.list. It's just a matter of uncommenting four lines:
deb http://ca.archive.ubuntu.com/ubuntu/ dapper universeThen:
deb-src http://ca.archive.ubuntu.com/ubuntu/ dapper universe
...
deb http://security.ubuntu.com/ubuntu dapper-security universe
deb-src http://security.ubuntu.com/ubuntu dapper-security universe
sudo apt-get updateThe standard install of bacula uses sqllite, which the bacula guy reports as having problems...
Subscribe to:
Posts (Atom)