Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Automated Backups with Existing Tools
Subject:   Re: There is a simpler solution
Date:   2005-06-27 11:45:54
From:   LHaim
Response to: Interesting Article

Hello Peter,


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!!!

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Re: There is a simpler solution
    2005-06-28 14:00:14  peterhickman [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 -quiet option from the hdiutil line and see if that tells us anything interesting.

    After the hdiutil create does the IMAGENAME exist? You should be able to mount it even if it is empty.