| Article: |
Automated Backups with Existing Tools | |
| Subject: | Interesting Article | |
| Date: | 2004-03-24 13:31:04 | |
| From: | peterhickman | |
|
Response to: Interesting Article
|
||
|
There is a simpler solution that has the image file built up as it goes.
|
||
Showing messages 1 through 2 of 2.
-
Re: There is a simpler solution
2005-06-27 11:45:54 LHaim [Reply | View]
-
Re: There is a simpler solution
2005-06-28 14:00:14 peterhickman [Reply | View]
Not seen that one before. You could try setting SOURCE to some smaller directory such as /User/fred/Documents or whatever and running it with that.
Also try removing the-quietoption from thehdiutilline and see if that tells us anything interesting.
After thehdiutil createdoes the IMAGENAME exist? You should be able to mount it even if it is empty.




Thanks for posting your script ("origial" & "simpler"). I tried them both, and failed.
First, "simpler": here's what happened after running the script (writing out to a FW external with 85GB free space; data is 41 GB)
prompt> backupscript_simpler
Initializing...
Creating...
Copying...
.......
Finishing...
hdiutil: create failed - Bad file descriptor
prompt>
-----
Next "original"
prompt> backupscript_original
(script crashed so ran line-by-line from shell)
prompt> /bin/sh
sh-2.05b# SOURCE='/'
sh-2.05b# FILEDEST='/Volumes/MAXTOR_2/Mac_backups'
sh-2.05b# VOLUMENAME=backup_`date +%Y-%m-%d`
sh-2.05b# IMAGENAME=$FILEDEST/$VOLUMENAME.dmg
sh-2.05b# SIZE=`df -m $SOURCE | grep '^/'`
sh-2.05b# SIZE=`echo $SIZE | cut -d" " -f3`
sh-2.05b# SIZE=`dc -e "$SIZE $SIZE 20 / + n"`
sh-2.05b# hdiutil create -quiet -megabytes $SIZE -fs HFS+ -volname $VOLUMENAME $IMAGENAME
sh-2.05b# DEVICE=`hdiutil attach $IMAGENAME | grep $VOLUMENAME | cut -d" " -f1`
load_hdi: IOHDIXControllerArrivalCallback: timed out waiting for IOKit to finish matching.
hdiutil: attach failed - No such file or directory
sh-2.05b#
---
Result: no backup.
Any comments, observations, suggestions?
Thanks!!!