wrap tarsnapper via backitup

The default period is set to daily, so this doesn't change anything for
existing users -- except that now we default to only executing on AC
power. If existing users want to match the previous behavior they should
set `tarsnapper.ac_power` to `false`.
This commit is contained in:
Pig Monkey 2017-07-11 20:55:32 -07:00
parent 9a96350452
commit bcf52c7c29
7 changed files with 58 additions and 45 deletions

View file

@ -207,26 +207,37 @@ and cache directory, users should recover their jobs files from backups after
the Tarsnapper install is complete. See the Tarsnapper documentation for more
details.
### Scheduling Tarsnap
### Running Tarsnap
A systemd unit file and timer are included for Tarsnapper. The timer is set to
execute Tarsnapper hourly (configurable through the `tarsnapper.timer.schedule`
variable). However, as with `mailsync` this timer is not started or enabled by
default. Instead, the timer is added to `/usr/local/etc/trusted_units`, causing
the NetworkManager trusted unit dispatcher to activate the timer whenever a
A systemd unit file and timer are included for Tarsnapper. Rather than calling
it directly, the systemd unit wraps Tarsnapper with [backitup][22].
The timer is set to execute the unit hourly, but backitup will only call
Tarsnapper once within the period defined in the `tarsnapper.period` variable.
This defaults to `DAILY`. This increases the likelyhood of completing daily
backups by checking each hour if the unit has run succesfully on the current
calendar day.
In addition to the period limitation, backitup defaults to only calling
Tarsnapper when it detects the machine ison AC power. To allow Tarsnapper to
run when on battery, set the `tarsnapper.ac_only` variable to `False`.
As with `mailsync`, the timer is not started or enabled by default. Instead,
the timer is added to `/usr/local/etc/trusted_units`, causing the
NetworkManager trusted unit dispatcher to activate the timer whenever a
connection is established to a trusted network. The timer is stopped whenever
the network goes down or a connection is established to an untrusted network.
To have the timer activated at boot, change the `tarsnapper.timer.run_on`
variable from `trusted` to `all`.
To have the timer activated at boot, change the `tarsnapper.run_on` variable
from `trusted` to `all`.
If the `tarsnapper.tarsnap.run_on` variable is set to anything other than
`trusted` or `all`, the timer will never be activated.
If the `tarsnapper.run_on` variable is set to anything other than `trusted` or
`all`, the timer will never be activated.
## Tor
[Tor][22] is installed by default. A systemd service unit for Tor is installed,
[Tor][23] is installed by default. A systemd service unit for Tor is installed,
but not enabled or started. instead, the service is added to
`/usr/local/etc/trusted_units`, causing the NetworkManager trusted unit
dispatcher to activate the service whenever a connection is established to a
@ -241,14 +252,14 @@ configuration.
### parcimonie.sh
[parcimonie.sh][23] is provided to periodically refresh entries in the user's
[parcimonie.sh][24] is provided to periodically refresh entries in the user's
GnuPG keyring over the Tor network. The service is added to
`/usr/local/etc/trusted_units` and respects the `tor.run_on` variable.
## BitlBee
[BitlBee][24] and [WeeChat][25] are used to provide chat services. A systemd
[BitlBee][25] and [WeeChat][26] are used to provide chat services. A systemd
service unit for BitlBee is installed, but not enabled or started by default.
Instead, the service is added to `/usr/local/etc/trusted_units`, causing the
NetworkManager trusted unit dispatcher to activate the service whenever a
@ -267,7 +278,7 @@ remove the `bitlebee.torify` variable or disable Tor entirely by removing the
## git-annex
[git-annex][26] is installed for file syncing. A systemd service unit for the
[git-annex][27] is installed for file syncing. A systemd service unit for the
git-annex assistant is enabled and started by default. To prevent this, remove
the `gitannex` variable from the config.
@ -287,7 +298,7 @@ networks.
## PostgreSQL
[PostgreSQL][27] is installed and enabled by default. If the
[PostgreSQL][28] is installed and enabled by default. If the
`postgresql.enable` variable is set to anything other than `True` or is not
defined, the service will not be started or enabled.
@ -301,8 +312,8 @@ database service inappropriate for production use.
## Himawaripy
[Himawaripy][28] is provided to fetch near-realtime photos of Earth from the
Japanese [Himawari 8][29] weather satellite and set them as the user's desktop
[Himawaripy][29] is provided to fetch near-realtime photos of Earth from the
Japanese [Himawari 8][30] weather satellite and set them as the user's desktop
background via feh. This should provide early warning of the presence of any
Vogon constructor fleets appearing over the Eastern Hemisphere.
@ -346,11 +357,12 @@ By completely removing the `himawaripy` variable, no related tasks will be run.
[19]: https://www.tarsnap.com/
[20]: https://www.tarsnap.com/gettingstarted.html
[21]: https://github.com/miracle2k/tarsnapper
[22]: https://www.torproject.org/
[23]: https://github.com/EtiennePerot/parcimonie.sh
[24]: https://www.bitlbee.org/main.php/news.r.html
[25]: https://weechat.org/
[26]: https://git-annex.branchable.com/
[27]: http://www.postgresql.org/
[28]: https://github.com/boramalper/himawaripy
[29]: https://en.wikipedia.org/wiki/Himawari_8
[22]: https://github.com/pigmonkey/backitup
[23]: https://www.torproject.org/
[24]: https://github.com/EtiennePerot/parcimonie.sh
[25]: https://www.bitlbee.org/main.php/news.r.html
[26]: https://weechat.org/
[27]: https://git-annex.branchable.com/
[28]: http://www.postgresql.org/
[29]: https://github.com/boramalper/himawaripy
[30]: https://en.wikipedia.org/wiki/Himawari_8