Commit Graph

77 Commits

Author SHA1 Message Date
Erik Westrup
f7c13f7290 Add homebrew formula
Fixes #73
2022-02-11 23:06:17 +01:00
Erik Westrup
8111a5f663 Bash is dependency 2022-02-10 10:58:41 +01:00
Gerard Bosch
1db2395353 Minor typos 2022-02-09 18:41:20 +01:00
Erik Westrup
caf95ef393 Add make target to activate launchagent 2022-02-09 17:16:18 +01:00
Erik Westrup
99b0bf5ac5 Modified: README.md 2022-02-09 16:29:14 +01:00
Erik Westrup
d20954b9f4 Modified: README.md 2022-02-09 15:58:26 +01:00
Erik Westrup
991476715a install instructions 2022-02-09 15:56:37 +01:00
Erik Westrup
1977b3c67f Add OS icons 2022-02-09 15:31:42 +01:00
Erik Westrup
d38616d697 Path working 2022-02-09 14:58:31 +01:00
Erik Westrup
c8ab0b4421 iterate 2022-02-09 14:04:07 +01:00
Erik Westrup
f7f69a0142 instructions 2022-02-09 13:32:19 +01:00
Erik Westrup
db26c4e517 Launch instructions 2022-02-09 13:08:12 +01:00
Erik Westrup
ab928d0dfd Rename *.env files to *.env.sh
Fixes #66
2022-02-08 17:26:08 +01:00
Gerard Bosch
2dbd618344 Fix README: Enabling/starting systemd unit (#69)
systemctl start restic-backup@default.timer was failing with the following message:

```console
❯ sudo systemctl start restic-backup@default.timer
Failed to start restic-backup@default.timer: Unit nm-unmetered-connection.service failed to load properly, please adjust/correct and reload service manager: Device or resource busy
See system logs and 'systemctl status restic-backup@default.timer' for details.
```

and by doing `systemctl daemon-reload` before that command solved the issue.

But according to `man systemd` in order to avoid this, it seems that `enable` command must be issued before `start`, as it reloads the system manager configuration (in a way equivalent to daemon-reload). So, once properly sorted, it seems that both commands can be fused into a single `enable --now` command :)
2022-02-08 16:43:30 +01:00
Gerard Bosch
b4684d3cfb Fix README: Backup frequency (#68) 2022-02-08 13:01:32 +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
0fc7c29c2f Push image down 2022-02-06 15:26:43 +01:00
Erik Westrup
a57971e27e Add navigation tip 2022-02-06 15:25:45 +01:00
Erik Westrup
eb6e7b4a8d Begin structure README after system setup 2022-02-06 15:16:19 +01:00
Erik Westrup
8db3d27174 Rename top-level install targets
"make install" -> "make install-systemd"
so that I could now add a
""make install-cron"
target.

Soon there will be
"make install-macos"
"make install-windows"

Thus it does not make sense to have a general `make install` anymore.
2022-02-06 14:49:00 +01:00
Erik Westrup
21bb0535ee Note about make needing to be GNU make 2022-02-05 15:56:32 +01:00
Erik Westrup
dc28ad2b52 Update README.md
Co-authored-by: Gerard Bosch <30733556+gerardbosch@users.noreply.github.com>
2022-02-05 15:28:14 +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
90358c4f7a README: project scope 2022-02-01 19:51:35 +01:00
Erik Westrup
629fd4c182 Align tag badge next to aur ver badge 2022-02-01 18:05:02 +01:00
Erik Westrup
b3c64ca2ee Add lint badge 2022-02-01 17:37:23 +01:00
Erik Westrup
f1304f7db9 Modified: README.md 2022-02-01 17:20:00 +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
a4cd65db5a Align terminology of credentials with B2
Fixes #59
2022-02-01 16:04:40 +01:00
Erik Westrup
c51e5ffb03 Add release instructions 2022-02-01 13:31:56 +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
Erik Westrup
16dbe699ab Revert "Empty line"
This reverts commit a011bb6dd2.
2022-01-30 20:09:26 +01:00
Erik Westrup
a011bb6dd2 Empty line 2022-01-30 20:09:07 +01:00
Erik Westrup
15a02d4bd3 Add note about Make as recommended reqirements for installing 2022-01-19 12:02:20 +01:00
Erik Westrup
3a51ffb795 Modified: README.md 2022-01-18 12:01:58 +01:00
Erik Westrup
1b57069d30 README: anecdotal pricing 2022-01-18 12:00:29 +01:00
Erik Westrup
9cb85a8571 Add notes to README about development 2022-01-17 15:51:33 +01:00
Erik Westrup
9e292218cf Spell fix 2022-01-17 13:16:49 +01:00
Erik Westrup
36a90b963e Fix URL 2022-01-01 13:59:45 +01:00
Erik Westrup
5a3c8afb43 Link to #44
Fixes #44
2022-01-01 13:58:33 +01:00
Erik Westrup
aff6211407 Modified: README.md 2021-12-18 11:11:11 +01:00
Erik Westrup
ceac35abc8 Remove SLOC badge 2021-12-03 19:51:24 +01:00
Erik Westrup
bf9b29575a Update README.md 2021-12-03 18:16:39 +01:00
Erik Westrup
99f4ba4436 Add AUR maintainer badge 2021-12-02 15:31:33 +01:00
Erik Westrup
ae2b122134 Add AUR instructions 2021-12-02 15:28:40 +01:00
Erik Westrup
8e1853458c Add AUR badge 2021-12-02 15:26:55 +01:00
Erik Westrup
d34fbfc9d3 Modified: README.md 2021-12-01 18:07:12 +01:00
Erik Westrup
213fb95bdc Modified: README.md 2021-12-01 18:05:19 +01:00