From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,41f38c581b5f53fb X-Google-Attributes: gidfee84,public From: grosen@dilbert.cc.ndsu.nodak.edu (Johannes Grosen) Subject: Re: How To RDUMP an Advfs Filesystem Date: 1995/09/02 Message-ID: #1/1 X-Deja-AN: 109363658 sender: usenet@ns1.nodak.edu (Usenet login) references: <425i8g$des@ixnews4.ix.netcom.com> organization: North Dakota Higher Education Computing Network newsgroups: comp.unix.osf.osf1 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 - -f - | rsh tapehost \ 'dd of=/dev/ 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