Backup disk will not unmount

Paul Derby

Registered
I've been using a Unix script to back up my internal PowerBook drive to an external FireWire drive. The script runs just fine, but when the backup is completed, I drag the desktop image of the FireWire drive to the trash to unmount it and get a finder alert saying "The operation could not be completed because the disk "backup disk" is in use.

Any ideas what the problem is? I don't have any applications running that I know of that use the backup disk. I quit the terminal window when I finish doing the backup. Here is the script:

#!/bin/sh -
###
# Backup script for Mac OS X
#
# Example ./backup_sh '/Volumes/VA Backup Disk/FULL_BACKUP_FOR_X'
#
# History:
# -------------------------------------------------------------------
# 06/2001 Authored by Bernhard Baehr
# xx.xx.2001 bb created for Mac OS X Public Beta
# 25.03.2001 bb modified for Mac OS X final
# 22.06.2001 bb modified to use ditto
# 01.07.2001 bb added handling of the Mac OS X symbolic links in /
# and of /dev
# -------------------------------------------------------------------
# 08/02/2001 Modified by Barry Sharp
# 1. Add NAME variable
# 2. Cleanup and make tidy
# 3. Use full pathnames for programs
# -------------------------------------------------------------------
###

NAME="${0##*/}" # Obtain base of the calling pathname

if [ "$1" = "" ]; then
echo "Usage: $NAME target_directory"
echo " Backup up an HFS+ root file system to the target_directory"
echo " preserving Mac resource forks and Unix access rights."
exit 1
fi

if [ $(id -u) -ne 0 ]; then
echo "$NAME: you must be root to use this command"
exit 1
fi

echo "dumping to directory $1"

/bin/ls -1a / | while read i
do
case "$i" in
\.|\.\.|Volumes)
;;
var|tmp|etc|cores)
/bin/ln -s "private/$i" "$1/$i"
;;
mach)
/bin/ln -s "/mach.sym" "$1/$i"
;;
dev)
/bin/cp -Rp /dev "$1/$i"
;;
*)
/usr/bin/ditto -V -rsrcFork "/$i" "$1/$i"
# find "/$i" -type d -exec mkdir "$1{}" \; \
# -or -type f -exec CpMac "{}" "$1{}" \;
# cp -Rp "/$i" "$1"
;;
esac
done

exit 0
 
I didn't get any replies on my post of a few days ago.

I was able to get a copy of Disk Copy 6.4 with the new CLONE command. It does a great job of cloning my internal drive to an external FireWire drive. I've booted both 9.2 and OS X 10.1 from the external drive with no problems. So now I have a way to make backups (gosh I wish there was something like Retrospect for OS X that supported stand alone machine incremental backups).
 
Back
Top