computers &technology 20 Jul 2008 06:40 pm
How to fix a Corrupted Time Machine Backup
The other day time machine decided to stop working for me and kept giving me errors about mounting the backup image. After firing up Console.app I found that the sparsebundle which time machine stores the backup data in was corrupted. This is a bad thing since if I couldn’t find a way to fix the image all my backups for the last 6 months would be lost
.
My first step on the road to fixing the problem was to open the bundle with “Disk Utility” and see if repair disk would work. To do this you need to drag the back image (the .sparsebundle) and drop it on disk utility. Then you can select the image and press “Repair Disk”. Usually if if you have some disk corruption this would fix it, but not for me.
After working for a couple minutes Disk Util would fail at repairing the disk since it found an “Invalid Sibling Link”. It seems the disk was corrupted and the disk repair utility decided it wasn’t going to repair it. Worried that my backups were gone for good I did some Googling and found that this problem isn’t totally uncommon. It seems that Disk Utility is just fairly bad at repairing disks and that using the “real” disk repair utility fsck_hfs might actually fix the problem.
Of course there’s one problem fsck_hfs has to be used directly on a block device not a “sparsebundle” disk image. Not only that but the volume you run the util on cannot be mounted and OS X always tries to mount the image when you click on it. The solution? Use the command line tool hdiutil to “attach” but not “mount” the image. This makes OS X create a /dev/ device for the sparse bundle but doesn’t actually mount the filesystem.
So combining hdiutil and fsck_hfs we might have a way to fix the disk image. Note: Make sure you turn off Time Machine in the System Preferences panel. We don’t want Time Machine trying to mount our image and back up to it until we’re done making all the repairs.
First I ran hdiutil:
hdiutil attach -nomount -readwrite Bhaal_0011247e3338.sparsebundle
After a minute or two of thinking we had success:
/dev/disk1 Apple_partition_scheme /dev/disk1s1 Apple_partition_map /dev/disk1s2 Apple_HFSX
The next step was run fsck_hfs on the main volume.
fsck_hfs -rf /dev/disk1s2
-f is required to force a check since this is a journaled file system. I also used -r to have it rebuild the filesystem catalog for the “invalid sibling link” this is required (thanks Dan). At this point I went out for breakfast since I was running a disk repair utility over my wireless internet to my Linux SAMBA server. After coming back from breakfast we had success!
** /dev/rdisk1s2 ** Checking Journaled HFS Plus volume. ** Detected a case-sensitive catalog. ** Checking Extents Overflow file. ** Checking Catalog file. ** Rebuilding Catalog B-tree. ** Rechecking volume. ** Checking Journaled HFS Plus volume. ** Detected a case-sensitive catalog. ** Checking Extents Overflow file. ** Checking Catalog file. Incorrect number of thread records (4, 13716) ** Checking multi-linked files. ** Checking Catalog hierarchy. Invalid directory item count (It should be 0 instead of 1) Invalid directory item count (It should be 3 instead of 4) Incorrect folder count in a directory (id = 3795486) (It should be 0 instead of 1) ** Checking Extended Attributes file. ** Checking multi-linked directories. ** Checking volume bitmap. ** Checking volume information. Invalid volume free block count (It should be 37267681 instead of 37310834) Volume Header needs minor repair (2, 0) ** Repairing volume. ** Rechecking volume. ** Checking Journaled HFS Plus volume. ** Detected a case-sensitive catalog. ** Checking Extents Overflow file. ** Checking Catalog file. ** Checking multi-linked files. ** Checking Catalog hierarchy. ** Checking Extended Attributes file. ** Checking multi-linked directories. ** Checking volume bitmap. ** Checking volume information. ** The volume Backup of Bhaal was repaired successfully.
on 03 Aug 2008 at 10:18 am 1.Anders’ blog om dit og dat » At reparere en time-machine backup said …
[...] prøver jeg mig frem med en kombination af hdiutil og fcsk_hfs som beskrevet her: http://blog.jthon.com/?p=31, så må vi se om det [...]
on 06 Aug 2008 at 10:54 pm 2.PurpleHaze said …
You so saved my ass.. thanks
on 25 Aug 2008 at 7:10 am 3.bojangleslovin said …
my ass too. Thanks!
on 09 Sep 2008 at 4:25 pm 4.Dan Riley said …
With the “Invalid sibling link” error, it looks like the “-r” to rebuild the catalog is required. I think this is also why “Disk Utility” failed–”Disk Utility” just runs fsck_hfs itself, but without the “-r”. By way of support, here’s what I get on a damaged TM sparse disk image with fsck_hfs and no “-r”:
sh-3.2# fsck_hfs -yf /dev/disk5s2
** /dev/rdisk5s2
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive catalog.
** Checking Extents Overflow file.
** Checking Catalog file.
Invalid sibling link
(4, 11213)
** Volume check failed.
With “-r”, fsck_hfs just finished rebuilding the catalog.
on 02 Oct 2008 at 5:05 pm 5.Thibault said …
Help! I’m not unix literate but when I type in the command along with the name of my sparse bundle, I get this:
hdiutil: attach failed – No such file or directory
I suspect that hdiutil does not know how to locate my sparse bundle. What do I need to do?
on 02 Oct 2008 at 5:12 pm 6.Thibault said …
Oh never mind. I think I figured it out. It seems the easiest way is to type in the command and then drag and drop the sparse bundle icon to the command line and it will automatically type in all the path to get to it. Whew! I’m in the process of repairing.
on 02 Oct 2008 at 6:42 pm 7.Thibault said …
Hello again:
The repair failed. I’m running it again. In the mean time, are there other tricks to try? This is the result from the termina:
fsck_hfs -rf /dev/disk3s2
** /dev/rdisk3s2
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive catalog.
** Checking Extents Overflow file.
** Checking Catalog file.
** Rebuilding Catalog B-tree.
** Rechecking volume.
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive catalog.
** Checking Extents Overflow file.
** Checking Catalog file.
Incorrect number of thread records
(4, 29037)
Incorrect number of thread records
(4, 29037)
** Checking multi-linked files.
Incorrect number of file hard links
** Checking Catalog hierarchy.
Missing thread record (id = 2601736)
Missing thread record (id = 2627256)
Invalid directory item count
(It should be 98412 instead of 98400)
Invalid directory item count
(It should be 22255 instead of 22257)
Invalid directory item count
(It should be 8129 instead of 8139)
Invalid directory item count
(It should be 3028 instead of 2808)
Incorrect folder count in a directory (id = 18)
(It should be 2 instead of 0)
Incorrect folder count in a directory (id = 19)
(It should be 22255 instead of 22257)
Incorrect folder count in a directory (id = 2601655)
(It should be 0 instead of 1)
Incorrect folder count in a directory (id = 2675756)
(It should be 4 instead of 7)
Incorrect folder count in a directory (id = 2675519)
(It should be 3 instead of 5)
Incorrect folder count in a directory (id = 2675527)
(It should be 1 instead of 9)
Incorrect folder count in a directory (id = 2675803)
(It should be 1 instead of 2)
Incorrect folder count in a directory (id = 2676109)
(It should be 1 instead of 2)
** Checking Extended Attributes file.
** Checking multi-linked directories.
Invalid parent for directory inode (id = 2601736)
(It should be 19 instead of 18)
Invalid name for directory inode (id = 2601736)
(It should be dir_2601736 instead of temp2601736)
Incorrect number of directory hard links
** Volume check failed.
on 02 Oct 2008 at 10:26 pm 8.Jthon said …
You could try the program “DiskWarrior” it supposedly can repair more filesystem errors than fsck_hfs. Only problem is that it’s about $100 US, has no free trial, and it might not work.
It’s possible your backup got corrupted beyond repair
.
on 07 Oct 2008 at 8:00 am 9.Bonobo said …
Thank you! Process is running, so I am not sure yet but you have given me a glimpse of hope already.
on 06 Nov 2008 at 6:32 pm 10.Phil said …
trying this now and hoping it works. I have the same issue.
An Apple “Genius” told me today that this is very common with the drive on another machine over wireless. I have an external Seagate drive connected to my airport and was backing up that way.
He explained to me that with a TimeCapsule you get a ton of extra cache (like server level amount) so there is a nice big buffer in case of a wireless drop of any kind. With ordinary external drives you do not get a large amount of cache, so it becomes very easy for TimeMachine to go through a wireless hiccup during backup and thus corrupt your backup files. Supposedly this is why Apple still doesn’t officially support 3rd party external hard drives over wireless for TM. Of course it doesn;t hurt that the best solution is to pay more money and buy a TC.
on 07 Nov 2008 at 12:05 am 11.Jthon said …
My linux box already has a fairly large disk cache so I doubt that’s the entire problem. In fact if the TC has such a big cache if you lost power while backing up you’d almost guarantee some disk corruption. Though I think HFS+ is supposed to be journaled and would avoid corrupting the disk.
I recently had my backup get totally destroyed when my server had a hardware check error during a backup. It took a run of reiserfsfsck to repair the filesystem, and I found some orphaned files from the sparsebundle. Too bad there’s no way to tell where they belong so my backups are permanently gone.
Overall I’m not so impressed with Time Machine anymore. I would expect a backup system to be more robust and maybe actually tolerate something going wrong. I’m better off just checking all my files into svn, or syncing all my files via rsync. At least with these programs if the network dies or I lose power at least I won’t corrupt the entire backup. Worst case it should corrupt the files being written and not the entire filesystem.
on 13 Dec 2008 at 4:38 pm 12.Alec de zegher said …
This was the only real solution I found on the whole internet after looking for 3 day.
Thank you very much!
on 31 Jan 2009 at 3:29 pm 13.Kyle said …
Saved my butt! Thanks
on 04 Feb 2009 at 10:11 am 14.Jason Harrison said …
In case you are having the problem that the backup volume on your NAS, or the sparsebundle can’t be unmounted/ejected I have found this work.
Use lsof to generate a list of open files against the volumes they are on, this may help you kill processes that have the files open, or demonstrate that the backup volume is not in use, but that Mac OS X.5 thinks it still is:
lsof | grep “name of your volume to eject”
if you get something like:
lsof: WARNING: can’t stat() smbfs file system /Volumes/backup
Output information may be incomplete.
assuming “dev=2d000009″ from mount table
then you don’t have any processes using that volume.
Kill any processes (close applications, including terminal if necessary) output by lsof, then unmount the volume with:
diskutil unmount force /Volumes/backup
where “backup” is the name of my NAS volume, yours might be different.
Now you can use hdiutil and fsck_hfs to mount and fix the volume.
You may need to prefix these commands with sudo in order to make them work.
-Jason
on 17 Feb 2009 at 10:50 pm 15.Munshisan said …
I use Time Capsules and frequently get backup corruption. Practically any time someone closes a MacBook while a backup is running. Also notoriously unreliable over wireless, so I use a wired connection when backing up. It helps to use TimeMachineEditor.app schedule backups.
I am running your fix on one damaged backup now. Hope it works! Thanks for the tip.
on 18 Feb 2009 at 7:01 am 16.Fixing corrupt Time Machine Sparsebundles | iotashan's blog said …
[...] http://blog.jthon.com/?p=31 [...]
on 08 Mar 2009 at 6:41 pm 17.RCS said …
For the last couple of days I have been running TM to my NAS. During a backup run yesterday I got an error that the backup couldn’t be mounted and the bundle was corrupt.
I tried the steps here but that didn’t seem to work. See the output below. Any thoughts?
RMB-2:Backup_RMB rcs$ hdiutil attach -nomount -readwrite rcs_002332c7170e.sparsebundle/
/dev/disk1 GUID_partition_scheme
/dev/disk1s1 EFI
/dev/disk1s2 Apple_HFS
RMB-2:Backup_RMB rcs$ fsck_hfs -rf /dev/d
disk0 disk0s2 disk1 disk1s2 dtracehelper
disk0s1 disk0s3 disk1s1 dtrace
RMB-2:Backup_RMB rcs$ fsck_hfs -rf /dev/disk1s2
** /dev/rdisk1s2
** Checking Journaled HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Rebuilding Catalog B-tree.
** The volume rcs_002332c7170e.sparsebundle could not be repaired.
I tried this a couple of times with the same result.
on 08 Mar 2009 at 7:37 pm 18.Jthon said …
I had this happen to me in the end, and it turned out that the filesystem underlying the sparse bundle was corrupted. I ended up having to just scrap my entire backup and start over.
I’ve also heard that “DiskWarrior” can sometimes repair corrupted filesystems fsck_hfs cannot, but I have not verified this.
on 12 Mar 2009 at 9:09 am 19.Sixer said …
Thanks, saved my ass too
on 12 Mar 2009 at 10:55 am 20.Jonathan said …
I have a older Windows XP laptop that I’m using as a NAS and encountered this problem. The first time that I ran fsck_hfs, it gave an error, but I ran it again, and it worked. Many thanks as I had almost given up on Time Machine.
on 20 Mar 2009 at 5:43 am 21.voigtstr said …
I was having the issue of the sparsebundle appearing to be corrupt, timemachine couldn’t successfully back up to it.
I thought I would copy the file to my hard disk from the time capsule so I could run disk utilities on it more quickly. I ran the following at the terminal
sudo mv /Volumes/TCDisk/Simon\ Voigt’s\ MacBook\ Pro_001f5bf149ad.sparsebundle /Users/voigtstr/Downloads/temp
The command put the sparsebundle into the temp folder and deleted it off the timecapsule. However now when I try to attach the sparsebundle with hdiutil, I get the following error.
hdiutil attach -nomount -readwrite Simon\ Voigt’s\ MacBook\ Pro_001f5bf149ad.sparsebundle/
hdiutil: attach failed – not recognized
and strangely enough I can just browse through to the contents of the file (which now seems to be a normal folder in unix)(its not a normal folder in finder).
drwxr-xr-x@ 4 root staff 136 20 Mar 22:21 Simon Voigt’s MacBook Pro_001f5bf149ad.sparsebundle
cd Simon\ Voigt’s\ MacBook\ Pro_001f5bf149ad.sparsebundle/
ls -la
total 0
drwxr-xr-x@ 4 root staff 136 20 Mar 22:21 .
drwxr-xr-x 20 voigtstr staff 680 21 Mar 00:07 ..
drwxrwxrwx@ 7 voigtstr staff 238 20 Mar 22:07 Simon Voigt’s MacBook Pro_001f5bf149ad.sparsebundle
drwxr-xr-x 165 root staff 5610 20 Mar 22:18 bands
if I go further into that second sparsebundle (it now seems that its nested somehow?)I get…
ls -la
total 24
drwxrwxrwx@ 7 voigtstr staff 238 20 Mar 22:07 .
drwxr-xr-x@ 4 root staff 136 20 Mar 22:21 ..
-rwxrwxrwx 1 voigtstr staff 499 3 Jan 02:22 Info.bckup
-rwxrwxrwx 1 voigtstr staff 499 3 Jan 02:22 Info.plist
drwxrwxrwx 8997 voigtstr staff 305898 20 Mar 11:18 bands
-rwxrwxrwx 1 voigtstr staff 369 20 Mar 21:00 com.apple.TimeMachine.MachineID.plist
-rwxrwxrwx 1 voigtstr staff 0 3 Jan 02:22 token
my big question is how do I use the hdiutil command to turn this all into a sparsebundle again that I can cp to the timecapsule and have it be readable by timemachine? Why did the unix mv command turn the sparsebundle file into a browsable bunch of folders when it was stored in my temp directory?
on 23 Mar 2009 at 11:32 am 22.Lola said …
The command is not working for me. I’m getting “command not found” message. I dont know much about command but at this point I am desperate to get my info back.
Thanks.
on 29 Mar 2009 at 10:20 am 23.Jthon said …
voigtstr, I don’t know that much about how sparsebundles are designed but I believe they make use of some filesystem tricks to keep their size reasonable. It’s possible mv messed up the sparsebundle somehow but I’m not sure (in the future use cp).
Can you mount the sparse bundle via finder? Or maybe mount it by dropping it on diskutil?
Also does the “bands” folder have anything? I believe all your data is stored in bands, but with very odd filenames, OS X stores an index somewhere to map the data in bands into your files. Though I honestly don’t know too much about the low level details of Apple’s sparsebundle.
Lola, are you typing sudo “command”? Though just typing hdiutil works for me even without sudo. Perhaps your path is messed up. You can try typing locate to get the full path to the command. For hdiutil on my mac you could then run hdiutil with:
/usr/bin/hdiutil
on 06 May 2009 at 8:25 am 24.horto said …
dude, thanks for taking the time to write this up… that hdiutil mount trick is genius.
fsck_hfs didn’t work the first time, but after reading the comments here I tried it again (on a whim) and it went through the second time.
so if it doesn’t work on the first pass, keep trying!
on 22 Jun 2009 at 11:40 am 25.Cory said …
I have a NAS that I use (unsupported) for Time Machine backups. It’s been working great, but now I can no longer mount the TM disk image. I tried running the following command in Terminal, as you said, to try fixing what seems to be a corrupted disk image, but Terminal just keeps “thinking” without outputting anything. I let it think for several hours before aborting it.
hdiutil attach -nomount -readwrite /Volumes/MyBackup/iMac_001ff3546185.sparsebundle
Any help would be appreciated!
on 24 Jun 2009 at 3:46 am 26.Bill said …
Please add my ass to the list of those saved!
I would have lost nearly a year of files without this tip.
on 01 Aug 2009 at 5:51 am 27.Michael said …
fsck keeps telling me that it’s “non-journaled”, which I believe is wrong. The attach takes about 30 minutes, then fsck fails immediately, see below. Ideas?
$ sudo fsck_hfs -rf /dev/disk1s2
Password:
** /dev/rdisk1s2
** Checking Non-journaled HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Rebuilding Catalog B-tree.
** The volume TimeMachine cox-mc03 could not be repaired.
on 01 Aug 2009 at 6:09 am 28.Michael said …
Update: I ran it without -r and it begins to run, but keeps looping at the same error (invalid node structure):
** /dev/rdisk1s2
** Checking Non-journaled HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking multi-linked files.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
Invalid node structure
(8, 52022)
** Repairing volume.
** Rechecking volume.
** Checking Non-journaled HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking multi-linked files.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
Invalid node structure
(8, 52022)
** Repairing volume.
** Rechecking volume.
(repeat)
I’m on 4 loops now; I don’t believe it’s going to work. Still puzzled why it says “non-journaled…”
on 07 Aug 2009 at 12:52 am 29.Time Machine disk filled up, then got corrupted « Eugene L. Chua said …
[...] bundle backup directory, but that also did not work. The last resort was to use the solution found here. While TM was mounted and while I could see the backup disk, I disabled TM and ran the [...]
on 10 Aug 2009 at 1:50 pm 30.Christian said …
I just made the experience that the hdiutil attach does not work if the sparesbundle resides on a AFP share. You have to access it via Samba.
on 13 Sep 2009 at 12:55 am 31.Wellcoordinated said …
when I run:
hdiutil attach -nomount -readwrite My-Mac-Mini_0016cbaf9b2f.sparsebundle
I get an error
hdiutil: attach failed – Operation not supported on socket
Any ideas how to fix this …..
on 05 Oct 2009 at 3:44 pm 32.MacBandit said …
Holy bash shell Batman! Thank you very much you saved my backup.
on 17 Oct 2009 at 8:18 pm 33.Jeremy said …
Saved my butt too! Thanks for posting this. I had never heard of this problem until it hit my backup.
on 26 Oct 2009 at 5:59 am 34.Ned Scott said …
Thank you so much. All the other solutions I found were basically “Buy Disk Warrior”.
on 27 Oct 2009 at 4:02 pm 35.Brian Clarke said …
Worked for me! Thanks a ton!
on 19 Nov 2009 at 9:49 pm 36.Andrew said …
Nice article. Worth noting that I had to add the “-noverify” flag to the hdiutil attach command. Without it, the command attempted to run fsck itself because my disk checksum was corrupt (or at least, I think that’s what was wrong). When hdiutil tried to run fsck, it hung because it wasn’t using the ‘-rf’ flags.
on 01 Dec 2009 at 4:40 pm 37.Charles M said …
If you are wanting to try to repair the sparse image on Snow Leopard you will need to do this…
(17:30:24) charles@yoshi:/Volumes/Air Backup
$ hdiutil attach -nomount -readwrite -noautofsck -noverify yoshi.sparsebundle
/dev/disk1 Apple_partition_scheme
/dev/disk1s1 Apple_partition_map
/dev/disk1s2 Apple_HFSX
The important thing is the “-noautofsck” looks like snow leopard has separated verifying from fsck’ing…yay
on 07 Dec 2009 at 4:43 pm 38.Christian K. said …
Thank you for this great tutorial. It repaired my time machine backup too.
on 09 Dec 2009 at 9:44 pm 39.Charles M said …
It should also be noted to turn *OFF* your time machine backups while you try to fix it, even though you don’t know it’s doing it the machine will continue to try to mount the sparsebundle, in my case I’d mounted it and was running the commands to bring it online when the OS ripped the sparse out from under me and was trying to do another (useless) fsck…
on 11 Dec 2009 at 2:12 pm 40.Microtard said …
Thanks. fsck_hfs is now running. I’ve tried lots of things. I will see if this works. So far:
** Rebuilding catalog B-tree.
Invalid node structure
(4, 31814)
It has been there for about 10 minutes.
Thanks for the tip!
on 11 Dec 2009 at 2:52 pm 41.Microtard said …
My sincerest thanks. My wife’s MacBook Air is now backing up again after not working for 4 days. In the past I have thrown away 6 months worth of backups due to this problem. I would add the following last command:
$ hdiutil detach /dev/disk1
Thanks again for the post.
Microtard
on 15 Dec 2009 at 11:12 pm 42.Augur said …
Another happy camper. Note that the fsck ended with “The volume Xxxxx appears to be OK.” with no note of any actual changes made, but suddenly everything worked. This is after I tried to repair via Disk Utility, but failed after a few hours. Maybe the fix actually occurred during that time, or maybe fsck silently cured the problem… I don’t know.
Also note that I used the “fsck_hfs -fy” option for my circumstance (no evidence of link corruption).
on 16 Dec 2009 at 1:45 am 43.macbook keeps asking to restart!!!!!! - EmiratesMac said …
[...] Time Machine backup. The later may happen. You can read about it in Apple forums and many other places… Either way, safest is to get another external hard drive and copy your precious data manually. [...]
on 28 Dec 2009 at 5:32 pm 44.Brittany B said …
Ok, I’m new to all this command line business, but after much searching on the internet, I’m fairly convinced this is what I need to do to fix my time machine. I’m running Snow Leopard on a MacBook. My Time Machine was backing up wirelessly until I installed Snow Leopard; now I haven’t had another backup since mid-November. I’ve tried using the Disk Utility to fix my sparsebundle but it came back as unable to be repaired. I’ve followed your instructions (using comments #s 6 & 37 above, as needed) up through the fsck_hfs command. When it tries to run, it says “Resource busy”… any thoughts, any one? Here’s the command codes I’ve put in, along with their results:
brittany-bergquists-macbook:~ bcbergquist$ hdiutil attach -nomount -readwrite -noautofsck -noverify /Volumes/Brittany\ Bergquist\’s\ Time\ /Brittany\ Bergquist’s\ MacBook_002332be798e.sparsebundle
/dev/disk2 Apple_partition_scheme
/dev/disk2s1 Apple_partition_map
/dev/disk2s2 Apple_HFSX
brittany-bergquists-macbook:~ bcbergquist$ fsck_hfs -rf /dev/disk2s2
** /dev/rdisk2s2 (NO WRITE)
Can’t open /dev/rdisk2s2: Resource busy
on 04 Jan 2010 at 9:07 pm 45.Invalid node structure under Mac OS X 10.5 Leopard « Devlab said …
[...] Jan 4, 2010 – While doing some digging, I found this article at Jthon’s Place that describes how to fix a corrupted Time Machine backup. NICE! Tags: apple, diskwarrior, [...]
on 06 Jan 2010 at 2:12 pm 46.iBeb said …
Thanks a lot !
It didn’t work the first 3 times (too many errors I suppose).
If it doesn’t work, don’t hesitate to try more than one time.
I’ve realized on the second try that some errors detected on the first time has been repaired.
Don’t give up !
on 15 Jan 2010 at 6:59 pm 47.Phil Morton said …
I am trying to reclaim the spare archive from a Time Capsule.
The power supply burned out. Prenthetically, I cannot
recommend TC until Apple resolves the issues around heat
dissipation. I opened the case and removed the hard drive.
I connected it with a SATA to USB adapter. Now I see
three mounted drives: APswap, APconfig, and the archive
I tried the fsck_hfs -fr, and it ran successfully.
“The volume Backup of Taliesin was repaired successfully.”
But, when I try to use Time Machine to read earlier versions
of the archive, noe of them appear.
Any thoughts on what to do next?
Thanks, phil
on 15 Jan 2010 at 7:01 pm 48.Phil Morton said …
Of course I meant “sparsebundle”, not “spare archive”.
on 18 Jan 2010 at 10:37 pm 49.Cory said …
Brittany, try running top -o cpu. I’m new to the command line, so there might be a better command. But that one lists your processes by CPU usage. Find the fsck_hfs line and make note of the PID to the left. Then hit q and type “kill 123″ where 123 is the PID.
You might also be able to do “killall fsck_hfs” without using the top command, but once again, I’m not exactly savvy with the Unix shell.
I did this, and lo and behold, the process was hanging up my drive, even after I unplugged it and plugged it back in. I’m running fsck_hfs command as I type this.
on 24 Jan 2010 at 4:02 am 50.Alex said …
OMG THANK YOU!!
The family’s MacMini’s hard drive died and i was unable to mount the time machine drive. This fixed the problem.
on 28 Jan 2010 at 2:25 pm 51.Harald said …
Sorry, don’t know much about unix. Always get a
hdiutil: attach failed – Nicht erkannt (translates to not recognized)
when entering the command:
“hdiutil attach -nomount -readwrite ” and the location of the sparsebundle which I added with drag and drop from the finder to the terminal window.
The complete command then looks like this:
hdiutil attach -nomount -readwrite /Volumes/FreeAgent\ Drive/Katrin\ Meiers\ MacBook_002332d73aaa.sparsebundle/
I’m not sure if there is something wrong with the path. The sparsebundle is located on a HD/volume called “FreeAgent Drive” and the sparsebundle has the file name “Katrin Meiers MacBook_002332d73aaa.sparsebundle”.
Any help appreciated.
on 06 Feb 2010 at 4:14 pm 52.noob_for_life said …
This is great. And thank you SO MUCH for posting it. I wish it would fix my problem, though.
Anybody know what to do with a bad catalog b-tree?
Executing fsck_hfs (version diskdev_cmds-491~1).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
** Checking extents overflow file.
** Checking catalog file.
** Rebuilding catalog B-tree.
Invalid node structure
(14, 50220)
Invalid record count
(14, 50220)
** The volume Time Machine Backups could not be repaired.
Thanks!
on 04 Mar 2010 at 8:10 am 53.Michael Cheung said …
Hi, I’m glad that I came across this site, but I have a problem with my Time Capsule. How do I run the “hdiutil” when its not attached via USB to the iMac? I am using ethernet cable, but Disk Utility won’t repair it, nor would the Terminal console report any significant progress by copy/pasting your instructions. This is what i get:
(BTW, disregard the “(MacMini)” part… seems ot be a legacy from when I upgraded and copied everything from the macmini to the new imac.)
Would appreciate any and all help!!! Thanks
—-
Last login: Thu Mar 4 23:01:51 on ttys000
michael-cheungs-imac-2:~ Michael (MacMini)$ hdiutil attach -nomount -readwrite iMac_002500d151f0.sparsebundle
2010-03-04 23:09:28.649 hdiutil[975:903] Error loading /Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin: dlopen(/Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin, 262): no suitable image found. Did find:
/Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin: mach-o, but wrong architecture
2010-03-04 23:09:28.651 hdiutil[975:903] Cannot find function pointer MacDiskImagePluginFactory for factory 7F1FD83E-6684-11D8-968F-000A957703C0 in CFBundle/CFPlugIn 0x1004169a0 (bundle, not loaded)
2010-03-04 23:09:28.782 diskimages-helper[977:2103] Error loading /Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin: dlopen(/Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin, 262): no suitable image found. Did find:
/Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin: mach-o, but wrong architecture
2010-03-04 23:09:28.784 diskimages-helper[977:2103] Cannot find function pointer MacDiskImagePluginFactory for factory 7F1FD83E-6684-11D8-968F-000A957703C0 in CFBundle/CFPlugIn 0x100125c30 (bundle, not loaded)
hdiutil: attach failed – No such file or directory
michael-cheungs-imac-2:~ Michael (MacMini)$
on 16 Mar 2010 at 7:34 am 54.JWW said …
Thanks for this fix, TM is now working again!
on 26 Mar 2010 at 5:03 pm 55.goldnet said …
I had thought I was finally onto a winner with these tips. My 999gb TM/TC backup sparsebundle had become unmountable but I’d managed to repair it with diskutility. A few days later, it went corrupt again (don’t recall doing anything to the drive or files) but diskutility had been unable to do anything this time.
Got the backup drive attached with hdiutil but, regrettably, after a couple of hours, fsck_hfs reported itself unable to repair drive after 3 attempts – incorrect links seeming to be the problem. I ran it again a couple of times without any change.
Looks like the format is imminent and 6 months’ backups down the pan. TM is great but if I can’t rely on it, it’s less than useful! Maybe I should just switch and run a SuperDuper backup to the disc…
on 01 Apr 2010 at 2:58 pm 56.Joshua Marker said …
FWIW, I found that even with -noautofsck, snow leopard would auto-fsck, meaning I would get ‘resource busy’ or whatever. I have no idea why it is ignoring my no-auto-fsck request. Whatever.
To allow the process to go, I ‘ps auxwww | grep fsck’ to find the PID, then ‘sudo kill (PID)’ to kill this fsck so I can run my own.
on 01 Apr 2010 at 4:31 pm 57.Joshua Marker said …
Works. Nice explanation. Thanks much. BTW, if you did this while you went to breakfast, you eat very, very slowly. Or, I guess, my Macbook Air is very slow. . . .
on 02 May 2010 at 5:55 pm 58.Mark said …
Another ass saved! My TM backups are generally killed by putting the system to sleep while backing up. So easy for Apple to fix, but I will instead use Time Machine Editor so it’s not churning through backups every hour.
on 04 May 2010 at 12:17 pm 59.Frank Erickson said …
Thanks for the genius level support effort – but it isn’t working easily for me on a MacBook Pro which had been doing successful TimeMachine backups months after Snow Leopard 10.6.3 until last week..
** /dev/rdisk1s2
Executing fsck_hfs (version diskdev_cmds-491.0.2~6).
** Checking non-journaled HFS Plus Volume.
** Detected a case-sensitive volume.
Invalid node structure
(8, 0)
same response x 4 tries.
any ideas?
thanks in advance
on 05 Jun 2010 at 4:48 pm 60.Kevin said …
Worked well, but took 6 hours!
(Glad to find hdiutil detach in the comments.)
on 14 Jun 2010 at 12:14 pm 61.Emily said …
Went through all of the directions. Ran fsck_hfs, .sparsebundle was repaired “sucessfully” and ejected the disk. However, am still getting the “disk image unable to mount” error. Got any ideas or is my backup system beyond repair?
on 27 Jun 2010 at 4:28 pm 62.David said …
Hi All I Tried:
hdiutil attach -nomount -readwrite -noautofsck -noverify
Get response:
hdiutil: attach failed – not recognized
So I Tried “control” click and Show Package Contents, then I Can see a folder “Bands” which takes forever to open and shows nothing useful when it does
Any other ideas or help would be greatly appreciated
Thanks
Desperate Dave
on 18 Aug 2010 at 6:10 pm 63.dane said …
when I run:
hdiutil attach -nomount -readwrite My-Mac-Mini_0016cbaf9b2f.sparsebundle
I get an error
hdiutil: attach failed – Operation not supported on socket
Any ideas how to fix this …..
————–
Same problem here.
on 29 Aug 2010 at 7:14 pm 64.dinar said …
HELP!!!!
i’ve run this on terminal :
MacDee-Pro:~ dinarpermadi$ hdiutil attach -nomount -readwrite MacDee Pro.sparsebundle
And appears like this :
hdiutil: attach: extra image argument “Pro.sparsebundle” – “MacDee” already specified
Usage: hdiutil attach [options]
hdiutil attach -help
any help???
on 19 Sep 2010 at 1:53 am 65.Chris said …
Hi a bit of information for all those who are experiencing the “Resource Busy” message after executing fsck_hfs – if you open the Activity Monitor utility application you will see that there is an existing fsck_hfs process running.
I don’t recommend killing the process just to get yours running, but I do recommend waiting until it completes. Then you will find you can execute your rebuild as mentioned here.
I impatiently killed the process which allowed me to run mine – but then realised what I’d probably done! It could have been rebuilding some important catalogue on the mac itself – and I just killed it! I’ve yet to find out of course…… wish me luck.
on 21 Sep 2010 at 6:07 am 66.Rob said …
Ok so where in hell is MY .sparsebundle????
How do you create/find the sparsebundle file???
on 21 Sep 2010 at 8:17 pm 67.Tom said …
Hi Dinar- your problem is the space in the name of your sparsebundle; put the entire disk image name in quotes:
)
MacDee-Pro:~ dinarpermadi$ hdiutil attach -nomount -readwrite “MacDee Pro.sparsebundle”
and it may work for you. And never, ever put a space in a filename again
on 21 Sep 2010 at 11:45 pm 68.Tom said …
@Rob-
It’ll be on the TimeCapsule volume TM’s been backing up to- so you’ll need to mount your TimeCapsule drive in the Finder (it should show up in “Shared” in the sidebar), and you should find your .sparsebundle at the top level of the drive- alongside that for any other machines backing up to that TC.
HTH
T
on 21 Sep 2010 at 11:48 pm 69.Tom said …
@Rob-
sorry, I was assuming you’re using a Time Capsule… If not, the .sparsebundle will be at the top level of whatever NAS/ SMB share/ other volume that Time Machine had been backing up to…
T
on 22 Oct 2010 at 7:55 am 70.Karl said …
Excellent post, and the first actual fix for busted Time Machine sparsebundles that I’ve come across. Saved my backup, at least for now, anyway. As an aside, I’ve mirrored with SuperDuper onto an external drive for years, but Time Machine certainly has its place, and has helped me a bunch with some old information that otherwise would’ve been long gone or at best hard to retrieve. Years ago Retrospect was a great solution, but the ease of Time Machine both in backup and retrieval makes it a winner for me. Point: Time Machine good. Broken/unusable sparsebundles bad. This post, fixing same, for free, VERY good.
on 28 Oct 2010 at 9:28 pm 71.Brian said …
Great bit of information.
I’d just like to let people know that if you are using Time Machine with an external drive (not a Time Capsule) you can fix your corrupt backup volume by simply running “fsck_hfs /dev/disk1s2″ (replace with your device ID). Disk Utility gives you an easy way to determine your device ID. Just right click the partition, click “Information,” and you’ll see the device ID.
on 04 Jan 2011 at 2:11 pm 72.Rene said …
I’ve run into the same problem as several of you.
I have an iMac (1 TB HD), which have been backed up througt Time Machine to a TimeCapsule (2 TB). The file TM have produced is called iMac.sparsebundle
Theres several issues that i find really really annoying considering the normal ease of use that Apple got on both soft- and hardware.
First the TC is impossible to get data/files to and from, its unstable and slow,
so i had to mount a 2 TB harddrive to the TC and copy the sparsebundlefile to the external HD. The sparsebundle file is 1,12 TB in size, but the iMac HD was about 750 GB full, out of a 1 TB HD.
Yesterday.. i don’t know what happened, but bottumline is, all 750 GB data is gone, bummer… and no matter how i try to acces the data in the “iMac.sparsebundle” file, its a no go.
I tried Disc Repair, i tried DiskWarrior, Back-In-Time 2. Booting from the Snow Leopard DVD and using the Utility program that should restore your HD, doesnt recognize the TM/sparsebundle file and thus can’t be used.
So basicly im F….., i’ve tried working the terminal with you commands, but im a complete newbie to using any of the Terminal tools in OSX.
Can anyone give me a step-by-step, to the repair/fix, that this thread is about.
on 20 Jan 2011 at 1:50 pm 73.brian said …
Thanks for saving my sparsebundle! My account still can’t login, but I created a new one and copied everything over. Thanks so much for blogging a fix!!! Awesome
on 25 Jan 2011 at 12:04 pm 74.Thankful Reader said …
Okay so I have had an issue with at least 2 backups. Both have gone corrupt. The first one had 3 months worth of data that was VERY IMPORTANT to me (if you know what I mean). The other I could give 2 sh!ts about. Your solution helped the most out of all the solutions I saw online. At least I can access my files and get what I need. The only bad thing is that it can’t be added back and used in TM anymore. I have to access the files from the finder window -folder by folder, file by file. When I tried to use it in TM, I got an error message that basically told me that my backup cannot be used. Other times it doesn’t see it at all. Anyways, best of luck to everyone else here. I’ll post a few other tips I found later but for now I have to get back to work!
on 12 Mar 2011 at 8:42 am 75.Billy Ng said …
i have a seagate external hdd ..using as a time machine backup..beside of that ,i also make another folder to keep my stuff such as photo / music & etc …
Problem: 1. the hdd is not shown on my macbookpro
i have try the disk utility and go for first aid..its seem showing me “invalid sibling link”
on 12 Mar 2011 at 8:45 am 76.Billy Ng said …
i have a seagate external hdd ..using as a time machine backup..beside of that ,i also make another folder to keep my stuff such as photo / music & etc …
Problem: 1. the hdd is not shown on my macbookpro
i have try the disk utility and go for first aid..its seem showing me “invalid sibling link”
i have tried fsck_hfs /dev/disk1s2 …but it shown
Billy-Ngs-MacBook-Pro:~ billyng$ fsck_hfs /dev/disk1s2
** /dev/rdisk1s2
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive catalog.
** Checking Extents Overflow file.
** Checking Catalog file.
Invalid sibling link
(4, 16500)
** Rebuilding Catalog B-tree.
** The volume Time Machine Backups could not be repaired.
Billy-Ngs-MacBook-Pro:~ billyng$
please help!!!!
on 12 Mar 2011 at 8:49 am 77.Billy Ng said …
i have also tried
Billy-Ngs-MacBook-Pro:~ billyng$ fsck_hfs -f /dev/disk1s2
** /dev/rdisk1s2
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive catalog.
** Checking Extents Overflow file.
** Checking Catalog file.
Invalid sibling link
(4, 16500)
** Rebuilding Catalog B-tree.
** The volume Time Machine Backups could not be repaired.
Billy-Ngs-MacBook-Pro:~ billyng$
i seem like not working either…
HELP
on 21 Mar 2011 at 8:24 am 78.Tony said …
I have followed all of the steps given. But my terminal seems to be stuck on “** Rebuilding catalog B-tree”. I do not know if this step takes a long time or something is wrong.
on 14 Apr 2011 at 7:18 am 79.straack said …
Thanks to this article and the comment’s
i could repair my .sparsebundle.
DiskWarrior 4.2 can only repair a TimeMachine Volume if stored on USB or Firewire drive and used localy
Not if stored on a OS X 10.5 Server Network TimeMachine Volume (.sparsebundle)
here some additional comments:
- I used OS X 10.6.5
- mount the disk locally on your mac (USB, Firewire no Network)
- change name of .sparsebundle to the original Name without the timestamp
(TimeMacine ad’s wile making backup the timestamp
“Macxx_2011-04-11-103023.sparsebundle” > “Macxx.sparsebundle”)
- move it to the highest possible level on the hard drive
- switch to the Mac User Interface to english (System Preferences > Languages & Text)
(to get the benefit of googling with the english error messages)
- restart mac (to make shure Disk Utility has killed properly)
- don’t start Disk Utility
- start the Terminal
- check the rights on the .sparsebundle
(do you (admin) have read write rights? if not change it with:)
computername:~ user$ chmod -v -v 755 /Volumes/Backup/Macxx.sparsebundle
- mount Macxx.sparsebundle
computername:~ user$ hdiutil attach -nomount -readwrite -noautofsck -noverify /Volumes/Backup/Macxx.sparsebundle
- repair the Macxx.sparsebundle
computername:~ user$ fsck_hfs -rf /dev/disk2s2
maybe you have to use “computername:~ user$ sudo fsck_hfs -rf /dev/disk2s2″
- if the “fsck_hfs” fails to repair try several times.
(Example: “The volume Time Machine-Backups could not be repaired after 2 attempts.”
after the third time: “The volume Time Machine-Backups was repaired successfully.”)
on 19 Apr 2011 at 9:16 am 80.Mike said …
So thanks for all the information, both on this page and in the comments.
I was unable to move forward with just this information, I kept getting “Operation Not Permitted” when I attempted to attach using “-readwrite”. When I ran it without readwrite, or with “-readonly” it would work fine- but obviously the fsck would be limited by the dreaded “(NO WRITE)”. But it worked. I could also manually mount the file system (even though hdiutil and Disk Utility refused, citing “No Filesystems”).
However I think I found one of the problems. I have it running right now- even though I specified “noautofsck” it’s running anyway- which is fine with me, it’s progress and I’m letting it run.
So here is the key- I had to change directories into the sparsebundle directory, and inside was the “token”. This token had “uchg” flag set! Take a look like so:
ls -lO /path/to/name.sparsebundle/token
If you see the “uchg” flag, this could be your problem if you are getting “Operation Not Permitted” when running “hdiutil”.
To correct it, I ran: “chflags nouchg token” while inside the sparsebundle directory.
I was then getting “Resource Not Available”. A new confusing error message, but progress! I had to reboot, and now fsck is running!
Thanks again everyone!
on 23 Apr 2011 at 10:39 am 81.Rose Fox said …
Thank you SO MUCH for this. My fsck process has been running for ten hours; apparently there’s a lot that needed repairing! Very glad to be able to repair it rather than having to ditch all my backups.
on 08 May 2011 at 11:25 pm 82.Jacob M said …
I was trying to run this and i get the error:
**Checking Journaled HFS Plus volume.
Invalid number of allocation blocks
(4294967295, 0)
**The volume could not be verified completely.
Ive run it multiple times… any ideas?
on 15 May 2011 at 4:34 pm 83.rayced said …
In addition to all the precious informations I’ve found on both the article and the comments I would like to add my two cents.
If after fixing the backup your system stills ask for a new backup to be created (even though you repaired it and both DiskUtility and fsck_hfs will prompt that the disk image is fine after a verify) you have to change a couple of things inside the com.apple.TimeMachine.MachineID-plist that resides in the sparseboundle.
Just cd to it via terminal as described in other comments and unset the uchg flag on file “token” as mentioned eariler in the comments.
Then copy somewhere the file com.apple.TimeMachine.MachineID.plist in order to have a backup of that file (just in case), then edit it and if it is present the property “RecoveryBackupDeclinedDate” erase it, then modify the property “VerificationState” to value “1″ if it was set to value “2″.
After that save it and then ALT click on the menubar icon of Time Machine and choose “Verify Backup” from the top-down menu. The Backup sparseboundle disk image should now be paired again with your computer and the verify process should start. If hopefully this verify went fine you can keep using your backup disk image as before.
on 16 May 2011 at 8:00 am 84.Michael said …
Add my name to the list of those whose ass was saved by this. There is another similar article here http://www.garth.org/archives/2010,07,16,124,fixing-time-machine-sparsebundle-network-backup-errors.html that is also informative. The advice to run the process more than once, however, is what did it for me. After the second time I was able to salvage the data I needed. Thanks so much!
on 19 May 2011 at 8:44 pm 85.Rose Fox said …
By the way, if you’re getting a “resource not available” or “resource temporarily unavailable” error with hdiutil, try restarting the external drive. Don’t know why it works, but it does.
on 24 May 2011 at 5:21 pm 86.SPell said …
Great advice! Worked like a champ when coupled with Rayced’s advice above (comment 83.) and Mike’s (comment 80.)
Once you believe that you have fixed your backup, it’s not a bad idea to verify the backup. Option click the Time Machine icon on the menu bar and select “Verify Backups”.
Thanks for posting this.
on 08 Jun 2011 at 1:29 pm 87.rayced said …
@Spell: I’m glad my comment was helpful. Can you believe that after les than a month my backup failed again? And again it’s just the filesystem dirty!! I guess it’s time to get a better HD in my Time Capsule, not the one Apple ships and claims to be a server grade HD, while instead it’s just a desktop one.
A caviar green could be a good choice: it’s not a server grade HD too, but it should be much better than the Hitachi “DeathStar” (that’s its nickname in honor of its well known reliability) that Apple used for the model I own.
on 16 Jun 2011 at 3:28 am 88.rayced said …
I’ve successfully changed the internal hard disk of my Time Capsule to a brand new 2TB Caviar Green Western Digital WD20EARS one.
This tutorial was very helpful and the operation took about half an hour and was painless.
Now I can barely hear the new drive spinning (amazing!) as well as resulting in a much cooler operative temperature of the device itself (awesome!).
I’ve put the old drive inside an USB external case and I would like to move the old Time Machine backups back in the new Time Capsule’s internal hard drive.
It seems that this copy operation has to go trough AppleShare, even though the hard disk is connected directly to the USB port of the Time Capsule.
It’s painful.
It will take about 100 hours or more for a total of 800MB data (I have two Macs backing up via Time Machine to the same Time Capsule plus some old backups of my old Leopard install not used anymore).
Does anybody knows a better way to let this copy be faster (ie not having it going trough Apple Share)?
on 08 Jul 2011 at 10:27 am 89.Nik said …
Got this?
hdiutil: attach failed – Operation not permitted
Do this:
chflags -R nouchg Computername.sparsebundle
Credit goes to:
http://www.garth.org/archives/2010,07,16,124,fixing-time-machine-sparsebundle-network-backup-errors.html
on 30 Jul 2011 at 6:00 am 90.Dave said …
Thanks SOOOO MUCH FOR THE GREAT FIX !!!
It did take a little time, but it worked out very well .. I could see the sparsebundle, but I couldn’t get it to mount .. this did the trick !!
HOpe I don’t have to use it again, but glad I know what to do now !!!
LIFESAVER !!
on 15 Aug 2011 at 8:13 pm 91.Gilson Cavalcanti said …
it saved my backup!! thanks!
on 02 Oct 2011 at 3:44 pm 92.Pax said …
Hi guys! Nice to see this kind of blog + an active community around it. Hope God will be reading this…
My GF unplugged my TC while doing a backup… and I my sparsebundle seems fked up…
When I go
fsck_hfs -rf /dev/disk1s2
it says
** /dev/rdisk1s2
Executing fsck_hfs (version diskdev_cmds-491.6~3).
** Checking Journaled HFS Plus volume.
Invalid B-tree node size
(3, 0)
** The volume could not be verified completely.
This
Invalid B-tree node size
(3, 0)
is a hell of a bad boy! Could somebody help me kill him? (and save an innocent sparsebundle)
Love to my saver.
on 04 Oct 2011 at 12:49 pm 93.informatique grenoble said …
one more (ass) saved !
thanks
Sebastien
on 07 Oct 2011 at 6:30 pm 94.David said …
Another ass saved! Thank you Jthon!!!!!
I stupidly let Apple Store take out my hard drive. When I got home and found the Time Capsule corrupted I called the store but they had already erased the disk and sent it to be recycled. (what a horrible policy to not give customers the bad drive just in case!)
I spent 5 days on phone with Apple people to no avail… 27 years of Mac files were gone. 4 more days of stress and depression.. Then found your site. Ran the fix 3x unsuccessfully. Went to bed and ran it one more time. Awoke to magic!
r.i.p. SJ
on 19 Oct 2011 at 9:19 pm 95.Aaron said …
I can’t thank you enough for this post. After this incident, I am definitely going to rethink my backup configuration and add multiple layers. Thank you!
on 27 Oct 2011 at 1:30 pm 96.Marc said …
Hi,
if you have the problem with an IOMEGA cloud storage disk, the following might help you.
1. Activate the root account in OSX and set the password to “sohoXXXX” where XXXX is the password you set for the administer account in the web interface of the IOMEGA cloud network storage.
2. In the shell su with root. Make sure the TimeMachine disk is unmounted. Enter the directory of the sparse bundle, in my case /Volumes/TimeMachine.
3. cd into the sparse bundle and use the following command: “chflags nouchg token”
4. Now kill fsck if it is running: “ps auxwww |grep fsck”. If there is a progress use the PID and do: “kill PID”.
5. Use hdiutil as mentioned above: “hdiutil attach -nomount -readwrite TimeMachine/BLABLABLA.sparsebundle”
6. Finally use: “fsck_hfs -rf /dev/disk1s2 ” – the disk name might be different.
7. DONE and good luck!
By the way if you want to get ssh access to the NAS you can activate this feature via the web interface in the diagnostics page: https://mydiskname/diagnostics.html
on 29 Oct 2011 at 12:35 pm 97.smi said …
Help
I get this erorr when i try your repair
** /dev/rdisk3s2
Executing fsck_hfs (version diskdev_cmds-540.1~25).
** Checking Journaled HFS Plus volume.
Catalog file entry not found for extent
(4, 0)
** The volume could not be verified completely.
is all hope lost or can some one help me ?
on 28 Nov 2011 at 4:34 am 98.Tim said …
Thanks so much for this! This fix has saved all my data. Though I think next time I would do it over a wired connection and not the wireless – i ttook around 30 hours!
Thanks again!
on 03 Dec 2011 at 2:17 am 99.Jirka said …
Thank you very much!
One year of my data saved.
Jirka
on 27 Dec 2011 at 6:53 am 100.Rahul said …
Have tried to run fsck multiple times on my time capsule… but am getting the same errors each time and finally it all aborts… see the msgs below… PLEASE HELP!!!
** /dev/rdisk1s2
Executing fsck_hfs (version diskdev_cmds-540.1~34).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is Time Machine Backups
** Checking extents overflow file.
** Checking catalog file.
** Rebuilding catalog B-tree.
Invalid node structure
(4, 17)
Invalid record count
(4, 42)
Invalid key length
(4, 640)
Invalid record count
(4, 17024)
Invalid node structure
(4, 56329)
** The volume Time Machine Backups could not be repaired.
on 04 Jan 2012 at 10:12 am 101.jean-louis said …
hi,
first of all best wishes for 2012,
the 1st of jan i decided to re-install my mac, after reinstall impossible to access the backup … 870gb of data lost,
thanks to you I recovered everything after 40hours ..!
merci – merci – merci !!!!!!!
on 05 Jan 2012 at 3:22 pm 102.Ian said …
Hi,
When I issue the “hdiutil attach -nomount -readwrite” command I get his error,
hdiutil: attach failed – Read-only file system
I have even tried the command as root and get the same error.
My TM sparse bundle is on a Synology DiskStation and I have R/W access to that location so I’m baffled why I get the error.
Any thoughts appreciated.
on 15 Jan 2012 at 5:39 pm 103.Olivier said …
Thanks for saving my Time Machine back-up! (another ass saved!)
Thank you Jthon!