Skip to content

Instantly share code, notes, and snippets.

@CLandel89
CLandel89 / borg-tree.sh
Last active March 9, 2020 10:05
Bash script for use with borgbackup: Creates a structured symlink tree to the archives in a borg repo.
#!/bin/bash -e
## borg-tree
# With this Bash script, you can create backups like this (note the different types of slashes!):
# # borg create '/path/to/repo::category\subdir\2018-04-15'
# Create the symlink tree like this:
# # borg-tree /path/to/repo /path/for/browsing
# And then browse the archives in paths like this:
# # /path/for/browsing/category/subdir/2018-04-15
# Note that the latter is a SYMLINK; command-line tools like cp should be used with caution.