Restoring files hidden in the Library folder (OS X)

When I set up my new MacBook Pro I chose not to use Migration Assistant. This meant that I had to do a fresh install of my non-Apple Applications. Not a problem, except for games such as Call of Duty 4 and Bioshock. For these it would be nice to have the data from when I’d played the games before. As for the joystick manager, the thought of having to map all those controller buttons again – Nooo!

But, you may be thinking, he has a backup of the old Mac. Right? Well yes, I have, but this is where an idiosyncrasy of the Mac OS can cause difficulties. Most games store their game saves, preferences, etc. in each user’s Library folder in a folder called Application Support . In recent versions of OS X the ~/Library folder has been deliberately hidden from casual view ‘for the user’s protection’. So although you can view the Library folder in a Finder window, when you look inside the Time Machine backup it is still not visible. So a simple click/drag of the required files isn’t an option, neither is it possible to navigate to the Library folder using the Time Machine UI.

Luckily you can use Terminal commands to get at the files and copy them. So I thought I’d write up the process for you (because I care). Command text in red.  Continue reading “Restoring files hidden in the Library folder (OS X)”

Advertisements

Backups

So, the other day I deleted an App from my iPhone in an attempt to fix a bug, with the idea that I would re-install the App thus fixing the bug. I then had a bit of mild panic because I couldn’t find the App in the App Store to download. Fortunately I remembered that the iPhone ‘hides’ purchased Apps so when I looked there, there it was. Phew. Unfortunately re-installing it didn’t fix the bug but that’s a different story.

The point is, whilst I was panicking, I thought I could always restore the iPhone from the iTunes backup on my Mac. Then I remembered how old that backup was. So today I backed up my iPhone and iPad to my Mac. While I was there I backed up some other key data on the iOS devices keeping those backups independent from the catch-all iTunes one.

A word about iOS backups: although you can backup your iOS device to iCloud (and it’s great that it does this automatically if you leave your device on, locked & connected to a power source), it doesn’t  backup everything (e.g. Apps!). It’s certainly worth doing a periodic iTunes backup as well.

Hint: turn on Encryption before hitting that ‘Back Up Now’ button, that way it will save all your logon credentials, saving you loads of time if/when you come to do a restore.

itbup

One more thing. Don’t forget to backup your Mac’s HDD (using Time Machine or similar).

Seagate drive problem

This evening I opened up the failed hard drive with the intention of destroying the physical disk before taking it to the dump for recycling. I discovered that despite the Iomega branding on the case, the actual hardware was a Seagate drive.

When I realised the disk was a Barracuda 7200.11 I thought, “Hang on, I have heard about these”. I remembered drsolly writing about these on his blog so I read that again and then did a bit of research of my own. The problem with these drives is that if you start them up when the internal event log is at line 320 (or something like that) the disk dies, even though all the data is still there on. Anyway, there are a couple of fixes which may (or may not) work in my case so I’m going to have a play with trying to fix it. I need to connect to the disk from a serial port so I’ve ordered an adapter.

I’ll report back when it arrives!

This is why we back up our files

I just had an external hard drive fail. This is an old disk, in fact it’s the oldest one on my LAN. It’s an Iomega 500MB (a huge capacity when I bought it!) which was connected to my router as a network drive. This morning it crashed while I was copying a file from it. Later, when I had time to investigate further, it failed in a major way. I tried some “first aid” using Disk Utility but I already knew it was a dead-un. I managed to copy some important photos off it before it ground to a complete halt and that was it!

Luckily there wasn’t anything important on it, mainly duplicate backups and copies of OS updates, patches, etc., to save me downloading them again if needed. Even the photos were just just local copies of ones that I am also storing online and elsewhere. I say “luckily” but it was more by design than luck.

So although it was annoying, I shan’t spend any serious time on recovery operations. I wouldn’t feel I could trust the disk afterwards anyway.

What this event has done though is reminded me that it is not a question of whether a hard disk will fail but when.

So not only do you need to backup and backup often, keep those backups on more than one hard drive and keep a copy somewhere on a cloud-based storage service. Check that you can actually restore from said backup. Keep an eye on the age of your main backup drives and replace them when they get a bit long in the tooth.

Yosemite

When Yosemite first dropped I wasn’t in the mood to be one of the “early adopters”. Normally with a new OS I’d be straight in there but I put off updating from Mavericks and I think I did the right thing. Apparently there were lots of minor problems reported on the discussion forums, not least a problem with dropped WiFi connections. Anyway, I decided I’d wait for a point release and then of course I had my eye problem…

