From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079085416076.tru64-unix-managers.marc@archive.invalid> From: "Partin, Kevin S" Date: Thu, 04 Nov 1999 15:38:43 +0000 To: tru64-unix-managers Subject: Using NSR to backup AdvFS Clones X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079085416076 I am trying to use NSR to backup AdvFS fileset clones. I have created a script that I believe accomplishes most of what I want, but I have one question that I hope someone out there could answer for me. I believe that after creating and mounting the fileset clone, I only need to change the last command line parameter to the NSR save command. The last command line parameter passed to the save command is the original file system to backup. I believe that if I change this parameter to be the cloned file system, leaving all other parameters alone, I will correctly backup the cloned fileset, but NSR will believe that I have backed up the original file system. Any thoughts and comments are appreciated I have included my NSR save script below. Thanks, Kevin #! /usr/bin/ksh # # This script is used to backup cloned AdvFS file systems using Networker. # PATH=/sbin:/usr/sbin:/usr/bin:/usr/opt/networker/bin export PATH # # Determine the domain and fileset being backed up. DIR=$(print "$@" | awk '{print $NF}') JUNK=$(awk '{if ($3 == "advfs" && $2 == DIR) print $1}' DIR=$DIR /etc/fstab) DOMAIN=$(print $JUNK | cut -f1 -d\#) FSET=$(print $JUNK | cut -f2 -d\#) # if [[ -z "${DOMAIN}" ]] || [[ -z "${FSET}" ]]; then print 'Error: Unable to determine domain#fset to clone.' exit 1 fi # # Create a directory to mount the fileset clone. if [[ ! -d /clones/${FSET} ]]; then mkdir -p /clones/${FSET} if [[ $? -ne 0 ]]; then print "Error: Unable to create directory to mount ${DOMAIN}#${FSET} clone." exit 2 fi fi # # Make the fileset clone. clonefset ${DOMAIN} ${FSET} ${FSET}_clone if [[ $? -ne 0 ]]; then print "Error: Unable to clone ${DOMAIN}#${FSET}." exit 3 fi # # Mount the fileset clone. mount -t advfs ${DOMAIN}#${FSET}_clone /clones/${FSET} if [[ $? -ne 0 ]]; then print "Error: Unable to mount ${DOMAIN}#${FSET}_clone." exit 4 fi # # Backup the fileset clone. save "$@" # # Unmount the fileset clone. umount /clones/${FSET} if [[ $? -ne 0 ]]; then print "Error: Unable to umount /clones/${FSET}." exit 5 fi # # Delete the fileset clone. rmfset -f ${DOMAIN} ${FSET}_clone if [[ $? -ne 0 ]]; then print "Error: Unable to delete ${DOMAIN}#${FSET}_clone." exit 6 fi # exit 0 ------------------------------------------ Kevin S. Partin The Boeing Company 13100 Space Center Blvd. Mail Code: JHOU-2230 Houston, TX 77059 Phone: 281-244-4088 Pager: 713-549-0713 Facsimile: 281-244-4984 Email: mailto:kevin.s.partin@boeing.com