GithubHelp home page GithubHelp logo

wesley6j / asimov Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stevegrunwell/asimov

0.0 0.0 0.0 52 KB

Automatically exclude development dependencies from Apple Time Machine backups

License: MIT License

Shell 100.00%

asimov's Introduction

Asimov

Build Status

Those people who think they know everything are a great annoyance to those of us who do.
โ€” Issac Asimov

For macOS users, Time Machine is a no-frills, set-it-and-forget-it solution for on-site backups. Plug in an external hard drive (or configure a network storage drive), and your Mac's files are backed up.

For the average consumer, Time Machine is an excellent choice, especially considering many Mac owners may only have Time Machine as a backup strategy. For developers, however, Time Machine presents a problem: how do I keep project dependencies from taking up space on my Time Machine drive?

Asimov aims to solve that problem, scanning your filesystem for known dependency directories (e.g. node_modules/ living adjacent to a package.json file) and excluding them from Time Machine backups. After all, why eat up space on your backup drive for something you could easily restore via npm install?

Installation

To get started with Asimov, clone the repository or download and extract an archive anywhere you'd like on your Mac:

$ git clone [email protected]:stevegrunwell/asimov.git

After you've cloned the repository, run the install.sh script to automatically:

  • Symlink Asimov to /usr/local/bin, making it readily available from anywhere.
  • Schedule Asimov to run once a day, ensuring new projects' dependencies are quickly excluded from Time Machine backups.
  • Run Asimov for the first time, finding all current project dependencies adding them to Time Machine's exclusion list.

How it works

At its essence, Asimov is a simple wrapper around Apple's tmutil program, which provides more granular control over Time Machine.

Asimov finds recognized dependency directories, verifies that the corresponding dependency file exists and, if so, tells Time Machine not to worry about backing up the dependency directory.

Don't worry about running it multiple times, either. Asimov is smart enough to see if a directory has already been marked for exclusion.

Retrieving excluded files

If you'd like to see all of the directories and files that have been excluded from Time Machine, you can do so by running the following command (props Brant Bobby on StackOverflow):

$ sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"

If a directory has been excluded from backups in error, you can remove the exclusion using tmutil:

$ tmutil removeexclusion /path/to/directory

asimov's People

Contributors

alex-kononovich avatar bertschneider avatar ko-dever avatar moezzie avatar qvacua avatar rowanbeentje avatar slashmo avatar stevegrunwell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.