Now that Apple have released a further point release (OS X 10.10.2) which purported amongst other things to fix the WiFi issue I thought I’d update my MacBook Air for starters. Opinion is divided between those who simply update from whatever their existing OS was and those who insist that a clean install followed by a restore of their backed-up data is the only surefire way to a reliable system. I thought I would risk the former and use my backup plan to do a clean install and restore if necessary.

I followed my usual backup method – which is really about ensuring I have a good backup in case of a SNAFU – prior to starting the update. In other words:

  1. Backup to external disk using Time Machine
  2. Create a bootable clone of the entire Macintosh HD partition on an external disk (I use Superduper!).
  3. Test the clone by booting from it and testing the basic functions of OS X.
  4. Verifying the Macintosh HD disk.

No. 4 gave me a couple of disk errors. Nothing serious. Nevertheless I booted the Mac in safe mode (that’s booting it while holding down the CMD and S keys) and running fsck to check and repair the disk:

/sbin/fsck – fy

It found some minor file allocation errors and then returned the message “Macintosh HD appears to be OK” (which is always a good sign). I rebooted it as normal and downloaded the Yosemite installer from the Apple App store.

It pays to have a Plan B, which in my case would be to restore everything to its last Mavericks configuration – I have a backup for that! – but it’s very useful to have a stand-alone copy of the OS X installer on a USB drive. If you have that, you can boot from it and run diagnostics or repairs from there and/or install the OS from scratch if need be. A useful spin-off is that if you have several Macs to update to the new OS, having a copy of the installer on a portable disk saves having to download the large installer image onto each Mac.

Starting with Mavericks, Apple have made it easy to create a bootable copy of the installer. There are other ways of doing it but I think using Apple’s “createinstallmedia” utility is fine. Here’s the method:

  1. When you download the OS X Installer app, it places it in the Applications folder. This method assumes you’ve left it there. (Don’t forget, if you run the installer and update the Mac, the installer app gets deleted from the Applications folder afterwards, so you need to create the USB copy first).
  2. Using Disk Utility, format an 8GB USB drive and give it the label “Untitled”. Leave it connected to a USB port on your Mac.
  3. Open a Terminal window and enter this command:

    sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia –volume /Volumes/Untitled –applicationpath /Applications/Install\ OS\ X\ Yosemite.app –nointeraction

  4. Let it run (takes a while!) and you will be left with a bootable USB disk containing the installer.
  5. To start your Mac from the USB drive, start the Mac whilst holding the Option (alt) key down. Once the Mac starts it will display the list of available bootable drives, select the USB drive from that list.

So, having tested my backups, downloaded the OS X update and created my USB installer, I was ready to undertake the update.

The Yosemite update was very straightforward (as Apple intended) and my Mac was soon up and running. I’ve left iCloud Drive off for the moment until I’m happy that everything is working as it should.

SugarSync

Thought I’d post my thoughts so far on SugarSync. I have been using it for a few of weeks and I am quietly impressed.

I’ve got my MacBook Pro and my iMac sync’d so that my main data directories are replicated on both machines. The free 2GB limit isn’t enough to backup my iPhoto or iTunes libraries so I’m not using it as a true on-line backup at the moment, however, these are backed up on an external HDD so I have some DR cover. For me, the main benefit is the online backup of my “important” files, plus the ability to work on a document wherever I am knowing that it will be copied (and therefore available) on the other machine.

I’ve recently tried this out in the wild; being away from home for a few days it was great to be able to work on files on my MBP and have them immediately backed up to the cloud, given that I was not traveling with my external HDD and therefore didn’t have the comfort of Time Machine. Of course, when I got home and switched on my iMac the files were automatically updated there too.

While out and about I also used the iPhone app to view some files (although I couldn’t edit them). Another use I’ve found for SugarSync is taking photographs with my iPhone and using SugarSync to transfer the images to my MBP for editing and subsequent posting.

Lastly, a mention about the sugarsync website. I have to use PCs at work and, while I haven’t installed the application on my work PC, I have already found that being able to access my data via the browser to be a great feature and one which will prove very useful in emergencies.

You may notice that I haven’t compared it directly to Dropbox, this is because since I started using Sugarsync I have stopped using Dropbox. However I’m sure it too has a place in my armoury and I will share my thoughts on this at some point.

So, all in all, I’m impressed, and I’m sure I’ve just scratched the surface.