Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Need more specific information about Time Machine

I'm finding it quite difficult to find detailed technical information about a Mac or what might be more accurate OSX. At the moment, I'm trying to learn about "how to use Time Machine (TM)". I've been able to findthis article which is probably good if you are undertaking precisely the use cases described. However, it does not really reveal how it works well enough to anticipate what might happen when there are slight variations in the use case. If Apple provides anything like an instructional manual for TM I'd be grateful for assistance in finding it.


With that said, my immediate undertaking is to deal with a situation where some outside parties who have now been determined to be untrustworthy have been involved in the installation of software and circumstances suggest that the subject Mac has been maliciously compromised. Therefore, the owner wants to restore the software to a known good state and then recover their work product from a backup made by running TM on the compromised system. This means that I have a TM volume from one Mac that I want to use on what I think is now a new (different) Mac for the purpose of restoring files. The new machine is not yet using TM and it looks like some setup is required. However, it appears to me that TM associates the backup volume with a specific computer which means I have no idea what is going to happen if I should specify the TM backup volume used on the old computer as a TM backup volume on the new computer. At this point, I don't really want any backup to be performed. I'm only interested in performing recovery of a subset of the files contained on the backup (i.e., old TM volume). If someone can provide specific instructions about how to do that it would be greatly appreciated.

MacBook Air, OS X Mavericks (10.9)

Posted on Oct 31, 2015 10:56 AM

Reply
17 replies

Nov 1, 2015 12:26 PM in response to arrividerci

As you're probably already doing... Make a complete backup of the disk using Disk Utility and start over. Install from known-good distros. For anything that post-dates the breach, haul over only data from the backups, and not executable code.


Not entirely certain what you're planning, so I'll take a few different guesses...


You can use Time Machine to get a copy of the questionable disk, but that's added overhead to get a single backup — unless you're going to assume the disk has been "decontaminated", that is.


If you want to clone from one computer (presumably known-good) to another, perform a Time Machine restore to a scratch disk (probably on the known-good computer), and then swap that disk over and use it as the migration source for a new installation of OS X.


If you're fetching files out of the questionable backup, you could boot OS X from an external USB device and fetch individually, or — probably easier — restore the entire TM onto an external scratch disk, boot from a USB-based installer, wipe the current questionable boot disk and reinstall OS X onto the target boot disk, then haul over the files from that external disk containing the TM restore. As mentioned earlier, don't haul over bundles or applications from that disk — only retrieve those from a known-good source.

Nov 1, 2015 2:03 PM in response to MrHoffman

You've mentioned some avenues that look promising and I've now consumed some of the material which Eric referenced..


To be more specific about the task at hand, the steps that have been performed are as follows:

  • Select a target disk (128GB thumb drive) for TM and re-format using extended file system.
  • Initiate TM on the problem computer (i.e., TM had not yet been activated) with prepared thumb drive as the target.
  • Use the built-in recovery partition to first re-format (erase) the system/boot (OSX) partition using the Disk Utility.
  • Use the built-in recovery partition to restore OSX to the re-formatted system/boot partition.

The result is that I have a fresh new (clean) version of OSX (Maverick) installed and I have a thumb drive with files created by TM.


The goal is to restore only the files from the TM backup that represent work product (i.e., documents, pictures, etc.) created on the prior system. It might be worth mentioning that when I did the restoration I entered an Account Name that is likely different than what was specified on the prior system. I'm thinking this is the name of the computer. From reading some of the documents Eric referred me to, it looks like TM will still think of this as the same system (computer) that the TM backup was created on (i.e., the firmware is unchanged) but TM has not yet been activated on the new system. If I'm properly grasping what TM will do, I could activate it on the new system, which has none of the work product files I'm after present, and it will go ahead and backup the system files (at least those that are different) onto the TM thumb drive. Then I can go ahead and selectively restore the work product. Does that sound like a valid approach?

Nov 1, 2015 4:26 PM in response to arrividerci

arrividerci wrote:


If I'm properly grasping what TM will do, I could activate it on the new system, which has none of the work product files I'm after present, and it will go ahead and backup the system files (at least those that are different) onto the TM thumb drive. Then I can go ahead and selectively restore the work product. Does that sound like a valid approach?

Again, I'd create and boot a bootable USB flash drive containing a clean copy of Yosemite or El Capitan (made via that known-good system) and use OS X Recovery from there; to restore the questionable Time Machine backup onto a scratch disk, and strictly for the purpose of performing a whole-disk restoration onto the scratch disk. Pick your files out from there.

I'd not boot an untrusted configuration.


Time Machine backs up the whole system, and restores the whole system and — optionally — allows the recovery of individual files.


Given the nature of this discussion, also consider getting some local technical assistance here, too. That'd likely be best practices for appropriately managing work product, after all.

Nov 5, 2015 8:07 AM in response to MrHoffman

