61 Commits

Author SHA1 Message Date
Erik Westrup
3089709038 Add semver-cli and devcontainers 2025-03-04 15:14:59 +00: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
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
20b5fd301e Modified: CHANGELOG.md 2023-05-21 10:32:10 +02:00
Erik Westrup
7bc0e33779 Update CHANGELOG.md 2023-03-08 11:26:48 +01:00
Erik Westrup
86d841a72b Modified: CHANGELOG.md 2023-03-08 10:55:39 +01:00
Erik Westrup
b7f250f345 Modified: CHANGELOG.md 2022-07-27 18:19:21 +02:00
Erik Westrup
811a5c3c8c Full path /bin/bash in systemd services
Fixes #96
2022-06-07 09:25:27 +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
855997d7d7 Update CHANGELOG.md 2022-04-14 09:35:27 +02:00
Erik Westrup
77b5a2c653 Update CHANGELOG.md 2022-04-11 21:09:18 +02:00
Erik Westrup
6a43b95222 Fix systemd service OnFailure
Fixes #86
2022-04-11 17:48:00 +02:00
Erik Westrup
d5a141fc9a Modified: CHANGELOG.md 2022-02-16 12:23:59 +01:00
Erik Westrup
4952cc3ee1 Modified: CHANGELOG.md 2022-02-15 17:49:11 +01:00
Erik Westrup
c5c4da3618 Modified: CHANGELOG.md 2022-02-15 12:43:52 +01:00
Erik Westrup
92205981b6 Modified: CHANGELOG.md 2022-02-15 12:42:51 +01:00
Erik Westrup
148e43c8c3 Collected changes 2022-02-14 15:47:49 +01:00
Erik Westrup
3a8ca5a815 Modified: CHANGELOG.md 2022-02-13 19:20:15 +01:00
Erik Westrup
37e38b4cb5 Modified: CHANGELOG.md 2022-02-13 19:20:02 +01:00
Erik Westrup
eac8b97932 Modified: CHANGELOG.md 2022-02-13 17:53:36 +01:00
Erik Westrup
96e9bc23ab replace old with new name 2022-02-13 16:39:25 +01:00
Erik Westrup
3b08a42495 Modified: CHANGELOG.md 2022-02-12 20:43:25 +01:00
Erik Westrup
399e7cd4ce Fix launchagent macro 2022-02-12 17:40:26 +01:00
Erik Westrup
0f3d39dfe1 Custom launchagent dir 2022-02-12 17:33:29 +01:00
Erik Westrup
f7c13f7290 Add homebrew formula
Fixes #73
2022-02-11 23:06:17 +01:00
Erik Westrup
c07f0ca027 Modified: CHANGELOG.md 2022-02-11 22:13:53 +01:00
Erik Westrup
a084830441 Modified: CHANGELOG.md 2022-02-11 22:13:41 +01:00
Erik Westrup
b838ebcb1a Modified: CHANGELOG.md 2022-02-11 22:08:10 +01:00
Erik Westrup
fc01b56e1e Modified: CHANGELOG.md 2022-02-11 21:47:34 +01:00
Erik Westrup
0c43f93901 Modified: CHANGELOG.md 2022-02-11 20:45:49 +01:00
Erik Westrup
4cae1ca2f0 Update CHANGELOG.md
Fixes #51
2022-02-09 17:23:09 +01:00
Erik Westrup
2f4f48a59b Modified: CHANGELOG.md 2022-02-09 13:09:10 +01:00
Erik Westrup
e0139ff9c8 Address linter issues 2022-02-08 17:33:24 +01:00
Erik Westrup
78f5cb7b62 Modified: CHANGELOG.md 2022-02-08 17:27:22 +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
54e2d17e23 Modified: CHANGELOG.md Makefile 2022-02-06 15:28:56 +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
Gerard Bosch
3852e305b6 Add resticw (restic wrapper) utility (#60)
The script provides a convenient way to load environment config, deal
with profiles and act as a pass-through to restic. The overall thing is
to improve the UX when running restic, integrating the features this
project provides.

## Note

The script itself is a very simple thing.
The command line parser is auto-generated using docopt.sh driven from
the script's DOC. It can be refreshed upon DOC changes with:
`docopt.sh path/to/resticw`.

## How to use it

### Examples

```console
sudo resticw stats latest

sudo resticw -p profileA snapshots
```

### Help

```console
❯ resticw --help
A little wrapper over restic just to handle profiles and environment loading.

  It loads the backup profile/environment in a subshell to avoid any credential leak (Note: Run it with sudo so it can load the environment).

  Usage:
    resticw [options] <restic_arguments>

    The restic_arguments is just the regular unwrapped restic arguments, e.g. stats latest

  Options:
    -p --profile=<name>        Specify the profile to load or use default [default: default].

  Examples:
    sudo resticw --profile profileA snapshots
    sudo resticw stats latest  # this will use the profile: default
```



Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
2022-02-03 20:40:45 +01:00
Erik Westrup
7f3647fb0c Rel should have been major as of breaking change 2022-02-01 19:41:02 +01:00
Erik Westrup
dd073dfc73 Fix arguments by using arrays to buildup 2022-02-01 19:24:38 +01:00
Erik Westrup
b23d552f0b Allow set but empty envvars 2022-02-01 18:31:27 +01:00
Erik Westrup
4142dbf20e Modified: CHANGELOG.md 2022-02-01 18:18:21 +01:00
Erik Westrup
fad429fd34 Add shellcheck linter workflow
Fixes #57
2022-02-01 17:19:08 +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
687111fddf Assert that all envvars are set in scripts
Remind user to source profile before executing.

Fixes #62
2022-02-01 16:45:19 +01:00
Erik Westrup
f4b90c2499 Add RESTIC_VERBOSITY_LEVEL
Fixes #50
2022-02-01 16:19:05 +01:00