Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-29-2005, 05:09 PM
jamart jamart is offline
Registered User
 
Join Date: Jul 2005
Posts: 2
Sparse image grows beyond actual data?

I have been using SuperDuper to backup to sparse images created with Disk Utility to potentially expand to the full size of the original volume. For my needs, I like this approach better than Retrospect.

I recently noticed that the sparse image continually expands with each backup to far beyond the actual data written into it. Aparently the new/changed files is written and then the old files are deleted but the disk image does not release the empty space.

Is there a way to retrieve the disk space being retained without data by the sparseimage?

Thanks

John
Reply With Quote
  #2  
Old 07-29-2005, 05:15 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
You can potentially recover unused space in the image using hdiutil and the "compact" option. You have to do this in the Terminal.

The syntax would be:

hdiutil compact image-file

So, if your image is called "My Happy Image.sparseimage" and it's stored on your desktop, you'd use:

hdiutil compact ~/Desktop/My\ Happy\ Image.sparseimage

(the backslashes escape the spaces, the "~" means "My Home Folder").

You can also just type:

hdiutil compact

(include a space at the end)

and then drag the image file into the Terminal -- OSX will automatically put the path in place for you.
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 07-29-2005, 05:46 PM
jamart jamart is offline
Registered User
 
Join Date: Jul 2005
Posts: 2
Thanks Dave,

That worked very well.
John
Reply With Quote
  #4  
Old 07-29-2005, 08:17 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Great: glad to hear it!
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 09-27-2005, 02:22 PM
Bartmart Bartmart is offline
Registered User
 
Join Date: Sep 2005
Posts: 2
Sparse problem too

I'm having the same troubles with sparse image sizes and after following your instructions to compact I get an error in Terminal saying, "hdiutil:compact failed - internal error".

I'm not a wizbang with Terminal. Any ideas?

Thanks,

Wayne
Reply With Quote
  #6  
Old 09-27-2005, 02:27 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Sounds like it doesn't want to compact, Wayne... the image frameworks can be buggy, unfortunately, and you might have hit one of the situations where those bugs are exposed.

Are you certain you gave it a good "path" when you specified the location of the image?
__________________
--Dave Nanian
Reply With Quote
  #7  
Old 09-27-2005, 03:35 PM
Bartmart Bartmart is offline
Registered User
 
Join Date: Sep 2005
Posts: 2
Found a script

Hi Dave,

Found an apple script at: <http://www.macosxhints.com/article.php?story=20041207153823222>.

Seems to work if I drag the image to the app as stated.

thanx,

Wayne
Reply With Quote
  #8  
Old 09-27-2005, 03:57 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Ah, good. So the path must have been mis-specified. Glad you've got it working.
__________________
--Dave Nanian
Reply With Quote
  #9  
Old 10-08-2005, 04:44 PM
edoates edoates is offline
Registered User
 
Join Date: Jul 2005
Posts: 44
Sparse image compacting automatically

I got tired of checking the size of my sparse images and manually compacting them with hdiutil. So, I added the script fragment below to the end of the "daily backup applescript" which I had already modified for my specific volumes:

tell application "Finder"
activate
eject disk "Music Backups"
end tell
activate
display dialog "Awaiting dismount of Music Backups" buttons {"OK"} giving up after 5 default button 1
-- compact the sparse image to prevent unregulated growth
do shell script "hdiutil compact " & "\"/Volumes/Eds Office Backups/Music Backups.sparseimage\""
activate
display dialog "Music Backup Complete" buttons {"OK"} giving up after 30 default button 1

The "activate" verbs cause the script to become the top application so the dialogs show up (for testing, mostly); the dialogs are all for information and time out. I wait 5 seconds for the dismount to occur: always enough time unless the volume cannot be dismounted for some reason. hdiutil will not compact a mounted sparse image.

Hope you find this useful.

Ed
Reply With Quote
  #10  
Old 10-08-2005, 04:49 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Nice work, Ed. Thanks!
__________________
--Dave Nanian
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SuperDuper Backup of AES 128 Encrypted Disk Image rwg4 General 3 11-30-2005 10:28 AM
Sparse image mounted over network is grayed out in backup destination list therevolution General 5 06-25-2005 07:49 PM
Sparse Disk Image track record? Phil General 3 01-05-2005 01:45 PM
Backup to Sparse Image on Linux Box Through Network sukhjeet General 1 12-31-2004 08:08 PM
How do I update an image? dnanian Frequently Asked Questions 0 06-12-2004 10:05 AM


All times are GMT -4. The time now is 04:26 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.