[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] What is the format of the Raq3 backup files?
- Subject: RE: [cobalt-users] What is the format of the Raq3 backup files?
- From: "JK" <thejk@xxxxxxxx>
- Date: Fri May 18 14:20:00 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Well, last time I looked in the archive, I came across a perl script
that strips away the header info for RaQ2 backups. With a little
modification, I was able to get it to work for RaQ3. Look below.
>Does anyone know the format of the RAQ3 backup files? I
>want to look at the
>contents, but I can't figure out how to uncompress it. I
>have searched this
>list to no avail.
I call this strip.pl ;-)
#!/usr/bin/perl
# Jeff Bilicki
<<<underline><color><param>0000,8000,0000</param>jeffb@xxxxxxxxxxxxx</
underline></color>>
# modified for Ra3 use by JK (thejk@xxxxxxxx)
# removes the header out of a Qube 2 and RaQ 2 backup file
use strict;
my ($infile);
my ($outfile) = "out.tar.gz";
my ($end) = "\%\%END_XML";
my ($begin) = "\%\%BACKUP_HEADER";
if (@ARGV) {
$infile = $ARGV[0];
} else {
print "usage: stripheader.pl <<file name>\n";
exit 1;
}
open (INFILE, $infile) or die "Can't open: $!\n";
open (OUTFILE, ">$outfile") or die "Can't open $!\n";
while (<INFILE>) {
if ( /^$begin/ ... /^$end/ ) {
next;
} else {
print OUTFILE $_;
}
}
close(INFILE);
close(OUTFILE);
exit 0;