Commit Graph

56 Commits

Author SHA1 Message Date
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
Erik Westrup
ae228186eb Add badges 2021-12-01 18:02:53 +01:00
Erik Westrup
77c095c12a Consistent code markup for console 2021-10-30 13:37:39 +02:00
Gerard Bosch
28dece45ae Update README: Add uninstall instructions 2021-10-30 13:29:48 +02:00
Erik Westrup
6e24a66a1c Add restic version requirements to README.md
Fixes #32
2021-10-29 17:16:16 +02:00
Erik Westrup
e5502b0655 s/``bash/``console/ in README 2021-07-11 18:28:08 +02:00
Steven H. Wang
e943e94f05 README: Fix backup_exclude destination
restic_backup.sh doesn't actually look for `/.backup_exclude` it seems
2020-01-21 16:46:55 -08:00
Erik Westrup
71f1bd8e61 Fix #25: correct b2_password.txt 2020-01-20 20:47:52 +01:00
Toni Lähdekorpi
7807b7d09f Change README to point to the HTTPS repo
Most people probably want to clone from the repo over HTTPS, not git+ssh.
The latter usually requiring permissions:
> fatal: Could not read from remote repository.
> Please make sure you have the correct access rights
2018-10-27 18:55:50 +03:00
Erik Westrup
5f32e504c2 README fix 2018-09-24 20:15:20 +02:00
Erik Westrup
876a18d879 Merge pull request #7 from bobsaintcool/doc/rm_quote
<README: Remove useless double quote>
2018-09-24 20:14:24 +02:00
Erik Westrup
768d9837ed README fix 2018-09-24 20:13:39 +02:00
Quentin Bourgeois
08cf6f2d3f <README: Remove useless double quote> 2018-09-24 20:03:57 +02:00
Quentin Bourgeois
7380019ab5 <README: Add some missing word>
Give a big overview on how proposed automated backup works.
2018-09-24 20:00:33 +02:00
Wyatt Johnson
d1486df017 fix: start the timer after enabling it 2018-09-04 22:23:55 +00:00
Erik Westrup
ec4b86a97d Added Makefile for installation of files 2018-08-31 21:06:01 +02:00
Julian Robbins
57b54afd4f Correct a couple of minor typos 2018-08-30 21:25:23 +01:00
Erik Westrup
f50055f26a Let journalctl be the log file maintainer
Fixes #3
2018-08-26 15:54:35 +02:00
Erik Westrup
47a129d2c6 Added cron example for FreeBSD 2018-07-01 10:59:11 +02:00
Erik Westrup
e35b817157 Added snapshots commands 2018-06-02 11:36:51 +02:00
Erik Westrup
d330956666 Formulations 2018-06-02 11:35:37 +02:00
Erik Westrup
83d38357a7 Fixed title 2018-06-02 11:34:00 +02:00