aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Mention that lifeboat adds $HOME/bin to its $PATHHEADmasterWolfgang Müller2024-10-11-1/+17
|
* Squash SC2086 for exports0.4.2Wolfgang Müller2023-05-16-4/+4
| | | | | | | | Technically the quotes here should not be needed, but shellcheck still emits an error for them (see [1]). Quoting doesn't hurt here, so just do that. [1] https://github.com/koalaman/shellcheck/issues/2443
* Continue execution if a sync target fails0.4.1Wolfgang Müller2023-05-16-1/+1
| | | | | | | | | lifeboat runs with 'set -e', meaning it stops executing whenever a command invoked by it fails. This means that the entire script stops if rclone fails - potentially ignoring future sync targets. Make sure we catch any failure on rclone's side so the script can continue.
* Check pack files for integrity0.4.0Wolfgang Müller2021-11-14-1/+1
| | | | | | | | | | | | The check command does not verify the actual pack files by default, since restic needs to read each one and the repository may be hosted on a cloud repository where downloads are expensive. Since we are working with local repositories, checking for integrity is not that expensive. However, to ease the daily burden, use the --read-data-subset option to check only a random 10% of the repository. After a couple of weeks, then, we can be reasonably sure that, if no errors were raised, the repository is still intact.
* Mention the name of the backup in report_backup0.3.1Wolfgang Müller2021-05-03-1/+1
| | | | | | Currently, multiple backups on the same host are hard to identify, so print out the repo name instead of the hostname (which is visible in the From header anyway).
* Add systemd service and timer0.3.0Wolfgang Müller2021-04-30-0/+49
| | | | | | | | | The service unit is based on lifeboat defaults and will make sure that restic-priv can be invoked with CAP_DAC_READ_SEARCH whilst locking down other forms of privilege escalation. The timer is mostly for convenient overriding in lifeboat@.timer.d/. We expect users to adjust this as necessary for their purposes.
* Add command to mail the output of a backup runWolfgang Müller2021-04-30-1/+28
| | | | | | | | | | | | | | | | | | | | This commit introduces the 'run-report' command and a new config file 'config/recipient' which indicates the recipient of the report. Since lifeboat was always intended to be run via a cronjob, we assumed mail functionality would come from the specific crond implementation. This is well-supported throughout, but not a feature that systemd's timers (yet?) have. Since one of our systems is now running systemd, we needed a decent alternative. A wrapper script was considered, but at that point we could also just as simply include mail support in lifeboat itself. We have chosen to implement this by calling out to sendmail, which seems to be a de-facto standard (postfix has sendmail compatibility, as does msmtp). It should be available on a wide range of systems. For now, hardcode the message headers and send mail to one recipient only. Set the X-Report header for simple filtering by mail clients.
* Update name and add .mailmap for consistencyWolfgang Müller2021-03-10-2/+3
|
* Make sure to return successfully if config/sync is missing0.2.1Wynn Wolf Arbor2020-09-17-1/+1
| | | | | | | | | | | | | In sync_default, we test whether the config/sync file exists before reading from it. If it does not exist, we return from the function using the exit status of the last command (test), which in this case is 1. For default setups that do not specify a config/sync file, this will lead to the script as a whole exiting unsuccessfully even though no error occurred. Make sure to set the exit status to 0 in order to signal successful completion of the sync task. Reported-by: Jan Rathner <jarainf@freenode>
* Remove unnecessary quotes0.2.0Wynn Wolf Arbor2020-06-04-1/+1
|
* Exit unsuccessfully in usage()Wynn Wolf Arbor2020-06-04-1/+1
| | | | | The command must not have completed successfully if usage() was called, so indicate this to the user as well.
* Remove superfluous subshell from run_backup()Wynn Wolf Arbor2020-06-04-11/+9
|
* Simplify and improve sync_defaultWynn Wolf Arbor2020-06-04-16/+13
| | | | | | | | | sync_default() suffers from needlessly complicated logic in its threshold test. Join the two if clauses together and skip targets cleanly by using `continue` instead. Where possible, use OR lists instead of if clauses and also inline the whole sync_single() function, which was only called from here.
* Use LIFEBOAT_ROOT directly throughout the scriptWynn Wolf Arbor2020-06-04-6/+6
| | | | | Instead of using another variable name to refer to the value of LIFEBOAT_ROOT or its default, use LIFEBOAT_ROOT directly.
* Clarify directory structure and invocation in the manualWynn Wolf Arbor2020-02-08-2/+5
|
* Be more specific about the destination format in the manualWynn Wolf Arbor2020-02-08-1/+15
|
* Fix name of environment variable in the manualWynn Wolf Arbor2020-02-08-1/+1
|
* Introduce default fallback jobsWynn Wolf Arbor2020-02-01-16/+93
| | | | | | | | When before lifeboat was expecting the user to populate the run, post, and sync scripts, now it includes a sane default for each step of the backup process, making deployments much more simple. The post script was split up into retain and clean.
* Include $HOME/bin in PATH by default when running scriptsWynn Wolf Arbor2020-02-01-0/+1
|
* Update name and mail address0.1.3Wynn Wolf Arbor2020-01-17-3/+3
|
* Use correct path to check whether repo exists0.1.2Wynn Wolf Arbor2020-01-14-1/+1
|
* Have the Makefile install the manual0.1.1Wolfgang Müller2019-10-03-1/+2
|
* Initial import0.1.0Wolfgang Müller2019-10-03-0/+154