Home › Forums › OS X Server and Client Discussion › Backing Up › Automating BRU CLI Backup software on 10.2.6 Server
- This topic has 4 replies, 4 voices, and was last updated 21 years, 7 months ago by
tim914.
-
AuthorPosts
-
September 11, 2003 at 5:32 pm #356397
joeschram
ParticipantHi folks,
I’m looking to speak with other folks who have successfully deployed Tolis
Group’s BRU CLI software on Mac OS X Server 10.2.6. I need some help with
automation.Our setup is 1 Xserve,1 XServe RAID, and a 21-tape Exabyte 221L library with
one IBM LTO2 drive in it. The Exabyte system is connected via SCSI to the
Xserve. Ideally we need to backup information from 6 separate
drives/partitions each night in an incremental backup, and then one full
backup each month. Right now, I’d settle for just a nightly dump of each
partition to its own individual backup process occupying as many tapes as
that process would need.I chose to use BRU over Retrospect for several reasons:
1.) No 1TB backup limit
2.) No backup sets and other artificial organization schemes to deal
with/fight with
3.) Strength and reliability of a well-known Unix tool that has a very
positive rating with many Unix pros I spoken with
4.) Pure speed! This thing is very fast…about 1.8GB/minute!If I manually enter each command to BRU in order, I can get it to work just
fine. That is of course cumbersome, so I looked for a better way. The GUI
interface for BRU CLI is IMHO buggy and very limited…from what I can see,
it offers no library control, so that is not an option for us. Onward to the
command line, right? Well…My problem is that automating this software via the command line has been
quite a struggle for me. As our firm migrated over to OS X last year, I have
been reading everything I can about Unix in order to bridge the gap in my
knowledge, but shell scripting is still a major challenge. I have looked at
the scripts that Tolis offers on their site, but many of these scripts were
written for Linux/Unix or other platforms. Not a one is written for the OS
X-only commands in BRU CLI. Also they are setting variables, inserting “if
than” statements, and other higher level programming stuff but as of right
now I don’t need to do any of that.Can anyone offer me some assistance? It would be really helpful if I could
see some scripts others are using so that I could pick them apart and get
this thing going. I’m committed to making this software work with our
systems, but I need a basic working solution to get the job done now until I
fully get the hang of this shell scripting stuff. Even a nightly full dump
to tape would be great.Thanks for reading…
Joe Schram
Graphic Systems Manager
<><><><><><><><><><><><><><><><><><>
Firestar CommunicationsSeptember 12, 2003 at 3:11 pm #356403joeschram
ParticipantThanks for the response MacTroll…
I’ve got a shell script working that lets me choose the tape and the path, but that’s about it. I spent about 6 hours making it and getting it to work yesterday, but it works (I’m emailing it to you now). I am not a trained programmer (a designer actually!), so it is very commented (for me to be able to sort stuff out) and probably does in 100+ lines what someone else could do in 25, but worked on a test volume yesterday night. The goal now it to tighten it up a bit and then try it out on a “real” production sharepoint.
I’m not looking to rip anyone’s hard work off or anything, but what I want is to see some other scripts that other people are using with OSX and BRU CLI. My dinky script just creates a logfile, makes a backup and then puts the tape back in its slot. I need a bit more than that, but I do not have the know how to implement much else, so I want to see some other scripts so I can pick them apart and learn from them. Perhaps ask some questions from the authors of those scripts as well. I understand that I can crontab this script for scheduling so that solves that problem, but I looking for more. Those scripts I mentioned on Tolis’ site are pretty tough for me to decipher. FYI, once I get this stuff figured out, I’m going to give it all away of course. I am asking others for help, so it is only fair and good in the spirit of open source to make my scripts them freely available on my personal .mac site for anyone else to use, and I’ll send ’em in to Tolis so that other Mac users at least have a place to start. Just thought you all should know that I’m looking to learn and share, not milch.
Joe
September 17, 2003 at 9:50 pm #356436Anonymous
ParticipantHi Joe,
Actually, the BCCM – as limiting as it is – works fine with your configuration. The idea is to generate a normal environment and let cron take care of the specifics.
If you drum through chapter 3 in the BRU CLI guide PDF, you’ll find a full description of the files that are actually manipulated when you configure things through the BCCM GUI.
Basically, there are 6 script pieces and 1 config file that come into play in your situation:
/bru/paths
/bru/schedules
/bru/checkschedules
/bru/mountcmd0.sh
/bru/unmountcmd0.sh
/bin/incbru
&
/bru/brulib0.conf[b:d6fac64bfb]/bru/paths[/b:d6fac64bfb] – contains the list of volumes/paths that you want backed up.
[b:d6fac64bfb]/bru/schedules[/b:d6fac64bfb] – contains the level, day, and time info for the backups to occur.
[b:d6fac64bfb]/bru/checkschedules[/b:d6fac64bfb] – the script that cron executes every 5 minutes.
[b:d6fac64bfb]/bru/mountcmd0.sh[/b:d6fac64bfb] – this is the “load a tape” script that controls loading tapes in your library.
[b:d6fac64bfb]/bru/unmountcmd0.sh[/b:d6fac64bfb] – this script is responsible for unloading the tapes in your library.
[b:d6fac64bfb]/bin/incbru[/b:d6fac64bfb] – incbru does all of the actual BRU work.
[b:d6fac64bfb]/bru/brulib0.conf[/b:d6fac64bfb] – contains the information used to automate tape changes by the mountcmd and unmountcmd tools.By passing a level for the backup (zero means full, one is everything since the last level 0, two is since the last level 1, etc.) to incbru – i.e.:
[code:1:d6fac64bfb]incbru 3[/code:1:d6fac64bfb]
You can provide full, incremental, and/or differential backup operations. As the incbru script runs, it monitors the output from the actual BRU executable engine and writes all of the data to a logfile. This file is created in /var/log and when the backup succeeds, the log is renamed to the archive ID (a unique value for every BRU archive), gizp’d and stored in /bru/logs.The next bit of work is performed by the mountcmd0.sh and unmountcmd0.sh script files in the /bru directory. While BRU is running, it will request that media be made available or removed and these are the two members of the team that do the work. They work in conjuction with the values in the /bru/brulib0.conf file. This conf file [i:d6fac64bfb]SHOULD[/i:d6fac64bfb] have been created during the installation process. If it wasn’t created, you can execute [b:d6fac64bfb]/bru/osxscan.sh[/b:d6fac64bfb] (as root or with sudo) to create it. A valid brulib0.conf file should look like:
[code:1:d6fac64bfb]# BRU Library Config File for changer0
# Vendor = EXABYTE
# Model = Exabyte EZ17
NumDrives=1
NumSlots=7
FirstDrive=0
FirstSlot=1
ntape0=0
0_FirstSlot=1
0_LastSlot=7
[/code:1:d6fac64bfb]This file tells the mountcmd0.sh and unmountcmd0.sh files how to do their jobs.
Let’s start with that example library setting above:
We have a simple /bru/paths file that contains [b:d6fac64bfb]/Volumes/RAID-1[/b:d6fac64bfb] as the only entry and a schedules file that contains one schedule:
0|Monday|01:00
Therefore, at 1am on Monday morning (Sunday night), a backup of /Volumes/RAID-1 will be executed.
01:00 – cron executes incbru with an argument of 0 (Full backup)
01:01 – (or there-about) incbru starts the backup passing BRU the filesystem listed and the setting to use the mountcmd and unmountcmd for manipulating the media it will require.
BRU executes /bru/mountcmd0.sh asking for volume 1 in your first drive (ntape0)
/bru/mountcmd0.sh looks into /bru/brulib0.conf and determines that tape 1 is in slot 1 of the library. It then calls libctl to load the tape from slot 1 into the drive. Once the tape is loaded, mountcmd returns control to BRU and teh actual backup begins.
At some point (if you have that much data), the tape will fill and BRU will then call unmountcmd to unload tape one in preparation for tape 2. After unmountcmd unloads the tape and returns it to its slot, the cycle repeats and mountcmd is called for tape 2. This cycle repeats until all of the data specified has been processed.
Once the backup is totally complete, the log file that was being generated within /var/log is renamed and gzip’d and stored in /bru/logs/. Such a log file will look like:
[code:1:d6fac64bfb]-rw-r–r– 1 root wheel 520543 Sep 11 15:44 BRU-3f60f9350d19.LOG.gz[/code:1:d6fac64bfb]
To parse the contents, you may either gunzip the file, or use tools such as zgrep to scan the contents.
I’ll monitor this thread and post more as time permits, but I must move on for the moment (phone calls …).Tim Jones
TOLIS Group, inc.September 17, 2003 at 9:59 pm #356437tim914
ParticipantAdditionally, we have a collection of scripts that our users have provided over the years available on the Tech Tips area of our web site.
The major diff’s betweeen these scripts running under Solaris, Linux, or other Unix and OS X boils down to the device names and select path diffs.
Check out [url]www.bru.com/tips3.html[/url] for more info on BRU use.
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed