38 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
9f9a4044a9 feat(resticw): Add a switch to run a diff on the latest snapshot (#129)
There's no obvious way to simply run a restic diff for the latest
snapshot against the previous one.

This simplifies the task to inspect the last snapshot changes. The user
only needs to run `sudo resticw --diff-latest` (optionally specifying a
profile).
2023-12-12 20:26:09 +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
e681b8fb6a Style fix 2023-11-01 15:27:08 +01:00
Erik Westrup
e5e5cea35e Windows: prevent backing up current directory
Don't process the array if there's no values to prevent issues on
Windows. See #125

Fixes #125
2023-11-01 15:22:31 +01:00
Erik Westrup
48ec2f9cf7 remove echo 2023-10-31 09:13:31 +01:00
Erik Westrup
2873f6a315 rename var for clarity 2023-09-25 18:34:47 +02:00
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
Erik Westrup
a870259eb2 Debug scripts with TRACE envvar 2023-06-02 22:32:09 +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
nettnikl
e072b6db14 Fix invalid syntax (#114) 2023-05-24 18:42:55 +02:00
Erik Westrup
184e426ec8 Allow spaces in extra args (#112)
* Allow spaces in extra args

Fixes #111

* Fix linter

* Preserve space by iterating
2023-05-21 23:19:43 +02:00
Erik Westrup
0dcb315296 Make check work with 'set -u' 2023-05-21 10:31:19 +02:00
nettnikl
e7fe75ca47 Make one env optional and warn about optional missing envs (#110)
* Make one env optional and warn about optional missing envs

* Restrict visibility of var

* Fix warning

* Dont print empty warning list
2023-05-21 10:31:11 +02:00
Erik Westrup
46ed2e4af8 Ignore resticw from linter 2023-03-08 11:49:14 +01:00
Erik Westrup
4fba6a3f10 Fix comment 2023-03-08 10:54:31 +01:00
Ante de Baas
347322d9c9 pre_backup commands (#107)
* pre_backup list

* add $INSTALL_PREFIX

* make it executable

* remove pre_backup.txt

* fix quotes

Co-authored-by: Erik Westrup <erik.westrup@gmail.com>

---------

Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
2023-03-08 10:53:20 +01:00
Erik Westrup
1b4d5ea24e Remove trailing space 2022-07-27 18:19:59 +02:00
Mikhail
fc6bd5a0be Add support saving hourly snapshots (#98) 2022-07-27 18:19:05 +02:00
Erik Westrup
f17848bed2 Fix notification stats bug with more than 2 latest snapshots 2022-04-29 20:11:49 +02:00
Erik Westrup
d5497b04b4 Add missing $INSTALL_PREFIX in help text 2022-04-29 17:57:33 +02:00
Erik Westrup
7ebeb00761 chmod a-x bin/*
The source files won't execute util after the build step. Remove
execution bit to not invite users to try to run these files.

Fixes #89
2022-02-27 22:14:21 +01:00
Erik Westrup
f4d1d6f1b2 chmod u+x bin/ to try execute scripts in build dir
before install step
2022-02-16 12:20:54 +01:00
Gerard Bosch
14f9741b82 Add docopt.sh option: DOCOPT_OPTIONS_FIRST=true
This will allow to use `resticw` as a true wrapper, enabling to pass
restic options through it, for example:

```
resticw --profile profileX snapshots --compact
```

will now be suported by the wraper :)
2022-02-16 12:19:44 +01:00
Erik Westrup
2c14351cd4 Document desktop notifications in README 2022-02-15 18:38:14 +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
Gerard Bosch
705248ee00 Final cleanup 2022-02-15 16:06:19 +01:00
Gerard Bosch
be2c3163a8 Rework notification data fetching: Use stats+diff 2022-02-15 13:50:10 +01:00
Erik Westrup
9449d78596 Made scripts optional 2022-02-13 19:15:55 +01:00
Erik Westrup
c1edb2efe1 Remove execution bit on bin/ as these are set when installing 2022-02-13 18:45:52 +01:00
Erik Westrup
71d0e8c5c1 dynamic fs args 2022-02-12 19:59:03 +01:00
Gerard Bosch
7dde85f25e Reformat 2022-02-12 10:02:03 +01:00
Gerard Bosch
9ebc9ea641 Replace 'here string' syntax with echo + pipe 2022-02-12 08:47:09 +01:00
Erik Westrup
5f3ebd5b9d resticw: fix install prefix 2022-02-11 10:27:35 +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
59da5da0da Fix resticw arguments line
It needs to be treated as an array so that complex commands like
`stats latest` work.
2022-02-08 18:51:20 +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