Keep your Mac awake during long tasks

A long synchronization, such as the first copy of a large folder or a slow network connection, can take hours. If your Mac goes to sleep during that time, the synchronization stops.

What happens if the Mac sleeps

  • rsync is interrupted and usually stops with an error.
  • RsyncUI does not log the run, because it only writes a log entry when rsync finishes.
  • No data is corrupted. Run the task again when the Mac is awake: files that were already copied are skipped, so rsync continues with what is left.

How to keep the Mac awake

Choose one of these before you start a long task:

  • For one task: open Terminal and run
    caffeinate -i
    
    Your Mac will not go to sleep while the command runs. Press Ctrl-C in Terminal when the task has finished.
  • Permanently: in System Settings, open Battery → Options on a laptop, or Energy on a desktop Mac, and turn on Prevent automatic sleeping when the display is off (on a laptop, this applies on power adapter).

A laptop still sleeps when you close the lid, unless it is connected to power and an external display.

Stopping a task

You can abort a running task at any time. See Stopping a running task.