Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: grosen@dilbert.cc.ndsu.nodak.edu (Johannes Grosen)
Subject: Re: How To RDUMP an Advfs Filesystem
Date: 1995/09/02	[thread overview]
Message-ID: <DEA5H0.vFn@ns1.nodak.edu> (raw)
In-Reply-To: 425i8g$des@ixnews4.ix.netcom.com

WILLIAM DEMURO (billd1@ix.netcom.com) wrote:

: Help - I am trying to use rdump to back up an Alpha OSF1 3.0
:        Advfs filesystem.  Is there a remote VDUMP I am missing?
:        I checked the FAQ's but found nothing.

: please reply via e-mail

:  billd1@ix.netcom.com

No, you're not missing anything. Digital (for what reasons I can't fathom)
provides no support for remote dumping of advfs file systems. It can be
done, however, as follows:

/sbin/vdump -u -b 60 -<level> -f - <filesystem> | rsh tapehost \
'dd of=/dev/<tapedev> bs=60k'

Here is a perl script I wrote that we are using at our site. It creates
and mounts a clone, backs it up to stdout, unmounts and removes the clone.
Works great for us. YMMV and use at your own risk.

#!/local/bin/perl

#
# Backupfset
#
# Creates a filesystem clone, mounts it, vdump to stdout, unmounts and
# removes the clone
#
# Usage:
#
# backupfset [-d] [-f filesystem] [-l level]
#
# Author: Johannes Grosen (grosen@dilbert.cc.ndsu.nodak.edu)
# 	  North Dakota State University
#
use Getopt::Std;

$mnt = '/mnt';

getopts('df:l:');

$debug = defined($opt_d);

if (defined($opt_l)) {
    $level = $opt_l;
} else {
    $level = 9;
}

if (defined($opt_f)) {
    $filesystem = $opt_f;
} else {
    &usage;
}

# Make sure mount point for clone exists
die "Mount point $mnt doesn't exist!" if (! -d $mnt);

# Get the filesystem info we need for cloning
($domain, $fset) = split('#', $filesystem);
$clone = sprintf("%s_clone", $fset);

# clone the fileset
$cmd = sprintf("/usr/sbin/clonefset %s %s %s", $domain, $fset, $clone);
if ($debug) {
    print "$cmd\n";
} else {
    $err = system($cmd) / 256;
    die "$cmd failed: $!" if $err;
}

# mount the clone so we can back it up
$cmd = sprintf("/usr/sbin/mount -t advfs %s#%s %s", $domain, $clone, $mnt);
if ($debug) {
    print "$cmd\n";
} else {
    $err = system($cmd) / 256;
    die "$cmd failed: $!" if $err;
}

# do the backup
$cmd = sprintf("/sbin/vdump -u -b 60 -%d -f - %s", $level, $mnt);
if ($debug) {
    print "$cmd\n";
} else {
    $err = system($cmd) / 256;
    die "$cmd failed: $!" if $err;
}

# unmount the clone
$cmd = sprintf("/usr/sbin/umount %s", $mnt);
if ($debug) {
    print "$cmd\n";
} else {
    $err = system($cmd);
    die "$cmd failed: $!" if $err;
}

# delete the clone fileset
$cmd = sprintf("/sbin/rmfset %s %s", $domain, $clone);
if ($debug) {
    print "$cmd\n";
} else {
    $err = system($cmd);
    die "$cmd failed: $!" if $err;
}

0;

sub usage {
    print STDERR "Usage: backupfset [-d] <-f filesystem> ";
    print STDERR "[-l level (default 9)]\n";
    exit -1;
}

--
John Grosen				grosen@toons.cc.ndsu.nodak.edu
Information Technology Services         (701) 231-1042 (Voice)
Room 242-J2, IACC Bldg.                 (701) 231-8541 (FAX)
North Dakota State University, Fargo, ND 58105



  reply	other threads:[~1995-09-02  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-08-31  4:00 How To RDUMP an Advfs Filesystem WILLIAM DEMURO 
1995-09-02  4:00 ` Johannes Grosen [this message]
1995-09-05  4:00   ` Gilbert Wong
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox