41

Can I backup only specific folders with Time Machine?

If there is not an "official" way to do this, does somebody know a trick to do so?

tog22
  • 943
aneuryzm
  • 5,429

8 Answers8

20

You may exclude items from a Time Machine backup as follows:

  1. Open System Preferences.
  2. Click Time Machine.
  3. After having enabled Time Machine and chosen a backup disk, click Options.
  4. Click + to specify an item that is not to be backed up. The backup disk is included on this list automatically so that it does not back up itself.
sentinel
  • 4,535
  • What happen when I create new folders and new content ? I guess it depends if the new folders have as parent a backed up folder or not... could you confirm this ? – aneuryzm Oct 14 '10 at 06:17
  • 1
    (Second question) I actually need to backup only few folders... is it going to be horrible job to exclude my entire hard disk beside few folders ? – aneuryzm Oct 14 '10 at 06:18
  • Your assumption about whether new folders and content will be backed up is correct. Concerning listing the folders you want to exclude, you only have to create the entire list once. If you only need to backup a few folders, you should be able to exclude most folders at the top of their hierarchy, so it shouldn't be too bad. – sentinel Oct 14 '10 at 13:26
  • 1
    +1 This is the right way to do it (although it kind of defeats the purpose of t.m. in the first place); but exclude all you don’t want, make sure what you want is not excluded. Whatever is added outside your exclusion zone, will get backed up in the next iteration, always. In any case, check CarbonCopyCloner or SuperDuper! for arguably better alternatives to that problem. – Martin Marconcini Oct 19 '10 at 08:25
13

Easily - no. Time Machine's selection only uses exclusion so you'd have to exclude everything but the folders you want. I'd recommend looking at a different solution instead (eg. rsync, Retrospect, or other backup software)

Chealion
  • 8,018
  • 5
  • 37
  • 46
7

One solution I found is to use Disk Utility to create a new APFS Volume on my main disk, and then I moved all the files I want to back up on this volume (the size of the volume automatically adapts to it's content).

Then on Time Machine I excluded all my hard drives except my newly created APFS Volume, in that way it's the only one that gets backed up by Time Machine, and I don't need to update the list unless I add new volumes or hard drives.

And if you don't like to have to navigate to this volume to browse your files, you can always create symlinks to them

Olivier
  • 71
4

Select All the files and folders in the disc that contains the folder you want to back up.

Drop them all on the Exclusions window

Remove the folder you want backed up from the exclusions

Allan
  • 101,432
  • 1
    Great answer! Just make sure that the parent folder isn't in the Exclusions window already. For my needs, I wanted to only back up ~/Pictures, but I couldn't do the above steps until I removed ~ from the Exclusions window. – bonh Nov 05 '17 at 21:00
2

tmutil enables you to edit the exclusion list from the command line.
Because blacklisting folders one by one can be tedious, I wrote deus_ex_tmachina bash script that basically iterate over the folders at the root of your disk and exclude them ; stopping in the middle of the process so you can edit the list.

kraymer
  • 2,982
  • 2
  • 18
  • 15
0

In my case I have items on an external drive that I want to have backed-up. What I do is create a partition on that drive and then remove that partition from the exclusion list.

0

I answered this elsewhere as well, sorry for the redundancy but this question is asked multiples times on this site alone. Time Machine (And excluding files) is not a good solution.

Short answer... "Get Backup 3" from the Mac Apps Store.

I'm looking for the same solution, (Or was). Basically I want to back up just one folder multiple times a day to a flash drive, similar to the way Time Machine does. BETTER YET! (Million $ idea here...) I would like a local cloud, i.e. I make a change, it updates my local backup on my flash drive to be in sync right then and there when I make the change (Like drop box does). The closest thing I have found is "Get Backup 3" on the Mac App store. You can choose an Origin folder and a destination folder and set it to synchronize the two. You can choose the direction as well which is great, : Folder A to Folder B, or Folder B to Folder A, or even Bi-Directional updates. You can also schedule sync times. I set mine up for close to the end of the day. It backs up and I leave my thumb drive at work in case my laptop ever gets stolen at least I have a copy of my files backed up (Network here is very restrictive and painfully slow).

Hope that helps.

0

I'm not sure if time machine follows symbolic links, but if so, you could have a high level directory full of links to the directories you want backed-up, then exclude all the top level directories except that one....slightly roundabout, but not too work intensive (if time machine backs up the content of symbolic links, which I slightly doubt, but should be checked....)


I checked. It does not work. Other ideas?