grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

commit 01b3054fbe8aebc485c034448b90414717f4a2ab
parent 03a0df41a95f3e6eac15765366d96001bd6aeaf3
Author: pyratebeard <root@pyratebeard.net>
Date:   Wed, 24 Jan 2024 10:27:09 +0000

updates

Diffstat:
Mglossary.md | 3---
Asoftware/borgbase.md | 12++++++++++++
Asoftware/borgmatic.md | 47+++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 3 deletions(-)

diff --git a/glossary.md b/glossary.md @@ -39,7 +39,6 @@ * [ffmpeg](/linux/ffmpeg) * [firewalld](/networking/firewalld) * [flatpak](/linux/flatpak) -* [fonts](/linux/fonts) * [freebsd](/unix/freebsd) * [ftp](/software/ftp) @@ -55,7 +54,6 @@ * [httpd](/software/httpd) ## i -* [i3lock](/linux/i3lock) * [index](/linux/index) * [init](/linux/init) * [iptables](/networking/iptables) @@ -145,7 +143,6 @@ * [tcpdump](/software/tcpdump) * [tmux](/software/tmux) * [trezor](/hardware/trezor) -* [truncate](/linux/truncate) ## u * [usenet](/software/usenet) diff --git a/software/borgbase.md b/software/borgbase.md @@ -0,0 +1,12 @@ +# borgbase + +* create repo on web console +* add new ssh key if required + * add key to repo in settings +* on system run init command + * copy repo url from web console + * use `BORG_RSH` to point to key +``` +BORG_RSH="ssh -i /root/.ssh/id_ed25519" ; borg init -e repokey-blake2 ssh://<repo>@<repo>.repo.borgbase.com/./repo +``` +* create archives either with [borg](borg) or [borgmatic](borgmatic) diff --git a/software/borgmatic.md b/software/borgmatic.md @@ -0,0 +1,47 @@ +# borgmatic + +``` +apt-get update && apt-get install borgbackup borgmatic +mkdir /etc/borgmatic/ +generate-borgmatic-config --destination /etc/borgmatic/config.yaml +``` +* on debian 12.4 borgmatic version is 1.7.7 so use old `generate-borgmatic-config` command +* make changes to config +``` +location: + source_directories: + - /path/to/directory01 + - /path/to/directory02 + repositories: + - ssh://<repo>@<repo>.repo.borgbase.com/./repo +storage: + encryption_passphrase: "this is a secure passphrase" + ssh_command: ssh -i /path/to/ssh_key +retention: + keep_daily: 7 + keep_weekly: 4 + keep_monthly: 6 + keep_yearly: 1 +consistency: + checks: + - name: repository + - name: archives + frequency: 1 week +hooks: + ntfy: + topic: borg + server: https://ntfy.sh + finish: + title: $HOSTNAME -> borgbase + message: borgmatic finished successfully + priority: min + fail: + title: $HOSTNAME -> borgbase + message: borgmatic failed + priority: urgent + states: + - finish + - fail +``` + +https://torsion.org/borgmatic/