Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f3d39dfe1 | ||
|
|
f7c13f7290 | ||
|
|
c07f0ca027 | ||
|
|
a084830441 | ||
|
|
7d67142b6e |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [5.3.0] - 2022-02-12
|
||||
### Added
|
||||
- Allow custom launchagent dir, used by Homebrew.
|
||||
|
||||
## [5.2.1] - 2022-02-11
|
||||
### Added
|
||||
- Homebrew Formula at [erikw/homebrew-tap](https://github.com/erikw/homebrew-tap). You can now install with `$ brew install erikw/tap/restic-automatic-backup-scheduler`!
|
||||
|
||||
### Fixed
|
||||
- Use default profile in LaunchAgent.
|
||||
|
||||
## [5.2.0] - 2022-02-11
|
||||
### Added
|
||||
- Make option to override destination dir for configuration files. Needed for Homebrew.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<array>
|
||||
<string>/bin/bash</string>
|
||||
<string>-c</string>
|
||||
<string>source /usr/local/etc/restic/erikw.env.sh && /usr/local/bin/restic_backup.sh >>$HOME/$LOG_OUT 2>>$HOME/$LOG_ERR</string>
|
||||
<string>source /usr/local/etc/restic/default.env.sh && /usr/local/bin/restic_backup.sh >>$HOME/$LOG_OUT 2>>$HOME/$LOG_ERR</string>
|
||||
</array>
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
|
||||
7
Makefile
7
Makefile
@@ -53,6 +53,9 @@ INSTALL_PREFIX := $(PREFIX)
|
||||
# Where to install persistent configuration files. Used by Homebrew.
|
||||
SYSCONFDIR := $(PREFIX)
|
||||
|
||||
# Where to install LaunchAgent. Used by Homebrew.
|
||||
LAUNCHAGENTDIR := $(PREFIX)
|
||||
|
||||
# Source directories.
|
||||
DIR_SCRIPT = bin
|
||||
DIR_CONF = etc/restic
|
||||
@@ -88,14 +91,14 @@ DEST_DIR_SCRIPT = $(PREFIX)/$(DIR_SCRIPT)
|
||||
DEST_DIR_CONF = $(SYSCONFDIR)/$(DIR_CONF)
|
||||
DEST_DIR_SYSTEMD = $(PREFIX)/$(DIR_SYSTEMD)
|
||||
DEST_DIR_CRON = $(PREFIX)/$(DIR_CRON)
|
||||
DEST_DIR_LAUNCHAGENT= $(HOME)/$(DIR_LAUNCHAGENT)
|
||||
DEST_DIR_LAUNCHAGENT= $(LAUNCHAGENTDIR)/$(DIR_LAUNCHAGENT)
|
||||
DEST_DIR_MAC_LOG = $(HOME)/Library/Logs/restic
|
||||
|
||||
# Destination file targets.
|
||||
DEST_TARGS_SCRIPT = $(addprefix $(PREFIX)/, $(SRCS_SCRIPT))
|
||||
DEST_TARGS_CONF = $(addprefix $(SYSCONFDIR)/, $(SRCS_CONF))
|
||||
DEST_TARGS_SYSTEMD = $(addprefix $(PREFIX)/, $(SRCS_SYSTEMD))
|
||||
DEST_TARGS_CRON = $(addprefix $(PREFIX)/, $(SRCS_CRON))
|
||||
DEST_TARGS_CRON = $(addprefix $(LAUNCHAGENTDIR)/, $(SRCS_CRON))
|
||||
DEST_TARGS_LAUNCHAGENT = $(addprefix $(HOME)/, $(SRCS_LAUNCHAGENT))
|
||||
|
||||
INSTALLED_FILES = $(DEST_TARGS_SCRIPT) $(DEST_TARGS_CONF) \
|
||||
|
||||
11
README.md
11
README.md
@@ -6,6 +6,7 @@
|
||||
[](https://github.com/erikw/restic-systemd-automatic-backup/tags)
|
||||
[](https://aur.archlinux.org/packages/restic-systemd-automatic-backup/)
|
||||
[](https://aur.archlinux.org/packages/restic-systemd-automatic-backup/)
|
||||
[](https://github.com/erikw/homebrew-tap)
|
||||
[](https://github.com/erikw/restic-systemd-automatic-backup/issues)
|
||||
[](https://github.com/erikw/restic-systemd-automatic-backup/issues?q=is%3Aissue+is%3Aclosed)
|
||||
[](https://github.com/erikw/restic-systemd-automatic-backup/pulls?q=is%3Apr+is%3Aclosed)
|
||||
@@ -265,6 +266,13 @@ straightforward (it needs to run with sudo to read environment). Just run:
|
||||
LaunchAgent is the modern service scheduler in in macOS that uses [Launchd](https://www.launchd.info/).
|
||||
[Launchd](https://www.launchd.info/) is the modern built-in service scheduler in macOS. It has support for running services as root (Daemon) or as a normal user (Agent). Here we set up an LauchAgent to be run as your normal user for starting regular backups.
|
||||
|
||||
### Homebrew
|
||||
With Homebrew you can easily install this project from the [erikw/homebrew-tap](https://github.com/erikw/homebrew-tap):
|
||||
```console
|
||||
$ brew install erikw/tap/restic-automatic-backup-scheduler
|
||||
```
|
||||
|
||||
### Manual
|
||||
1. In general, follow the same setup as in (#setup-linux-systemd) except for:
|
||||
* use `make install-launchagent` instead of `make install-systemd`
|
||||
* install everything to `/usr/local` and run restic as your own user, not root
|
||||
@@ -331,4 +339,5 @@ To make a new release:
|
||||
$ git tag vX.Y.Z
|
||||
$ git push && git push --tags
|
||||
```
|
||||
1. Test and update the AUR [PKGBUILD](https://aur.archlinux.org/packages/restic-systemd-automatic-backup/) if needed.
|
||||
1. Update version in the AUR [PKGBUILD](https://aur.archlinux.org/packages/restic-systemd-automatic-backup/).
|
||||
1. Update version in the Homebrew [Formula](https://github.com/erikw/homebrew-tap/blob/main/Formula/restic-automatic-backup-scheduler.rb).
|
||||
|
||||
Reference in New Issue
Block a user