-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RRFC] Exclude node_modules
from Time Machine backups (macOS)
#471
Comments
Ooh, this is interesting, i wonder if this would also exclude them from Dropbox syncing? |
@ljharb I don't think so. You can try run |
Does node provide a way to set xattrs? Shipping a binary addon in npm would be tricky. |
Presumably the binary exists only on Macs, so you could shell out to it when present? |
I spoke about this with a colleague and he said that he would be very surprised if it was the default behavior. |
@targos can you get some elaboration on why they’d want their node_modules to be backed up? |
@ljharb They'd like their setup to work without an internet connection after restoring from a backup. |
On the rfc call, we discussed some of the tradeoffs of an opt-in vs an opt-out; my take is that the risk caused by using opt-out is that your colleague would have to discover it, be unable to avoid needing internet after a restore, and then Google for the option, and then set it; the risk caused by it being opt-in is that someone’s backup disk prematurely fills up with node_modules and there’s no backup available to restore at all. |
With opt-in, you might not realize that I think the vast majority of people would prefer |
Need the machine to rolling |
Motivation
node_modules
often contains a lot of files that change frequently, which can significantly slow down backup solutions like Time Machine, so it would make sense to exclude them from backups.How
Current Behaviour
node_modules
folders are included in Time Machine backupsDesired Behaviour
Exclude
node_modules
from Time Machine backups using a "sticky exclusion". This can be done by adding the xattrcom.apple.metadata:com_apple_backup_excludeItem
to thenode_modules
folders with the valuecom.apple.backupd
encoded as a binary plist:References
Rust already does this for their
target
folders: rust-lang/cargo#4386My PR for implementing this for the
poetry
Python package manager: python-poetry/poetry#4599The text was updated successfully, but these errors were encountered: