From 53a956bdfa00a2cd6812807240737bdac9bbb4cf Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Fri, 23 Aug 2024 13:37:12 +0100 Subject: [PATCH] Add Restic info in readme --- norg.nimble | 2 +- readme.md | 31 +++++++++++++++++++++++++++++-- todo.md | 3 ++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/norg.nimble b/norg.nimble index 274c064..dd7bbe9 100644 --- a/norg.nimble +++ b/norg.nimble @@ -1,6 +1,6 @@ # Package -version = "0.1.5" +version = "0.1.6" author = "Paul Wilde" description = "A Borg Backup Wrapper" license = "AGPL-3.0-or-later" diff --git a/readme.md b/readme.md index 135a980..47751a3 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,5 @@ # Norg -A simple, portable, wrapper for the [borg backup utility](https://www.borgbackup.org) written in Nim +A simple, portable, wrapper for the [borg backup](https://www.borgbackup.org) and [restic](https://restic.net) utilities written in Nim. Inspired by [Borgmatic](https://torsion.org/borgmatic) @@ -35,6 +35,7 @@ states = ["Success","Failure", "Running"] You can then run the equivalent `borg` command to init, create, list, mount and extract your backups. +**Using BorgBackup** ```sh # Init your repository norg -c myconfig.toml init @@ -58,6 +59,33 @@ norg -c myconfig.toml extract pcname-2024-08-18T15:20:17773204 norg -c myconfig.toml extract pcname-2024-08-18T15:20:17773204 --destination /tmp/my_extracted_archive ``` +**Using Restic** _New in v0.1.6_ +Add a repository with a `tool = "restic"` option. +```toml +[[repositories]] +label = "MyResticRepo" +path = "/my/restic/backup/location" +tool = "restic" +``` + +Then run the appropriate commands +```sh +# Init your repository +norg -c myconfig.toml init + +# Backup your data +norg -c myconfig.toml backup + +# List Snapshots +norg -c myconfig.toml snapshots + +# Mount a Repo +norg -c myconfig.toml mount -r MyResticRepo /home/me/mnt + +# Restore an Archive (restore destination must be empty) +norg -c myconfig.toml restore latest --destination /my/restore/location +``` + # Build from Source Download and build from source ```sh @@ -72,7 +100,6 @@ or just install directly with `nimble` nimble install https://codeberg.org/pswilde/norgbackup ``` - ## Naming. Why "Norg"? Well, I don't know. I'm a Star Trek fan so obviously I wanted to keep something in line with the [Borg pseudo-species](https://memory-alpha.fandom.com/wiki/Borg) as the borg backup utility does. diff --git a/todo.md b/todo.md index 11c8755..c913f7a 100644 --- a/todo.md +++ b/todo.md @@ -1,9 +1,10 @@ # A list of things I'd like to include in Norg - [ ] Backup maintenance i.e. Keep Daily/Weekly/Monthy +- [x] Add Restic implementation - [x] Pre and post run scripts i.e. to backup a database - [x] change encryption_password to encryption_passphrase in config to be more in line with borgbackup - [ ] More notifiers (ntfy, healthchecks, etc.) - [ ] Generate config command parameter -- [ ] Allow to specify direct repository so mount/extract doesn't fail if multiple are available +- [x] Allow to specify direct repository so mount/extract doesn't fail if multiple are available - [ ] Better workflow of using borg flags and options as it seems a little sketchy just passing them through to the command string - [ ] ... and loads more