Rename backup launchagent
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<string>com.github.erikw.restic-automatic-backup-scheduler</string>
|
<string>com.github.erikw.restic-backup</string>
|
||||||
<key>ProgramArguments</key>
|
<key>ProgramArguments</key>
|
||||||
<!-- exec in subshell to 1) source *.env.sh 2) expand $HOME to logpath (ref. https://apple.stackexchange.com/a/365880/197493) -->
|
<!-- exec in subshell to 1) source *.env.sh 2) expand $HOME to logpath (ref. https://apple.stackexchange.com/a/365880/197493) -->
|
||||||
<array>
|
<array>
|
||||||
@@ -52,7 +52,7 @@ MKDIR_PARENTS=sh -c '\
|
|||||||
|
|
||||||
# LaunchAgent names.
|
# LaunchAgent names.
|
||||||
UID := $(shell id -u)
|
UID := $(shell id -u)
|
||||||
LAUNCHAGENT = com.github.erikw.restic-automatic-backup-scheduler
|
LAUNCHAGENT = com.github.erikw.restic-backup
|
||||||
LAUNCHAGENT_TARGET = gui/$(UID)/$(LAUNCHAGENT)
|
LAUNCHAGENT_TARGET = gui/$(UID)/$(LAUNCHAGENT)
|
||||||
|
|
||||||
# What to substitute $INSTALL_PREFIX in sources to.
|
# What to substitute $INSTALL_PREFIX in sources to.
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ Many Linux distributions nowadays use [Systemd](https://en.wikipedia.org/wiki/Sy
|
|||||||
```
|
```
|
||||||
1. Configure [how often](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html#//apple_ref/doc/uid/10000172i-CH1-SW1) backups should be done. If needed, edit `OnCalendar` in
|
1. Configure [how often](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html#//apple_ref/doc/uid/10000172i-CH1-SW1) backups should be done. If needed, edit `OnCalendar` in
|
||||||
* Homebrew install: `~/Library/LaunchAgents/homebrew.mxcl.restic-automatic-backup-scheduler.plist`.
|
* Homebrew install: `~/Library/LaunchAgents/homebrew.mxcl.restic-automatic-backup-scheduler.plist`.
|
||||||
* `make` install: `~/Library/LaunchAgents/com.github.erikw.restic-automatic-backup-scheduler.plist`.
|
* `make` install: `~/Library/LaunchAgents/com.github.erikw.restic-backup.plist`.
|
||||||
1. Enable automated backup for starting with the system & make the first backup:
|
1. Enable automated backup for starting with the system & make the first backup:
|
||||||
* Homebrew install:
|
* Homebrew install:
|
||||||
```console
|
```console
|
||||||
@@ -141,9 +141,9 @@ Many Linux distributions nowadays use [Systemd](https://en.wikipedia.org/wiki/Sy
|
|||||||
```
|
```
|
||||||
* `make` install:
|
* `make` install:
|
||||||
```console
|
```console
|
||||||
$ launchctl bootstrap gui/$UID ~/Library/LaunchAgents/com.github.erikw.restic-automatic-backup-scheduler.plist
|
$ launchctl bootstrap gui/$UID ~/Library/LaunchAgents/com.github.erikw.restic-backup.plist
|
||||||
$ launchctl enable gui/$UID/com.github.erikw.restic-automatic-backup-scheduler
|
$ launchctl enable gui/$UID/com.github.erikw.restic-backup
|
||||||
$ launchctl kickstart -p gui/$UID/com.github.erikw.restic-automatic-backup-scheduler
|
$ launchctl kickstart -p gui/$UID/com.github.erikw.restic-backup
|
||||||
```
|
```
|
||||||
As a convenience, a shortcut for the above commands are `$ make activate-launchagent`.
|
As a convenience, a shortcut for the above commands are `$ make activate-launchagent`.
|
||||||
1. Watch the first backup progress from the log files:
|
1. Watch the first backup progress from the log files:
|
||||||
@@ -168,15 +168,15 @@ $ brew services stop restic-automatic-backup-scheduler
|
|||||||
|
|
||||||
If `services start` fails, it might be due to previous version installed. In that case remove the existing version and try again:
|
If `services start` fails, it might be due to previous version installed. In that case remove the existing version and try again:
|
||||||
```console
|
```console
|
||||||
$ launchctl bootout gui/$UID/com.github.erikw.restic-automatic-backup-scheduler
|
$ launchctl bootout gui/$UID/com.github.erikw.restic-backup
|
||||||
$ brew services start restic-automatic-backup-scheduler
|
$ brew services start restic-automatic-backup-scheduler
|
||||||
```
|
```
|
||||||
|
|
||||||
### Make Setup Notes
|
### Make Setup Notes
|
||||||
Use the `disable` command to temporarily pause the agent, or `bootout` to uninstall it.
|
Use the `disable` command to temporarily pause the agent, or `bootout` to uninstall it.
|
||||||
```
|
```
|
||||||
$ launchctl disable gui/$UID/com.github.erikw.restic-automatic-backup-scheduler
|
$ launchctl disable gui/$UID/com.github.erikw.restic-backup
|
||||||
$ launchctl bootout gui/$UID/com.github.erikw.restic-automatic-backup-scheduler
|
$ launchctl bootout gui/$UID/com.github.erikw.restic-backup
|
||||||
```
|
```
|
||||||
|
|
||||||
If you updated the `.plist` file, you need to issue the `bootout` followed by `bootrstrap` and `enable` sub-commands of `launchctl`. This will guarantee that the file is properly reloaded.
|
If you updated the `.plist` file, you need to issue the `bootout` followed by `bootrstrap` and `enable` sub-commands of `launchctl`. This will guarantee that the file is properly reloaded.
|
||||||
|
|||||||
Reference in New Issue
Block a user