Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vitorgalvao/tape
Backup and restore software settings on macOS
https://github.com/vitorgalvao/tape
Last synced: about 1 month ago
JSON representation
Backup and restore software settings on macOS
- Host: GitHub
- URL: https://github.com/vitorgalvao/tape
- Owner: vitorgalvao
- License: bsd-2-clause
- Created: 2022-02-02T19:01:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-20T21:54:19.000Z (about 2 months ago)
- Last Synced: 2024-07-20T22:55:48.425Z (about 2 months ago)
- Language: Ruby
- Size: 27.3 KB
- Stars: 46
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tape
Tape is a command-line tool to backup and restore software settings on macOS. It can back up preferences for apps (including from the Mac App Store or Apples’s own), command-line tools, and even macOS customisations like your sounds or local spelling dictionary.
## Installation
Download the `tape` executable at the root of this repository and you’re good to go. Alternatively, install with [Homebrew](https://brew.sh):
```shell
brew install vitorgalvao/tiny-scripts/tape
```## Configuration (optional)
Tape stores its configuration in `~/.config/tape/config.yaml`. If it doesn’t exist, it will be created on first run with sensible defaults. Quick example:
```
backup_to: "~/.config/tape/Backups"
keep: 5
exclude: ["affinity-designer", "ssh"]
include:
```* `backup_to`: String. Directory to save backups to (leading `~` is expanded to your home directory).
* `keep`: Integer. Number of backups to keep. Must be higher than zero.
* `exclude`: Array. By default, Tape backs up settings for every software it knows how, except the ones on this list.
* `include`: Array. If set, *only* these will be backed up and the `exclude` list will be ignored.To see what is included or excluded from backups, run `tape list`. To add to `include` or `exclude`, use the app token: the [name of the file](https://github.com/vitorgalvao/tape/tree/main/Definitions) without extension.
By default, Tape will backup its own configuration with the others.
## How it works
Tape backs up settings into compressed `.tgz` files. These are then used for restores when needed. This approach is conducive to experimentation, because as long as you keep a specific good configuration you can roll back to it.
## Usage
```console
$ tape help
Backup and restore software settings on macOSUsage:
tape backup Update definitions and backup settings
tape restore [def] Restore settings from previous backup
Giving a definition name restores only that software
tape list Show supported software separated by what will be backed up
tape launchd Load or unload an agent to perform daily backups
tape update Force update of backup definitions
tape version Show tape version
tape help Show this help
```If you intend to run Tape on-demand, run `tape backup` on occasion and you’re good to go. If you want to set it and forget it, run `tape launchd on` and it will automatically run backups for you everyday. Give them a look once in a blue moon to ensure everything is going smoothly.
## Supported software
Run `tape list` or check the [definitions](https://github.com/vitorgalvao/tape/tree/main/Definitions) to see what’s supported.
## Contributing
The whole script is the single file `tape` at the root. Pull requests will be reviewed but please keep changes manageable—multiple small contributions are preferred to a large one.
To add support for new software, use one of the [definitions](https://github.com/vitorgalvao/tape/tree/main/Definitions) as a starting point. Two tips:
* Use `mdls -raw -name kMDItemCFBundleIdentifier /path/to/the/app` to find the bundle identifier of an app.
* Plist files in `~/Library/Preferences` are likely safe to skip because those are closely tied to the bundle identifier, thus implicitly taken care of by normal Tape backups.## License
2-Clause BSD