Giter Club home page Giter Club logo

tmbackup's Introduction

Shell Script macOS

tmbackup - Seamless Time Machine backups! ๐Ÿš€

Fast, light macOS utility that performs Time Machine backups on all connected drives.

Generated using agg, asciinema, Menlo typeface, theme Github Dark.

Highlights

  • ๐Ÿš€ Fast - minimal overhead, tmbackup.awk executes in only ~ 15 ms.1
  • ๐ŸŽจ Intuitive - user-friendly, clear color-coded messages for every backup status.
  • ๐Ÿ”’ Robust - ensures reliability with effective error handling during the backup.
  • ๐Ÿ“ฆ Self-contained - no dependencies, lightweight, uses POSIX awk, sh (e.g. 3629 bytes, 186 lines).

Getting Started

Note

This utility is only intended to work in macOS.

Installation

If you have brew installed, just run:

$ brew install Neved4/tap/tmbackup

Usage

$ ./tmbackup.sh

Logging

tmbackup | tee -a /path/to/output.log

Compatibility

Supported macOS Versions

Version Supported
macOS 14 Sonoma Yes โœ…
macOS 13 Ventura Yes โœ…
macOS 12 Monterey Yes โœ…
macOS 11 Big Sur Yes โœ…
Supported Awk and UNIX shells

tmbackup is built for macOS using /bin/sh and /usr/bin/awk. It adheres to standards when possible, and is made to play nicely with other Awk and POSIX sh versions too.

This allows to execute tmbackup with different shells:

dash /path/to/tmbackup.sh

Or to build your own parsing with different Awk implementations:

tmutil destinationinfo | mawk -f /path/to/tmbackup.awk

Supported Awk implementations

Shell Version Supported
awk 20230909 โœ… Yes
gawk 5.3.0 โœ… Yes
goawk 1.25.0 โœ… Yes
mawk 1.3.4-20231126 โœ… Yes

Supported shells

Shell Version Supported
bash 5.2.15 โœ… Yes
dash 0.5.12 โœ… Yes
ksh93 93u+m/1.0.7 โœ… Yes
mksh 59c โœ… Yes
oksh 7.3 โœ… Yes
osh 0.18.0 โœ… Yes
posh 0.14.1 โŒ No
yash 2.55 โœ… Yes
zsh 5.9 โœ… Yes

UX & Implementation

More information on this topic: UX.md.

Note

If you have any cool ideas or suggestions to improve things, let me know!

Limitations

Important

tmbackup does not differentiate between backups interrupted by a hardware failure and a user manually skipping.

Acknowledgments

Thanks to @0risc and @goldbuick for testing and feedback.

License

tmbackup is licensed under the terms of the MIT License.

See the LICENSE file for details.

Related Projects

Footnotes

  1. Tested with hyperfine. โ†ฉ

tmbackup's People

Contributors

0risc avatar neved4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

0risc

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.