37 Commits

Author SHA1 Message Date
Gerard Bosch
de28285741 fix: Change INSTALL_PREFIX placeholder notation to templating notation (#131)
* refactor: Change INSTALL_PREFIX placeholder notation to templating notation

The former shell notation `$INSTALL_PREFIX` could result confusing. As
this is a placeholder that's replaced in the `make`, we switch it to a
template notation `{{ INSTALL_PREFIX }}`.

* docs: Small fix on README/manual setup

* docs(email-notif): Document the `{{ INSTALL_PREFIX }}` placeholder

co-authored-by: giuaig <13609224+giuaig@users.noreply.github.com>

* Update README.md

Co-authored-by: Gerard Bosch <30733556+gerardbosch@users.noreply.github.com>

---------

Co-authored-by: giuaig <13609224+giuaig@users.noreply.github.com>
Co-authored-by: Erik Westrup <erik.westrup@icloud.com>
2023-12-13 23:49:41 +05:30
Gerard Bosch
69e21d586c feat: Log the backup stats summary to a file (#128)
* docs: Fix typos and minor improvements

* feat: Log the backup stats summary to a CSV file

The log records the added, removed and snapshot size after each backup.

* feat: Add the snapshot ID to the stats log

* docs: Update README with the stats log info

* fix: Linter 1: Quote var

* fix: Linter 2: Shellcheck declare and assign separately

* feat: Turn the stats log into an opt-in
2023-12-12 20:05:13 +05:30
Erik Westrup
3cdf1503ae Revert "Allow extra args for non-backup commands (#115)"
This reverts commit 2406f078ef.

As of #120
2023-09-25 18:33:33 +02:00
nettnikl
2406f078ef Allow extra args for non-backup commands (#115)
* Allow extra args for non-backup commands

* Add example in doc

* Include global args in backup command

* Fix indent

* Restore set

* Modified: CHANGELOG.md

---------

Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
2023-06-02 22:28:52 +02:00
Mikhail
fc6bd5a0be Add support saving hourly snapshots (#98) 2022-07-27 18:19:05 +02:00
Matteo Mardegan
7c64d861ae correct the environtment file name 2022-03-22 09:27:26 +01:00
Erik Westrup
3ecc3c3510 Consistent default values 2022-02-15 17:47:51 +01:00
Erik Westrup
65172e650b Merge pull request #76 from gerardbosch/feature/desktop-notifications
Add optional desktop notifications
2022-02-15 17:45:07 +01:00
Erik Westrup
9449d78596 Made scripts optional 2022-02-13 19:15:55 +01:00
Erik Westrup
c50e66b48f Cron not using cron_email by default 2022-02-13 18:47:31 +01:00
Gerard Bosch
9ebc9ea641 Replace 'here string' syntax with echo + pipe 2022-02-12 08:47:09 +01:00
Gerard Bosch
3f000ce137 Add optional desktop notifications
When backing up a desktop system it is handy to have regular and
immediate feedback about backups. This features a notification of backup
stats summary, including the added size to the repository, so you can
have a quick follow-up about what are you uploading to the repository.

This may be very useful if you upload by accident a big file or directory
which should be in your exclusions, so it warns you and gives the chance
to fix the exclusions and remove the undesired snapshot later.
2022-02-09 18:19:48 +01:00
Gerard Bosch
8eb7d56fdd Update comment 2022-02-09 12:59:54 +01:00
Erik Westrup
b5dcce5d2a Adjust comment 2022-02-08 17:58:46 +01:00
Erik Westrup
e0139ff9c8 Address linter issues 2022-02-08 17:33:24 +01:00
Erik Westrup
ab928d0dfd Rename *.env files to *.env.sh
Fixes #66
2022-02-08 17:26:08 +01:00
Erik Westrup
645df1a0d4 Move /sbin to /bin
As more users would have /bin than /sbin in their PATH
2022-02-07 18:22:36 +01:00
Erik Westrup
1ee0e2c919 Fix cron with multiple profiles 2022-02-06 14:36:41 +01:00
Erik Westrup
9760cd05ec Truly support custom PREFIX= install
* Before, doing `$ PREFIX=/usr/local make install` would install files to`/usr/local/usr/local..` which is wrong
* With this PR, files will be installed to the expected location e.g. `/usr/local/etc/restic`
* `Makefile` almost completely rewritten
   * As e.g. `default.env` would source `_global.env`, `default.env` must be edited to find the right location of `_global.env` depending on what `$PREFIX` was set to.
   * see documented build stages in the `Makefile` itself.
   *  Made sure that the rules are correct so that only modifed files are installed, not all at once unnecessarily like before.
* A sub-goal was that the [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=restic-systemd-automatic-backup#n20) for Arch should not need to do any custom install configuration, to keep everything easier to maintain. `$ make install` should work out of the box for Arch.
* Additionally added the `-b` flag to `install(1)` that makes a backup of existing `etc/restic/*` files before installing a newer version.

Fixes #49
2022-02-03 20:52:00 +01:00
Erik Westrup
73bce43f7d s/TODO/*EDIT*/ to not confuse with development TODOs 2022-02-03 14:41:21 +01:00
Erik Westrup
dd073dfc73 Fix arguments by using arrays to buildup 2022-02-01 19:24:38 +01:00
Erik Westrup
79d13a1e64 Prefix envvars with RESTIC_ for consistencty
Fix #63
2022-02-01 16:59:12 +01:00
Erik Westrup
4e8b8adff6 Rename backup_exclude to backup_exclude.txt
Fixes #64
2022-02-01 16:52:20 +01:00
Erik Westrup
f4b90c2499 Add RESTIC_VERBOSITY_LEVEL
Fixes #50
2022-02-01 16:19:05 +01:00
Erik Westrup
341f3e79ec Allow extra args to restic-backup with RESTIC_BACKUP_EXTRA_ARGS
Fixes #56
2022-02-01 16:15:18 +01:00
Erik Westrup
a4cd65db5a Align terminology of credentials with B2
Fixes #59
2022-02-01 16:04:40 +01:00
Gerard Bosch
d8f25cdf88 Multiple profile configuration (#45)
Adds possibility to have multiple profiles with different backup paths, retention etc.

Co-authored-by: Matt Feifarek <matt.feifarek@gmail.com>
Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
2022-02-01 10:09:36 +01:00
Warren Volz
c7d702a1ed Fix conflicts for restic-check service 2020-06-01 18:04:41 -06:00
Todd E Johnson
e1d7d5cd20 Fix restic-check serivces to not start on metered connections 2019-07-15 21:09:06 -05:00
Todd E Johnson
d8c0a8d2d6 Add nm-unmetered-connection checks 2019-07-15 20:45:24 -05:00
Todd E Johnson
348fee95a5 Merge branch 'master' into 16-metered-net 2019-07-13 19:01:49 -05:00
Todd E Johnson
e3f01b7911 Move /.backup_exlude to /etc/restic/backup_exclude 2019-07-13 00:09:58 -05:00
Todd E Johnson
b4ab2f1a86 Add requires to unmetered-connection.service 2019-07-12 21:35:25 -05:00
Bill Kaguru Wanjohi
5f35a74bd1 use template files to improve security, reproducibility 2019-04-26 14:26:05 +00:00
Erik Westrup
47a129d2c6 Added cron example for FreeBSD 2018-07-01 10:59:11 +02:00
Erik Westrup
415be87690 Corrected placeholder names 2018-06-02 00:29:19 +02:00
Erik Westrup
6b3a3a7773 Put files in directory structure 2018-04-13 20:39:24 +02:00