By now, everyone knows how to delete a file or folder from time-machine using the Gear menu in Time Machine's Finder view. But I was puzzled by the problem of deleting entries for an entire external disk I no longer had. Because that disk was no longer available, I could not simply attach the disk and then use Time Machine to delete the backups for it. You also can't do this with the Finder (it won't let you edit the Time Machine folder). And you probably would prefer not to do it by hand in Terminal, since there might be Time Machine database entries this would gum up.
The solution is to navigate in the Time Machine interface not to the disk itself, but to the backup entry for that disk on the Time Machine disk itself. Specifically, in Time Machine's Finder view, select the Time Machine disk, then enter the Backups.backupdb folder, and drill down to find the last entry for the obsolete disk. Then tell Time Machine to delete all backups of that entry. The original disk need not be connected!
If you think about this, it's an unexpected behavior since it's outside the standard paradigm of pointing to the "real file" you want to remove the backups of.
This is handy because Time Machine promiscuously tries to back up even temporarily-connected drives which might not be your own, leaving you with orphan backup entries you don't want. This has only been tested on 10.5, but probably works the same way in 10.6.
A while back, Time Machine on my DP G4 running 10.5.8 started failing, after having run for several months without any problems. This is the error from the logs:
Starting standard backup
Backing up to: /Volumes/Athena/Backups.backupdb
Event store UUIDs don't match for volume: Entwife
Event store UUIDs don't match for volume: Fangorn
Backup content size: 60.9 GB excluded items size: 56.9 MB for volume Entwife
Backup content size: 60.5 GB excluded items size: 56.9 MB for volume Fangorn
No pre-backup thinning needed: 145.59 GB requested (including padding), 931.15 GB available
Error: (-36) SrcErr:NO Copying /Applications/Adium.app/Contents/Frameworks/AIUtilities.framework/Versions/A/AIUtilities to /Volumes/Athena/Backups.backupdb/Treebeard/2009-10-03-235253.inProgress/9C37B727-1C30-42C6-B3AA-D0AB9FF4DBF6/Entwife/Applications/Adium.app/Contents/Frameworks/AIUtilities.framework/Versions/A
Stopping backup.
Error: (-8062) SrcErr:NO Copying /Applications/Adium.app/Contents/Frameworks/AIUtilities.framework/Versions/A/AIUtilities to /Volumes/Athena/Backups.backupdb/Treebeard/2009-10-03-235253.inProgress/9C37B727-1C30-42C6-B3AA-D0AB9FF4DBF6/Entwife/Applications/Adium.app/Contents/Frameworks/AIUtilities.framework/Versions/A
Copied 0 files (3.4 MB) from volume Entwife.
Copy stage failed with error:11
Backup failed with error: 11
So I tried all the usual fixes:
I reformatted and rebuilt all my drives.
I ran Disk Utility to repair the drives and permissions. More than once.
I reapplied the 10.5.8 Combo Update.
I was backing up to a WD 1TB My Book Studio. I tried backing up the internal drive instead, but that failed too.
If I excluded an application from backup, it failed on the next app in the line.
I found nothing online (Google, Apple, et.al.) that said do X, Y, and Z, and all will be well, even though this error is all over the web. Not even this KB article helped.
I arrested all the usual suspects.
In short, nothing worked. But, "He that perseveres to the end, the same shall be saved." I still don't know the cause (old age prehaps) but I found a solution. I booted from my 10.5 DVD, archived and installed OS X, and then updated my software from there to 10.5.8. Problem solved.
[robg adds: This seems like a very particular issue, but just in case it's happening to anyone else, here's one solution at least.]
I just wasted a couple of days trying to make Apple's Disk Utility RAID tool create a mirror of my Mac Mini's internal drive on an external FireWire drive. I finally gave up as the external partition was getting constantly corrupted (and the advertised "automatic rebuilding" didn't work).
I successfully used a mirrored RAID on an older G4 Tiger system with two internal drives, but according to the folks at SoftRAID, Apple's software RAID is basically intended for XServes and isn't even tested on external drives.
None of Disk Utility's help files give you any warning about this. In fact, in Snow Leopard, they don't accurately reflect the operation of the program: I saw a Demote button on the RAID setup panel that wasn't even mentioned in Help, and some of the RAID procedures described in Help simply didn't work.
I gave up on the RAID idea and instead have scheduled SuperDuper! to periodically make a Smart Update image copy of my boot drive to the external drive. Not quite as secure, but a lot less hassle! If you don't have an XServe and you really, really want a RAID, it appears that SoftRAID may be the best solution. It isn't cheap, though ($129 download).
[robg adds: If you've used Apple's RAID tool successfully on a recent Mac OS release, feel free to share your experiences. I've never tested it, so I can't confirm the above experiences.]
Unfortunately, my two favorite application launchers -- Butler and Quicksilver -- aren't quite up to snuff with Snow Leopard just yet. Spotlight works OK most of the time, but I've started to rely on the Dock's stacks for launching what I need. However, I'm very keyboard-centric, and I don't like going to my mouse any more than I have to, so I wrote an AppleScript that will open the Stack for me, and using 10.6's new Services features, I can trigger that AppleScript with a keyboard shortcut. Here is the script:
tell application "System Events"
key code 99 using control down -- ctl-F3 to focus on Dock
keystroke "Applications" -- should take focus to Applications folder
key code 36 -- hit Return to open stack
end tell
Once the Stack opens, you can type in the first few letters of an application and hit return to launch it. The script itself is fully compatible with 10.5 as well, but assigning it to a keyboard shortcut natively is not. The following bit is 10.6 only.
I just discovered that you can quickly jump between an application's windows in multiple Spaces by repeatedly pressing its Dock icon. The first click will activate the application, and then each subsequent click will jump to a different Space that contains a window from that application. This works if you don't have the "When switching to an application, switch to a space with open windows for the application" checked in Spaces' settings panel.
[robg adds: When I tested this (it works in both 10.5 and 10.6), it didn't seem to matter whether or not the "When switching to an application..." preference was set or not; it worked with it enabled or disabled.]
I do not recall if this was present in 10.5, but at any rate, it's a feature of Snow Leopard -- just hold down Command prior to clicking any item in a Stack, and that item's folder will open in the Finder.
[robg adds: I believe this worked in 10.5, too, and I thought for sure we'd documented it here before. However, my searches came up blank, so here it is.]
I did not like to see the backup sparsebundle image from the Time Machine backup in the Time Capsule directory. So I made it hidden with this command in Terminal (after I used cd to get into the Time Capsule directory):
chflags -R hidden MyComputername.sparsebundle/
The backup still works, even though the backup file is hidden.
When transferring small bits of text to another machine, I used to use email. Then my email would fill up with annoying little bits of text. The following Terminal command will transfer the text from the clipboard a computer that can be reached by ssh. This method only transfers plain text, but that is 90% of my needs. (If anyone figures out formatted text or pics, let me know!)
In Terminal, type this:
pbpaste | ssh user@hostname 'pbcopy'
Alternatively, I might want to keep the text in a file on the distant computer. This works for that purpose:
[robg adds: For true clipboard sharing between machines, I'm partial to PTHPasteboard Pro, whichh makes it simple to keep two or more machine's clipboards in sync -- text and graphics are both handled with ease. There are numerous other solutions out there, too, such as DropCopy (which is also very useful for transferring files).]
I have found several ways to sort your downloads folder based on the date the file(s) were downloaded, but none that sort it based on the files that are in it, so I decided to write an AppleScript to do just that (although it could easily be used on any folder). This allows me to easily find files even if I can't remember when I downloaded them (or even their names).
Here's the code; you'll need to edit the top section to reflect the proper path to your Downloads folder.
[robg adds: I tried this in 10.6, and it failed (error number -1700 from 0 to type class on the first set allFiles to... line. The author is anonymous, though, so I can't contact them for assistance. As the script seems useful, I thought I'd post it and ask for help -- AppleScript wizards, please let us know if you see a fix. I'll watch the comments and update the hint if a fix is found. Alternatively, if it works for you as-is, please post that as well; perhaps my system is unique in its failure.]
One thing that's been bothering me lately about Time Machine is there are no labels or descriptions or any way really to tell what's been done to the system between backups. Really, what's the point of having 40 or so backups just for the last month (rather than maybe just 1 or 2 or even 4) if the only way to tell the difference between them is to look through each file??
So I sort of came up with a solution that I thought I'd share: I decided to just keep a text file somewhere in which I can log important (or not so important) system changes, such as system updates or important file deletions. I wanted to have it so I can go into Time Machine and use Quick Look on this text file to see the most recent change that I logged at the top of the file, followed by a history of changes. That way, if I'm looking for a particular change, I will know how much further back to go in my Time Machine history.)
So what I did was use Automator to create an app that will prompt for some text, then just insert it (with a date/time stamp) into a predefined text file. The first action in my Automator Workflow is 'Ask For Text,' then the second one is 'Run AppleScript' with the following code:
on run {input, parameters}
set theFileReference to open for access ((path to home folder as string) & "Time Machine Labels.txt" as string) with write permission
set txt to (read theFileReference for (get eof of theFileReference))
write ((current date) as string) & " - " & input & return & txt to theFileReference starting at 0
close access theFileReference
end run