9 Commits

Author SHA1 Message Date
Erik Westrup
d01d2995f5 Update CHANGELOG.md 2021-12-03 18:40:24 +01:00
Erik Westrup
97a9475550 Update CHANGELOG.md 2021-12-03 18:35:51 +01:00
Erik Westrup
2e55d1cfef Modified: CHANGELOG.md 2021-12-03 18:35:07 +01:00
Erik Westrup
7a8861adc4 Merge pull request #41 from erikw/fix/40
Fix installation of template files
2021-12-03 18:32:26 +01:00
Erik Westrup
bf9b29575a Update README.md 2021-12-03 18:16:39 +01:00
Erik Westrup
428f4be872 Fix installation of template files
The target that copies the *.template files (#15) had a '/' prefixed which
should not be there. The copy should be locally here. The real install
happens in the install-conf that respects $PREFIX

Fixes #40
2021-12-03 17:09:14 +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
4 changed files with 19 additions and 7 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
# Prevent check-in of these sensitive files. Instead they are generated from the corresponding *.template file.
/etc/restic/b2_pw.txt
/etc/restic/b2_env.sh

View File

@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.0.1] - 2021-12-03
### Fixed
- $(make install) now works for the *.template files ([#40](https://github.com/erikw/restic-systemd-automatic-backup/issues/40))
## [1.0.0] - 2021-12-02
It's time to call this a proper major version!

View File

@@ -3,7 +3,7 @@
### Macros ###
SRCS_SCRIPTS = $(filter-out %cron_mail, $(wildcard usr/local/sbin/*))
SRCS_CONF = $(filter-out %template, $(wildcard etc/restic/*))
SRCS_CONF = $(patsubst %.template, %, $(wildcard etc/restic/*))
SRCS_SYSTEMD = $(wildcard etc/systemd/system/*)
# Just set PREFIX in envionment, like
@@ -32,15 +32,15 @@ install-scripts:
install -d $(DEST_SCRIPTS)
install -m 0744 $(SRCS_SCRIPTS) $(DEST_SCRIPTS)
etc/restic/b2_env.sh:
install -m 0600 etc/restic/b2_env.sh.template /etc/restic/b2_env.sh
etc/restic/b2_pw.txt:
install -m 0600 etc/restic/b2_pw.txt.template /etc/restic/b2_pw.txt
# Copy templates to new files with restricted permissions.
# Why? Because the non-template files are git-ignored to preovent that someone who clones or forks this repo checks in their sensitive data like the B2 password!
etc/restic/b2_env.sh etc/restic/b2_pw.txt:
install -m 0600 $@.template $@
# target: install-conf - Install restic configuration files.
# will create these files locally only if they don't already exist
install-conf: | etc/restic/b2_env.sh etc/restic/b2_pw.txt
# | means that dependencies are order-ony i.e. only created if they don't already exist.
install-conf: | $(SRCS_CONF)
install -d $(DEST_CONF)
install -m 0600 $(SRCS_CONF) $(DEST_CONF)

View File

@@ -2,6 +2,8 @@
[![GitHub Stars](https://img.shields.io/github/stars/erikw/restic-systemd-automatic-backup?style=social)](#)
[![GitHub Forks](https://img.shields.io/github/forks/erikw/restic-systemd-automatic-backup?style=social)](#)
<br>
[![AUR version](https://img.shields.io/aur/version/restic-systemd-automatic-backup)](https://aur.archlinux.org/packages/restic-systemd-automatic-backup/)
[![AUR maintainer](https://img.shields.io/aur/maintainer/restic-systemd-automatic-backup?label=AUR%20maintainer)](https://aur.archlinux.org/packages/restic-systemd-automatic-backup/)
[![SLOC](https://img.shields.io/tokei/lines/github/erikw/restic-systemd-automatic-backup)](#)
[![Open issues](https://img.shields.io/github/issues/erikw/restic-systemd-automatic-backup)](https://github.com/erikw/restic-systemd-automatic-backup/issues)
[![Closed issues](https://img.shields.io/github/issues-closed/erikw/restic-systemd-automatic-backup?color=success)](https://github.com/erikw/restic-systemd-automatic-backup/issues?q=is%3Aissue+is%3Aclosed)
@@ -40,6 +42,11 @@ $ cd restic-systemd-automatic-backup
$ sudo make install
````
Arch Linux users can install the aur package [restic-systemd-automatic-backup](https://aur.archlinux.org/packages/restic-systemd-automatic-backup/) e.g. :
```console
$ yaourt -S restic-systemd-automatic-backup
````
## 1. Create Backblaze B2 account
First, see this official Backblaze [tutorial](https://help.backblaze.com/hc/en-us/articles/115002880514-How-to-configure-Backblaze-B2-with-Restic-on-Linux) on restic, and follow the instructions ("Create Backblaze account with B2 enabled") there on how to create a new B2 bucket.