[Bacula-users] Success using Bacula to back up an iSCSI-only NetApp
We have a two-controller FAS2020 NetApp with 1.5TB of storage (1TB on one, 500GB on the other), licensed for iSCSI only, and an old desktop system connected to a 12-tape library of LTO-4 (800GB uncompressed) tapes. I have gotten Bacula to back up files stored on ext3fs (Linux) and NTFS (Windows) partions on iSCSI LUNs on the NetApp. The Bacula instance is running under Ubuntu Gutsy (a "long-term supported" release), using the Gutsy package, 2.0.3. We're using Postgres version 8.2.5 as the database, because that's the available Ubuntu package and we use Postgres elsewhere. We're using the "open-iscsi" initiator, from an Ubuntu package. LVM and device-mapper are not installed on the backup-host, and it only has a single Fast Ethernet connection. (The hosts that are being backed up generally have dual Gigabit Ethernet connections to the filers.) I wrote several scripts to allow Bacula to take snapshots on the filer and mount them in a known place before the backup-job runs, then clean them up afterward. I can't publish them because they have a lot of details specific to our network, but the general outline is as follows: "easy_snap" takes 3 arguments: an NTFS or ext3fs volume-label, an indication of which filer the volume is on, and the complete path to the LUN on the filer (such as "/vol/vol5/testdatav2.lun"). It makes up a name to use for the snapshot. It issues "snap create", "lun clone create" and "lun map" commands via RSH to the filer. (It also checks to see if another snapshot of the same volume is still mounted by mistake; if so, it unmounts and unmaps it.) If another snapshot with the same name exists, the script tries to delete it, and renames it if that doesn't work. It cleans up any old "bacula-" snapshots. Then it issues a local "iscsiadm -m session --rescan" command, and if it still can't see the new LUN, logs the iSCSI session out and in again. It mounts the partition using "LABEL=" syntax, to a mount-point under /mnt where the last part is the lower-case form of the volume-label. "easy_unsnap" takes the same 3 arguments as "easy_snap". It unmounts the partition, logs out the iSCSI session, unmaps the LUN, and tries to delete the snapshot. We noticed that the snapshots weren't always being deleted, which is one reason why "easy_snap" tries to clean up old snapshots several ways. If a backup spans an hour-boundary where hourly snapshots are being created, or midnight for the nightly snapshot, the mapped LUN becomes part of the snapshot and the snapshot we took can't be deleted until the hourly or nightly snapshot goes away. I tried backing up Linux hosts with a filesystem on a raw (no partions) LUN using this script, but it didn't work: when the LUN is discovered, the /dev/disk/by-label/LABEL symlink does not get created. We wouldn't be able to back up LVM volumes with this configuration either, because LVM depends on device-mapper, and device-mapper would try to grab the disks itself. Right now our performance is limited by the network interface for LUNs containing a few large files, and by Postgres INSERT performance for filesystems with lots of small files. We get 9MByte/sec for the big-file LUNs, so for example a 46-GB SQL Server database takes an hour and 18 minutes to run. We have a test-system with over 300,000 files (including over 100,000 zero-length ones) in just a few directories, but only 580 MB of total data; that took two and a half hours to back up last night. However, our entire backup (except test-systems) ran within 6 hours, and we already have more than half of our production data being backed up with Bacula. For the most part, Bacula does what we want it to do in this case, and it allows a lot more flexibility with restoring files than we were able to achieve trying to use the "dump" command on the NetApp filers. -- David L. Lambert Yahoo! IM: davidleelambert ** MSN IM: lambe...@cse.msu.edu -- ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Postgres functions for interpreting the bacula "LStat" column
The advantage of a "C" stored procedure is speed: bacula=# SELECT MAX('a'||bacula_lstat_mtime(lstat)) FROM file WHERE fileid<100 ; max - a2008-02-27 20:24:10-05 (1 row) Time: 70.689 ms bacula=# SELECT MAX(base64_decode_lstat(12,lstat)*interval '1 second' + timestamptz 'epoch') FROM file WHERE fileid<100 ; max 2008-02-27 20:24:10-05 (1 row) Time: 762.390 ms Otherwise, the PL/perl function does the same thing; thanks for the pointer! ebollengier wrote: > > You can also use the bweb pure PL function for that (see > bweb/scripts/bweb-postgresql.sql). > > DavidLeeLambert wrote: >> I was looking into making queries for a particular file in a Bacula >> Postgres database, and came up with the attached functions. [...] -- David Lee Lambert Software Developer, Precision Motor Transport Group, LLC -- ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Postgres functions for interpreting the bacula "LStat" column
I was looking into making queries for a particular file in a Bacula Postgres database, and came up with the attached functions. If someone really wanted to do searches by other attributes, it would be simple to follow the same pattern. With the functions and functional indexes, a query like SELECT bacula_lstat_mtime(lstat),path.path,filename.name FROM file INNER JOIN path ON file.pathid=path.pathid \ INNER JOIN filename ON file.filenameid=filename.filenameid WHERE bacula_lstat_mtime(lstat)<'2009-12-05 13:55' ORDER BY bacula_lstat_mtime(lstat) DESC LIMIT 15 is really fast. -- DLL pgbacula.sql Description: Binary data Makefile Description: Binary data pgbacula.c Description: Binary data -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Speed and integration issues
I'm trying to use Bacula to do daily backups of data stored in iSCSI LUNs on a NetApp filer, using NetApp snapshots to ensure consistency. The hosts to be backed up have dual Gigabit Ethernet connections to the NetApp. The backup host consists of: - a desktop-class (32-bit, 2.4GHz) machine with a single local SATA drive - an Overland Storage autochanger with room for 12 LTO-4 tapes - a built-in Fast Ethernet adapter (3com 3c509) and an add-in Gigabit Ethernet adapter (Linksys rev 10) - running Ubuntu G server and kernel 2.6.22; Bacula is storing its catalog in a local Postgres database One issue we've struggled with is speed. With the GB adapter, reading files from a snapshot via iSCSI, we were consistently getting less than 2MByte/sec, sometimes as low as 300kbyte/sec. Yesterday we switched to the 100Mbit adapter, and were sometimes able to almost max it out during a full backup (network usage of 10 to 11 MByte/sec on the Fast Ethernet adapter), but it also slowed down sometimes: it took 25 minutes to back up a 22GB LUN with 7GB of files, and it took 25 minutes to back up a 6GB LUN with 1.1GB of files (yes, almost exactly the same amount of total time). I recently did dd to a raw tape and got a speed of at least 17MByte/sec. The local drive seems to have a write speed of about 7Mbyte/sec, so pooling to local disk is not an option. On our faster servers with dual server-class Gigabit Ethernet adapters, I can get burst read speeds of 40 to 70 Mbyte/sec. We'd also like our tape-rotation policy, for at least some of our tapes, to mirror as closely as possible what we do for our existing servers with local tape drives: daily tape rotation in a two-week cycle, with tapes written at night and taken off-site for one week starting the day after they're written. That gives us an 18-hour window in which to write the tapes, and we should be able to fill an 800-GB tape in 17 hours 46 minutes ( 800e8 / 1.25e7 / 3600 = 17.77 ) at Fast Ethernet speed. We probably have less data than that to back up; in fact, if we keep our other current tape drives and don't back up /usr/portage or similar directories anywhere, we probably have less than 400GB. Therefore, I think we should do a full backup each day; perhaps even a full backup of the first snapshot and incremental backups for later snapshots that same day. Is that reasonable? Is it possible to initiate an incremental backup that would store all changes against the contents of a certain medium? (Say tape 5 is in the drive today and has a 380GB full backup and 6 20-GB incremental backups going back 3 months. File /foo/bar/xxx changed monday and tuesday, so the newest copy is on the tuesday tape; but write a copy to the friday tape as well.) Has anyone seen similar speed problems with a NetApp filer, or another device that serves up snapshots of iSCSI or FCP LUNs, and solved them? Supposing that round-trip-time over the network or disk seek latency on the NetApp is the problem, could we solve it by running multiple parallel backup jobs to the same tape (without spooling)? How can we initiate an external script from Bacula that would do all the snapshots and mount them before any backup job runs; or would we have to do that kind of thing from cron? It took about 5 minutes to enter the "select files" phase when doing a restore of a backup with 7 GB of data and 128000 files. Does that mean that if we made one big backup job over all hosts with 700 GB of data, it would take 8 hours to enter the "select files" phase? -- David Lee Lambert ... Software Developer Cell phone: +1 586-873-8813 ; alt. email <[EMAIL PROTECTED]> or <[EMAIL PROTECTED]> GPG key at http://www.lmert.com/keyring.txt pgp5b3SRyVZH0.pgp Description: PGP signature -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] wx-console on Windows won't talk to director on Linux (bug?)
On Wednesday 24 October 2007 15:40:36 Arno Lehmann wrote: > 24.10.2007 15:42,, David L. Lambert wrote:: > > I’ve been running Bacula [...]. However, when I run the wx-console on > > Windows and point it at the director running on Ubuntu, I get errors > > like the following: > > > > .helpautodisplay: is an invalid command. > > > > #.messages > > > > : is an invalid command. > > > > #.help: is an invalid command. > > Can you use bwx-console from a linux machine to connect to that DIR > without these issues? I got the same errors from two different Linux boxes, with the same configuration file. However, I figured out how to fix it. I had no "CommandACL = " line in the "Console" section for that client in the director configuration-file. After adding "CommandACL= *all*", it works. Thanks. -- David L. Lambert Software Developer, Precision Motor Transport Group, LLC Work phone 517-349-3011 x215 Cell phone 586-873-8813 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Backup-to-tape in a lights-out environment?
I've been evaluating Bacula to use for backing up a Linux+Samba fileserver and a few other Linux application servers to tape. Right now, some Windows servers in the same machine-room are backed up as daily full backups on a weekly rotation, using BackupExec. Someone goes in once a day during business hours, puts away last night's tape, and inserts the tape for the current day; the backup runs some time during the night. It seems like we could force this to happen with backup pools, one pool for each weekday night. However, I'm not sure how that would interact with holidays and with the second set of tapes that are kept off-site. Is there a way to tell Bacula to "use whatever tape is in the drive, no matter what"? -- David Lee Lambert Software Developer, Precision Motor Transport Group, LLC work phone 517-349-3011 x223 cell phone 586-873-8813 e-mail [EMAIL PROTECTED] - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users