Buddy Backups

- Posted in Dev by - Permalink

Great restic clients:

  • cli with docker compose like config https://creativeprojects.github.io/resticprofile/index.html
  • tauri gui with taskbar https://github.com/nraboy/resty-desktop

ResticProfile

Getting started

1. Password file

First create a password file password.txt, save with 660 permissions, and copy into your password manager.

Use the following to create a secure password file

resticprofile generate --random-key > ~/.config/resticprofile/password.txt
chmod 660 ~/.config/resticprofile/password.txt

2. Profiles toml

Then create/add the following in your ~/.config/resticprofile/profiles.toml

#:schema https://creativeprojects.github.io/resticprofile/jsonschema/config-1.json

version = "1"
[myfriend]
repository = "rest:https://me:password@myfriend.test/me/mypc"
password-file = "password.txt"
[myfriend.backup]
verbose = true
source = [
  "/home/me/Projects"
]
exclude = [
  "node_modules"
]
schedule = "Wed *-*-* 11:00:00"

3. Initialize repository

Before you can use resticprofile to manage your backups you first need to initialize it with restic init command

restic init --repo rest:https://me:password@myfriend.test/me/mypc -p ~/.config/resticprofile/password.txt

4. Run backup

Run your first backup

# Dry run if you aren't sure it will work
resticprofile myfriend.backup -n
resticprofile myfriend.backup

5. Set schedule

For non-systemd linux users add this to use cron instead

[global]
 scheduler = "crond"
resticprofile schedule --all
# or
resticprofile schedule --name myfriend backup