Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wirtandi

macrumors regular
Original poster
Feb 3, 2021
179
179
Kinda new to apple in general and not really familiar with time machine backups yet. One thing for sure though, dont wanna backup tens of thousands of dependencies like for example javascript and npm with node_modules.

What language do you use and what folders do you exclude? I am getting interested in swift and also wondering what I will need to exclude from TM backups
 
  • Like
Reactions: jagooch

temende

macrumors 6502
Oct 28, 2021
321
1,372
With Time Machine it's hard to do something like this - you can exclude specific node_modules folders, but you can't have a global exclusion rule that says "exclude all folders name node_modules".

Personally I just backup everything (including node_modules).
 
  • Like
Reactions: wirtandi

Senor Cuete

macrumors 6502
Nov 9, 2011
429
31
Several years ago lightening hit my house. It was very dramatic. Bright electric sparks popped in the electric outlets. Everything that usually blows up like the refrigerator, the fuse in the well, the TVs, etc. was fine - except my iMac. When I got a new one I plugged it in and started it. Everything was backed up to a Time Machine backup on an external hard drive. The Mac wanted to know if It should restore everything from the backup. I clicked on YES and in a surprisingly short time the new machine was completely restored with everything from my old computer. Back everything up.
 
  • Like
Reactions: wirtandi

Starfia

macrumors 65816
Apr 11, 2011
1,010
836
I think the intended purpose of Time Machine, in Apple's minds, was to give the average mortal, non-technical user a way to recover from catastrophic hard drive failure that they never had to think about. "We back up everything" was a headline feature, big and bright on the presentation slide. (Bonus: when moving to a new Mac, you can restore from the backup to bring it to essentially the exact state of the old Mac.)

Even though I'm a technical user and a developer and everything, that's why I use it, so I don't exclude anything either. If I was trying to make backups for some other reason with some greater degree of precision, I'd probably do it manually, see whether I could use the built-in Automator or Shortcuts apps to run some sort of regular workflow that I could script, or check out some of those other well-respected backup tools which have been around at least as long as Time Machine has.
 
  • Like
Reactions: wirtandi

wirtandi

macrumors regular
Original poster
Feb 3, 2021
179
179
Thanks for all the responses. I see, interesting to see that all of you prefer to just backup everything. However, wouldnt it be extremely slow to backup node_modules? Especially when you have many projects and each project has its own node_modules?

May I ask what size your hard drives are? Mine is a samsung SSD T5 with 500GB, thats probably why I feel I need to be cautious about space, 500GB isnt THAT big for a storage drive
 

Starfia

macrumors 65816
Apr 11, 2011
1,010
836
Time Machine works automatically and only backs up what's changed since the previous backup, so there shouldn't be any reason to feel like you have to micro-manage. The only reason I can think of to exclude a folder from being backed up is that you specifically don't want its contents to be protected if your main drive fails.

As a rule, your Time Machine drive should be at least as large as whichever drive(s) you're backing up. If the Time Machine drive's capacity is larger than that, the extra space will be used to store older versions of files for à la carte-style retrieval in addition to the current ones, hence the name.

My main machine is an iMac with a 1TB internal drive, and I use two external drives with capacities of 1TB and 2TB. My Time Machine disk is a 5TB drive which backs up all of them.
 
  • Like
Reactions: wirtandi

wirtandi

macrumors regular
Original poster
Feb 3, 2021
179
179
Time Machine works automatically and only backs up what's changed since the previous backup, so there shouldn't be any reason to feel like you have to micro-manage
So, am I right in saying that while the initial backup may be slow, subsequent backups should be pretty quick because there shouldn't be any change in the node_modules? Assuming I dont update anything in the node_modules
 

Starfia

macrumors 65816
Apr 11, 2011
1,010
836
So, am I right in saying that while the initial backup may be slow, subsequent backups should be pretty quick because there shouldn't be any change in the node_modules? Assuming I dont update anything in the node_modules
Yes, exactly right. The first backup will take a while – not only is it backing up everything you specify, but all backups happen on low-priority threads so as not to interfere with the performance of anything you're actively doing.

During subsequent backups, you can gain a bit of a sense for what it's doing by leaving the Time Machine preferences window open and observing the reported progress.
 
  • Like
Reactions: wirtandi

jagooch

macrumors 6502a
Jul 17, 2009
804
249
Denver, co
I exclude ~/Downloads as that folder is a my working directory for miscellaneous tasks. Even though I have Hazel watching the folder and moving files out of it , there is still a lot there ...sometimes 10GB or more ... that is only temporary files. No need to back that up!
 

Lihp8270

macrumors 65816
Dec 31, 2016
1,139
1,601
If you’re using version control. Why not just keep everything in a dev folder and exclude it all?

In the event of a failure, you can just pull down your projects again.
 
  • Like
Reactions: Rock_Artist

jagooch

macrumors 6502a
Jul 17, 2009
804
249
Denver, co
If you’re using version control. Why not just keep everything in a dev folder and exclude it all?

In the event of a failure, you can just pull down your projects again.
Not if the remote repository also gets corrupted or lost. Then your making a copy of a bad copy, or perhaps there is nothing to copy!
 

dmccloud

macrumors 68040
Sep 7, 2009
3,122
1,883
Anchorage, AK
So, am I right in saying that while the initial backup may be slow, subsequent backups should be pretty quick because there shouldn't be any change in the node_modules? Assuming I dont update anything in the node_modules

Time Machine backups after the initial one are incremental in nature - meaning that only files that are new or have changed since the last backup will be backed up on subsequent runs. In practical terms, this means that even if one of the node modules is updated, only those files that are either newly added or modified since the last backup would be backed up rather than the module as a whole. Even if a folder that is quite large is updated between backups (i.e., a game like Tomb Raider), the next Time Machine run would just back up the newly added & modified files rather than backing up the entire folder again.
 

Rock_Artist

macrumors newbie
Jul 28, 2020
24
33
Not if the remote repository also gets corrupted or lost. Then your making a copy of a bad copy, or perhaps there is nothing to copy!
If you’re that concerned, assuming we’re talking about git. You can easily have the same repro cloned in many git remotes. This can easily be automated if needed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.