OK! I've successfully used the recovery partition to create another bootable system on a flash drive (FD). The procedure for doing this offered the option of using a TM backup to transfer files. From the TM Restore menu I unchecked everything (Applications, etc.) except Documents. This all seemed to work pretty good but I ended up with something that looks like it might be problematic.


The procedure for using TM to restore ended up placing a folder/directory into the "users" directory with the same name as the user account on the old machine from which the backup was created. It also looks like this is the name of the only user account on the new FD system. However, that is not the name of the user account on the new system (computer HD) which is the ultimate destination of files I'm trying to recover. It looks like OSX won't allow me to rename the directory used for a user account. Likewise when I rename the user in system preferences the corresponding directory in the "users"directory does not get changed.


This has caused me to recognize something that appears to be a problem on the new system created on the computers hard drive. This is the one I'm intending to end up with. The name of the user account that shows up in system preferences and the splash page for logging in does not appear as a directory in the "users" folder. There is a different name there that happens to be what I thought I was specifying for the name of the computer but now I cannot find anything like a computer name. This causes me to wonder what possible problems that might cause going forward. Does OSX maintain any kind of a setting for naming the computer (i.e., often called the host name in networking terms)?


OSX seems to prohibit, or possibly disguise from a novice user like myself, some file system operations that would seem like normal things to do such as perform a rename operation on a directory. In summary, should there always by a directory name in the users directory which matches the name of the user account used to login? If so, how do I correct the current mismatches?

Nov 5, 2015 9:03 AM in response to arrividerci

Not sure what you're up to, here. I did not suggest checking off anything during the restoration, I suggested restoring the entire Time Machine backup to a scratch disk. All of it. Then picking over just what's needed, from that now-restored disk. This is a pain to do, but it's — when the contents of the original backup are untrusted — about the only way I'm aware of that can reduce the likelihood of reinstalling some problematic files.


Scratch disks are cheap, too.


This approach only reduces the changes, too. If the attacker was somewhat more sophisticated and/or if you're worth the effort to invest in this effort, then this recovery path may not provide a clean recovery.


For some of these cases, the whole Mac is now considered "scratch" and should be replaced.

Better still: get some formal help. Restoring a Time Machine backup and dealing with file protections is (unfortunately) a small part of what can potentially arise with attempting to decontaminate a potentially-compromised system.

Nov 5, 2015 9:28 AM in response to MrHoffman

What I was thinking and what seems to have happened is that I have a bootable flash drive (FD) which should be free of software contamination. I do understand your point about certain kinds of files created by applications being able to contain malicious code but my plan was to copy the entire contents of the directory within the "users" directory on the FD to the same place on the now clean HD. Under Windows and Linux this is pretty simple but OSX seems to make it hard, or at least unnatural, to deal somewhat directly with the file system.


Can the name of a directory within the "users" directory be changed without messing up the system? If so how? Even if not necessary it would be desirable to use the name of the user account for the corresponding directory within the "users" directory. OSX seems to do that, at least, under some circumstances.


I also recognize that there are other helpful reasons for having a secondary system to boot. It allows a novice, like me, to experiment without risk of screwing things up on a system intended for real operational use. Thanks for informing me about that!

Nov 5, 2015 10:29 AM in response to arrividerci

arrividerci wrote:


What I was thinking and what seems to have happened is that I have a bootable flash drive (FD) which should be free of software contamination.


You're potentially presuming that local files and local applications are pristine. It's unfortunate, but data files can and variously do contain executable code. Not the least of which are the macros embedded in some supposedly-text documents. This goes back to my earlier comment that decontamination is not a certainty.


On OS X, applications themselves are stored as bundles, and these can themselves be potentially problematic — if the files or bundles are transferred over from the restored configuration. This goes back to my earlier recommendation to use known-good copies of these and other tools. To minimize what was recovered from the disk.

do understand your point about certain kinds of files created by applications being able to contain malicious code but my plan was to copy the entire contents of the directory within the "users" directory on the FD to the same place on the now clean HD. Under Windows and Linux this is pretty simple but OSX seems to make it hard, or at least unnatural, to deal somewhat directly with the file system.


The OS X directory and configuration organization is a simple one, and the protections are typical of Unix. There are and always have been variations between Unix distributions, whether Linux, one of the BSD distros, or with Solaris or illumos or otherwise. Restoring the entire backup onto a scratch disk goes back to my earlier suggestion around a simple way to do this, too — restore the whole disk as it was, then look where the login usually is (under /Users) and pick off the specific files of interest that are not otherwise available. To restore the entire Time Machine to a scratch disk, and then mounting that and pulling over the data files you want or that you need. This approach is a common practice with backups on many operating systems, and largely irrespective of the platform — restore the complete copy, then transfer over specific files as needed.

