Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Before I shut down or sleep my Mac, I want to be warned if a Time Machine backup is still in progress.

Is there such a thing? Or at least something that makes it very obvious that a backup is in progress, so that I avoid shutting down the machine before it is finished?

Right now the only visible sign that a backup is in progress is the little spinning circle up in the "task-bar", it's very easy to miss.

enter image description here

I searched but could not find a solution for this.

share|improve this question
add comment

2 Answers 2

up vote 6 down vote accepted

You've asked what you want, but not why you want it. I am guessing that this is a preconception that you think it needs to complete in order to be successful. Time Machine isn't just a standard "backup job" that will create individual backups that depend on the success of each backup, it's more a permanent process.

Effectively each time you change a file, whether by addition or alteration of the contents or metadata, it gets added to the list of files that need to be backed up. The list grows and grows all the time, and it's built into the actions of the filesystem that whenever it makes a change, it also adds the file to the list. Every hour (or whatever you have set if you are using a non-standard config), Time Machine will start at the beginning of this list of changes, and start to plough through them and copy the changes to the backup disk. At the end of the process, when there are no more files to include in the backup, it stops.

But there is no need to wait for it to stop. If you have say 100 files in the queue, and it only processes 45.5 of them when you shut the machine down, the completed files are removed from the list only after Time Machine confirms they were completely backed up -- any partly-completed files will not be flagged as complete. Then, next time you boot up, wait another hour, the process will start again. You will have the 55 files that were not transferred last time at the front of the queue, followed by any other changes that have been made in the first place.

So, in summary, unlike a traditional backup which requires completion to ensure validity, the Time Machine backup is an ongoing process that can be interrupted at any time, and you do not have to wait for it to finish before shutting down. Indeed, if you are doing something disk intensive, feel free to temporarily turn Time Machine off or interrupt a backup that is in progress while you do stuff, then when you turn it back on it will just pick up where it left off.

share|improve this answer
2  
I disagree. I have had, several times actually, the following issue: close macBook Air, rush back home, open Macbook Air, get told that save failed. Until now, ok no issue. Come back to work, Macbook Air redoes FULL DISK SAVE. Might be a bug, but losing incrementality due to brutal disconnection makes me cautious. –  Kheldar Jan 27 '12 at 12:03
    
Are you using USB or Wireless? I have seen the same behaviout too on a TM backup to an AirDisk - check for UUID not matching messages in the console logs for backupd. It might not be redoing the full disk save, but it may spend a LONG time re-indexing the backup disk. I don't think it's normal. But in principal that's how it works, it's literally just a queue of files, the file at the front of the queue is only removed from the queue when it is confirmed complete, then it moves to the next. So if it stops in the middle of a copy, it will start at the beginning of the file on the next start. –  stuffe Jan 27 '12 at 12:11
    
Given that it displays no earlier saves, does a 200GB new save and it takes ages, I expect it is really copying all again. Then again, I don't really want to know how it works, I'm just super cautious due to all my work being on that MacBook Air and Time Capsule :D –  Kheldar Jan 27 '12 at 12:34
1  
If that happens to you regularly, I would check the logs. There is a great Time Machine Widget you can download that pulls all the backupd events per TM instance, and shows you what it is doing and why, which installs into your dashboard. Well worth a look if TM isn;t doing what you think it should. –  stuffe Jan 27 '12 at 14:53
add comment

Time Machine is effectively a backup program. The program is a daemon called "backupd" that runs via an automated system job controlled by launchd.

When time machine is active there is an active "backupd" process running. Once the Time Machine process finishes, backupd needs a few minutes to close down and quit.

As for shutdown/logout, it's easy to write a script/program to check for the running process and throw up a warning.

Pre-sleep this is a little more difficult because there really isn't a simple sleep intercept like "Logout items"

For further information on the backupd task: Adjusting the Time Machine Backup Interval

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.