Skip to content

Cargo's temp files cause backup churn on macOS #3884

Closed
@kornelski

Description

@kornelski

macOS automatically makes hourly backups. Cargo's build temp files are large and frequently changing, causing gigabytes of redundant data backed up every day.

Because the temp files are in multiple project-relative locations, it's not practical for users to manually exclude all the target folders from backup.

Mac applications generally avoid this problem by using system-designed caches directory, but the issue for it (#1615) seems to be in a stalemate.

So I'm proposing an alternative quick fix that doesn't require changing any paths in Cargo. macOS allows excluding individual directories from backups. I suggest marking target/{build,deps,incremental} as excluded. It can be done with:

[URL setResourceValue: @YES] forKey: NSURLIsExcludedFromBackupKey error:nil];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions