An open API service indexing awesome lists of open source software.

https://github.com/rjkroege/kopialauncher

MacOS launch wrapper for Kopia
https://github.com/rjkroege/kopialauncher

Last synced: 18 days ago
JSON representation

MacOS launch wrapper for Kopia

Awesome Lists containing this project

README

          

`kopialauncher` is a wrapper for the [Kopia](https://kopia.io) backup program on MacOS. It
adds backing up from an APFS snapshot so that snapshots never need to
be in an filesystem inconsistent state. Tested only on Big Sur x86.

Use it from `launchagent` per [this stackoverflow](https://stackoverflow.com/questions/49289890/error-code-9216-when-attempting-to-access-keychain-password-in-launchagent).

# Building
`go install github.com/rjkroege/kopialauncher` should be sufficient.

# launchagent
Stick this in `~/Library/LaunchAgents/com.zerowidth.launched.gounodkopia.plist` after replacing
`YOUR_GCS_CRED_JSON_FILE` and `YOUR_HOME_DIR` with appropriate personalized values.

Note if you (e.g. I) am using the Storj Kopia backend that I ought to
finish upstreaming, the credentials story is different. Also note that
the previous GCS credential support needs to come back if you
want to use GCS as a backing store. I should make it configurable.

```

Label
com.zerowidth.launched.gounodkopia
Program
/usr/local/bin/kopialauncher
StartInterval
3600
EnvironmentVariables

GOOGLE_APPLICATION_CREDENTIALS
YOUR_GCS_CRED_JSON_FILE
HOME
YOUR_HOME_DIR

```

# Commands
Turn on like so:

```
# Start
launchctl enable user/`{id -u}/com.zerowidth.launched.gounodkopia
launchctl bootstrap gui/`{id -u} $_h/Library/LaunchAgents/com.zerowidth.launched.gounodkopia.plist

# Stop
launchctl bootout gui/`{id -u}/com.zerowidth.launched.gounodkopia
launchctl disable user/`{id -u}/com.zerowidth.launched.gounodkopia

# Kick
launchctl kickstart gui/`{id -u}/com.zerowidth.launched.gounodkopia
```

# Debugging
Use the MacOS Console app to go hunting for `kopialauncher-*` in the "Log Reports" section.