I also recognize that there are other helpful reasons for having a secondary system to boot. It allows a novice, like me, to experiment without risk of screwing things up on a system intended for real operational use. Thanks for informing me about that!


Your approach is a very good way to learn how the pieces really fit together, but it'll take a while. I've certainly used it. Given my own experience with following this and similar approaches, mistakes are likely with this approach, too. It's a really good way to learn. Or if you're in a hurry or otherwise, you can enlist more formal assistance with the recovery. More experienced help. While we've all started out unfamiliar with OS X, recovering from a potential or actual breach is unfortunately the proverbial deep end of the pool. That's irrespective of the operating system, too.


There's also unfortunately no certainty here. A competent and decently-funded attacker may well have gone as far as updating device firmware, for instance. That if this target is worth the effort. That's really hard to spot.

Nov 5, 2015 10:48 AM in response to arrividerci

arrividerci wrote:


... I'm only interested in performing recovery of a subset of the files contained on the backup (i.e., old TM volume). If someone can provide specific instructions about how to do that it would be greatly appreciated.

Assuming you want to recover from a TM backup suspected to contain corrupted files you do not want to restore, begin with Step 2.


Otherwise, follow only Step 1, and stop there.


  1. If you have a backup that you created prior to the onset of the intrusive event, now is the time to use it. For Time Machine, boot OS X Recovery, and at the Mac OS X Utilities screen, choose Restore from Time Machine Backup. Choose a date preceding the intrusive event.
  2. If you do not have a backup, create one now. To do that read Use Time Machine to back up or restore your Mac.
  3. The recovery procedure will require that you erase the Mac using OS X Recovery, and then create a new User Account whose contents will be empty. You will then be able to use Setup Assistant to migrate your essential documents including photos, music, work products and other essential files.
  4. To erase and install OS X read How to reinstall OS X on your Mac.
  5. Follow the instructions in that document under Erase your drive and install OS X.
  6. Then, follow the procedure in Move your content to a new Mac.
  7. When asked how you want to transfer your information, select Transfer from a Mac, Time Machine backup, or startup disk.
  8. Under Select the Information to Transfer, select only your previous User account and do not select "Applications", "Computer and Network Settings" or "Other files and folders". De-select those choices.
  9. Subsequent to using Setup Assistant, you will need to reinstall the essential software you may require, once again remembering to install software only from their original sources, and omitting all non-essential software.
  10. "Non-essential software" is a broad category that includes but is not limited to third party "cleaning", "maintenance", and "anti-virus" products.

Nov 5, 2015 2:04 PM in response to John Galt

Many thanks for the step-by-step instructions. I think what I've done so far matches what is specified up to and including Step 5 where my situation is the one corresponding to Step 2. In that, I had no backup from prior to suspecting the contamination.

My understanding from reviewing the material referenced by Step 6 is that it generally pertains to a situation where 2 computers are available (i.e., an old one and a new one). I don't have 2 computers. What I have is the situation described as TM backup on an external drive. I'm stuck when I get to the instructions for "Use the Migration Assistant" because it only references what to do on each of the 2 computers. It does NOT provide instructions for the case, described, that depends on an external drive with a TM backup.

Nov 5, 2015 2:43 PM in response to arrividerci

In Move your content to a new Mac, you will be following the instructions under "Use Migration Assistant", and skip down to "On your new Mac". There, you will be selecting the Time Machine backup. From there you will be able to exclude anything you want, which given the circumstances you describe ought to be "Applications", "Computer and Network Settings" or "Other files and folders". Those choices should be de-selected, while leaving the User Account you wish to migrate selected. Clicking the "reveal triangle" to the left of the selected User Account will allow you to further constrain the types of files you wish to transfer.


Having said all that, I do not know if Time Machine can reliably use a USB flash drive as you have been using, since Apple's support documentation does not specifically include that type of storage medium. They use the terminology "hard drive" which to me implies a hard disk drive. You're about to find out if a flash drive will also work. I can think of no reason it shouldn't work, but I never tried to use Time Machine with one of them.

Nov 6, 2015 7:40 AM in response to John Galt

OK - Migration Assistant finds the Time Machine backup and this brings me back to the problem mentioned earlier in this thread. It comes to the screen titled "Select the Information to Transfer" where it lists what is available to select. One looks like the name of the directory on the old machine where the work product (i.e., what I'm after) is listed. This is nice. However, based a prior experience I think what I'm going to end up with is a new directory on the new system within ./users with the user name from the old system. Before doing that I'd like to know, "how do I substitute that for the directory on the new system associated with a user already defined there?".


Note: I am using a flash drive. It worked fine when performing the TM backup and works fine now. However, I did read somewhere that it is necessary to reformat the drive to use an extended file system with a GPT partition table. I did do that and of course that does limit the portability of the flash drive.

Need more specific information about Time Machine

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.