[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] URGENT Restore a backup file!!!!
- Subject: Re: [cobalt-developers] URGENT Restore a backup file!!!!
- From: "Bjarke Alling" <bjarke@xxxxxxxx>
- Date: Fri Jan 14 09:37:49 2000
- Organization: Liga ApS
Hi there,
> Do you have an idea of how we can restore these files? Is there a way to
> extract from the .raq file some files manually?
Try the script from Jeff Bilicki. It works for me :)
/Bjarke
Date forwarded: Tue, 24 Aug 1999 10:47:45 -0700
From: Jeff Bilicki <jeffb@xxxxxxxxxxxxx>
To: cobalt-users@xxxxxxxxxxxxx
Subject: Re: [Qube2] Form of .qub backup files
Send reply to: cobalt-users@xxxxxxxxxxxxx
If you run the following perl script against the tar it will strip out
the Cobalt specific headers and leave just the tar ball. I tried this
on a couple of backup files, it seem to work ok even though tar gave
errors on exit.
Jeff-
#!/usr/bin/perl
# Jeff Bilicki <jeffb@xxxxxxxxxxxxx>
# 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_INDEX";
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;
--------------------------------------------------------------
Cobalt Networks Inc. in Denmark
[LIGA] ApS - Faelledvej 16D - DK 2200 Copenhagen N
Tel: +45 35 36 95 05 - - bjarke@xxxxxxxx
http://cobalt.liga.dk
--------------------------------------------------------------