Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym <nicknaym@[remove_this].gmail.com>
- Date: Wed, 16 Dec 2009 21:50:57 -0500
In article 1javfc3.1gfr7tbpn6s2vN%dempson@xxxxxxxxxxxxx, David Empson at
dempson@xxxxxxxxxxxxx wrote on 12/16/09 9:11 PM:
Nick Naym <nicknaym@[remove_this].gmail.com> wrote:
In article 1jav7cy.157y7341rwsfyhN%dempson@xxxxxxxxxxxxx, David Empson at
dempson@xxxxxxxxxxxxx wrote on 12/16/09 6:08 PM:
Nick Naym <nicknaym@[remove_this].gmail.com> wrote:...
...
...
Judging from the error messages you got the pathname right, so that
isn't the problem.
The "Directory not empty" errors will be side effects - if some items
inside a directory could not be deleted (due to "Operation not
permitted" errors) then the directory itself also cannot be deleted.
I can't think of a reasonable explanation for the root user not being
permitted to delete a simple file (such as "C4280 Specs.pdf").
Try using Disk Utility to do a Repair Disk on your Time Machine volume.
Does it report any problems?
TM was working OK -- except for the recent spat of "error 11" messages.
But I did run TechTool Pro (from a small external drive I use to run it
and DiskWarrior), and although it reported no problems, I did tell it
to rebuild the directory (it's always slightly off from normal use --
rarely a big deal).
I wouldn't risk using TechTool Pro to rebuild the directory on a Time
Machine volume, unless they advertise it specifically as supporting that
(I haven't checked). Time Machine uses a very unusual file system
feature (hard links to folders), and only some third party tools can
cope with it.
SuperDuper can copy a Time Machine backup, and DiskWarrior claims to be
able to rebuild it (but I haven't tried).
Strangely, after that, the next time TM ran, it seemed to be worse
than before: It decided it needed to do a deep traversal again.
I thought that was to do with the source drive's fsevent database being
marked as out of sync, which can happen after a system crash, using your
main drive in target mode from an older system, or some repair tools.
Huh? What was due to out of syncs, target moding from older systems, or some
repair tools?
Time Machine depends on a database maintained on the main drive which
keeps track of recent changes to the file system (down to the
granularity of individual folders). I don't recall its exact name, but
it is part of the "fsevent" mechanism (File System Events).
If you rebuild the directory on your main drive with something like
DiskWarrior or TechTool Pro, the fsevent database will be out of sync
with the reconstructed directory, so Time Machine has to do a "deep
traversal" for its next backup, by comparing every file in every folder
on the main drive to the last backup to work out what changed.
After it has done that, the fsevent database can be used as a point of
reference again to track subsequent changes.
Christ, that makes so much sense.
A rebuild of the directory on the backup drive might have the same
effect.
Yup...it certainly seems like it should be a two-way street.
Sorry for the confusion I introduced -- you must have missed my last post,
where I indicated that I garbled things up: I didn't rebuild the Seagate...I
rebuilt my internal drive.
Yes, saw that after I posted. Should be no problem using TTP to rebuild
your main drive (apart from the side effect of TM needing to do a deep
traversal for the next backup).
(However, IIRC, I believe that Micromat claims that TTP can be used on TM
volumes.)
OK.
The problem is something is preventing certain files inside that folder
from being deleted, even by root. If Disk Utility thinks it is OK then I
am out of ideas for now.
On further reflection, I'm of the opinion that trying to do this at all
is a bad idea. The presence of hard linked folders on a Time Machine
backup means that "rm -rf" could be deleting the only copy of some files
in your backup, since it will be following the hard linked folders into
files that were backed up in earlier passes.
Now I'm even more confused...
TM routinely trashes old backups and .inProgress files by moving them to the
501 folder and (I assume soon thereafter) emptying that folder.
No, it doesn't. The trash is not involved in deleting old backups - they
are deleted directly by backupd (the main component of Time Machine).
Consider that backups are NOT being run on behalf of the current user -
they are a system-level activity, so it would not be appropriate to use
the current user's trash to clean up. It would also not be appropriate
for the system to empty your trash automatically, as you might be using
the Time Machine drive for other purposes and may be keeping files in
Trash prior to deciding if you actually want to delete them.
The process of deleting old backups is not simple: multi-linked FILES
(which exist in more than one backup) can be deleted without
consequences (deleting a hard linked file will only remove one reference
to that file), but multi-linked FOLDERS must be identified, and only the
link to the folder can be deleted, not the files inside that folder
(since they also exist in other backups).
The .inProgress folder is a separate issue: it is a package (looks like
a single file but is actually a folder) in which TM builds the next
backup, and it moves everything out of that folder (or renames it) as
part of the final stage of the backup. If the .inProgress folder is left
behind after that step, it is a simple empty folder which can be deleted
(which TM would do as the very last step).
The files and folders inside the .inProgress folder are hard-linked into
the rest of the TM backup, so you can't simply delete it.
It wouldn't surprise me if the 'rm' tool is unable to cope with a
hard-linked folder and shows a confusing error message when you try to
delete it. Given the evidence, it will have already tried to go into
that folder and delete everything inside it, in which case other backups
will be missing some files and folders, and they may not be backed up
subsequently because they were deleted behind TM's back.
Were that not the case, there'd be no reason for TM to routinely prune the
archive of backups it creates, and the TM drives themselves would run out
of space much more quickly than they do. So, why would forcing the
deletion of files in the 501 folder be a problem?
Because normal tools (including 'rm') cannot correctly delete TM
backups.
It sure would be nice if Apple provided a kb article about this.
Well, you've made a lot of sense and planted a lot of doubt regarding the
validity of my TM backups -- even though the ones I've looked at seem fine.
The approach I used I found via Mac OS X Hints, which they found elsewhere
and adapted/extended it to servers (IIRC) as well. Unless they have some
proprietary insight into/information about TM, it seems that they may very
well have led a whole bunch of folks astray.
--
iMac (24", 2.8 GHz Intel Core 2 Duo, 2GB RAM, 320 GB HDD) ? OS X (10.5.8)
.
- References:
- How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: Király
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: isw
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: John Varela
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: Király
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: David Empson
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: David Empson
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: David Empson
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: David Empson
- Re: How to Empty Trash on Time Machine Volume
- From: Nick Naym
- Re: How to Empty Trash on Time Machine Volume
- From: David Empson
- How to Empty Trash on Time Machine Volume
- Prev by Date: Re: G4 worth having?
- Next by Date: Re: G4 worth having?
- Previous by thread: Re: How to Empty Trash on Time Machine Volume
- Next by thread: Re: How to Empty Trash on Time Machine Volume
- Index(es):
Relevant Pages
|