I have an old MacBook Pro running High Sierra. Time Machine backs up /Users but not /opt.

The Time Machine preferences let me exclude directories, but does not let me add directories that I want to back up.

How can I get Time Machine to backup /opt on High Sierra and how can I restore it?

  • Welcome to Ask Different. That's surprising, because Time Machine backs up all folders, including /opt. What makes you think that /opt isn't getting backed up? If you plug in your Time Machine drive, open the Backups.backupdb folder, open the folder named like your Mac and then the folder with the most recent date, don't you see a subfolder named opt?
    – jaume
    Dec 3, 2020 at 7:13
  • No, I do not see /opt. I see only /Applications, /Library, /System, /tools and /Users.
    – Nelson
    Dec 4, 2020 at 20:25
  • 1
    No, I do not see /opt. I see only /Applications, /Library, /System, /tools and /Users. I also do not see /bin, /cores, /dev, /etc/, /private, /sbin, /tmp, /usr, or /var
    – Nelson
    Dec 4, 2020 at 20:35
  • Yes, I agree, the Finder doesn't display /bin, /cores and other "Unix" folders, giving the (wrong) impression that they are not being backed up, but if you open Terminal, and run ls -l, you will see they are included. Check the screenshots in my answer below.
    – jaume
    Dec 5, 2020 at 12:11
  • 1
    With a Finder window open, hit Shift-Command-dot and all hidden folders will magically appear and will also appear in the Time Machine recovery windows. Shift-Command-dot also turns it off again. Nevertheless @jaume's answer is correct.
    – Gilby
    Dec 8, 2020 at 21:46

1 Answer 1


How can I get Time Machine to backup /opt on High Sierra?

You don't need to do anything special to back it up: Time Machine backs up all folders on your Mac.

However, you may get the impression that /opt (and other folders like /bin or /cores, as you mention in your comment) are not included because the Finder hides those folders by default: enter image description here

But don't let the Finder mislead you:

  • either press ShiftCommand. to let the Finder display all folders (press ShiftCommand. again to hide them),
  • or open Terminal, list the contents of the backup folder and you will see that everything is there: enter image description here

How can I restore /opt?

Proceed as follows:

  • Open a Finder window.
  • Enter Time Machine.
  • Press ShiftCommandG and enter / to display the root folder of your drive.
  • Press ShiftCommand. to display hidden folders. You should see /opt now.
  • Browse the timeline on the right-hand side and select the desired date.
  • Select /opt.
  • Press Restore. Note that Time Machine will probably ask whether you want to keep a copy of your current files.
  • If TM doesn’t show /opt then how can I restore /opt from backup?
    – Nelson
    Dec 6, 2020 at 20:56
  • 1
    @Nelson You can restore /opt as follows: open a Finder window, enter Time Machine (for example, from the Time Machine icon in the menu bar), press Shift+Command+G and type "/opt" to tell the Finder to display /opt. You can then select single files or directories located inside /opt for recovery. If you wish to restore the whole /opt hierarchy, type "/" instead to open the root directory, select /opt and press Restore.
    – jaume
    Dec 6, 2020 at 21:28
  • 1
    @Nelson You are right, typing "/" doesn't let you recover /opt. I've expanded my answer with information on how to restore /opt: enter Time Machine, press Shift+Command+G and type "/opt", select the desired date, select all folders and press "Restore". Note that Time Machine will probably ask whether you want to keep a copy of your current files.
    – jaume
    Dec 8, 2020 at 8:04
  • 1
    @Nelson: See my expanded answer: You can press Shift-Command-dot to display hidden files in the Finder, that makes restoring /opt much easier than my previous instructions. Could you check it out and report back?
    – jaume
    Dec 9, 2020 at 6:33
  • 1
    Thank you for posting the Key combo short cuts!!! You saved me!
    – geekyj
    Nov 10, 2022 at 1:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .