borg backup script
Find a file
2024-12-03 13:47:27 +00:00
.gitignore gitignore 2024-12-03 13:45:16 +00:00
b0rged.service initial version 2024-12-03 13:47:27 +00:00
b0rged.sh initial version 2024-12-03 13:47:27 +00:00
b0rged.timer initial version 2024-12-03 13:47:27 +00:00
env.example initial version 2024-12-03 13:47:27 +00:00
patterns.system initial version 2024-12-03 13:47:27 +00:00
README.md initial version 2024-12-03 13:47:27 +00:00

b0rged

simple wrapper for borg-backup, aimed at backing up to hetzner storage boxes

install

clone this repo somewhere to your machine - I use ~root/b0rged

set up your storage box, according to the comments in b0rged-init.sh.

set up your .env file, copy env.example and adapt.

run b0rged-init.sh. if you want to, you could delete the script afterwards.

add your backup patterns. you could edit patterns.system or add as many patterns.foo files as you want.

run b0rged.sh manually, once. check that everything works.

copy the system and timer file to ~/.config/systemd/user. you might need to adapt ExecStart in b0rged.service.

enable and start the timer. you might need to use sudo machinectl shell root@ instead of sudo -i to get a root shell that works with systemd. then run systemctl --user enable --now b0rged.timer.

check that your timer is set up. it should look something like this:

systemctl --user list-timers --all
NEXT                        LEFT          LAST PASSED UNIT         ACTIVATES
Tue 2024-12-03 19:01:57 UTC 5h 21min left n/a  n/a    b0rged.timer b0rged.service