Backing up my PARA folders with TrueNAS and BorgBackup
2026-05-10 13:09
I am preparing to move from Debian 12 Bookworm to 13 Trixie, and rather than do a straight upgrade, I like to take the opportunity to wipe the machine completely and start afresh. This is prompting me to do some overdue backups, so I can pull everything into the new OS when all installed.
These instructions are for backup of my PARA folders only - that's Projects, Areas, Reference and Archive folders. My media is handled separately. For now anyway. This is a learning curve for me. All my backups in the past has been dumping things on external usb hard drives. I'm still a way off anything robust like a 3-2-1 backup strategy, but I feel like I'm making some steps in the right direction.
I have a TrueNAS operating system running on a Supermicro server, housing 4x 4TB hard drives (overkill, but futureproofing). My media is already stored there on a different dataset. Rather than doing my usual slow copy of my PARA data to a couple of external hard drives for an OS upgrade, I thought I'd start to actually utilise the power of TrueNAS and dedicated backup software, rather than syncing tools like rsync and syncthing (they have their own purpose).
TrueNAS has BorgWarehouse available in the App list, which is the server-side of BorgBackup, which I have come across before. BorgBackup is available in the Debian apt package manager so I will use that on the client side (my laptop). I am really impressed by the simplicity of it, the demos, and the documentation. That's a win-win-win-win.
I am doing a separate backup of my dotfiles and systemd service files using a GNU Stow and Forgejo workflow. I am still working on that one. Again, I am enjoying learning about these dedicated software packages to tackle specific use-cases.
There is a slight double-up of backing up repos in my ~/02-Areas/repos folder, which are pushed to Forgejo on my Raspberry Pi, but that's no problem. The more the merrier.
Install BorgBackup on laptop.
sudo apt install borgbackup
In TrueNAS --> Apps --> Discover Apps, install BorgWarehouse. Leave default settings.
Login with admin/admin
Update password
Back on laptop, create an SSH key:
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_borgwarehouse
cat ~/.ssh/id_ed25519_borgwarehouse.pub
Copy the key, and back in BorgWarehouse, create a repository using that public key.
To make it easier going forward for ssh, in my ~/.ssh/config I added:
Host borgwarehouse
HostName 192.168.x.x
Port xxxx
User borgwarehouse
IdentityFile ~/.ssh/id_ed25519_borgwarehouse
The ssh port was created on installation, and can be viewed in the TrueNAS app details under Workloads.
Initialise an encrypted empty repository:
borg init -e repokey-blake2 ssh://borgwarehouse/./3281bb14
3281bb14 is the repository name that was generated on creation. repokey-blake2 is the BLAKE2b encryption mode.
Create a backup of my PARA folders:
borg create --stats --progress --compression lz4 ssh://borgwarehouse/./3281bb14::{user}-{now} \
~/01-Projects \
~/02-Areas \
~/03-Reference \
~/04-Archive
This creates a compressed timestamped archive of multiple folders:
------------------------------------------------------------------------------
Repository: ssh://borgwarehouse/./3281bb14
Archive name: zkbro-2026-05-10T11:55:17
Archive fingerprint: 7c4fd84443e99d34c4307e97049b5e39f571c3c210e1f0e8848a9899190288d4
Time (start): Sun, 2026-05-10 11:55:22
Time (end): Sun, 2026-05-10 11:57:00
Duration: 1 minutes 37.51 seconds
Number of files: 90712
Utilization of max. archive size: 0%
------------------------------------------------------------------------------
Original size Compressed size Deduplicated size
This archive: 10.90 GB 7.79 GB 6.03 GB
All archives: 10.90 GB 7.79 GB 6.03 GB
Unique chunks Total chunks
Chunk index: 63514 92682
------------------------------------------------------------------------------
That's quick!
Somewhere along the line I accidently whacked CTRL-C mid-process, which locked the appplication down, so I had to kill a couple of suspended processes in btop, then enter borg break-lock ssh://borgwarehouse/./3281bb14.
Now if I change a file or two, then run the same command above, borg will append changes only, making it super fast.
zkbro@laptop:~$ mv 02-Areas/notes/apt.md 02-Areas/notes/apt2.md
zkbro@laptop:~$ borg create --stats --progress --compression lz4 ssh://borgwarehouse/./3281bb14::{user}-{now} ~/01-Projects ~/02-Areas ~/03-Reference ~/04-Archive
Enter passphrase for key ssh://borgwarehouse/./3281bb14:
------------------------------------------------------------------------------
Repository: ssh://borgwarehouse/./3281bb14
Archive name: zkbro-2026-05-10T12:02:04
Archive fingerprint: 9e5529afa8dad4ff71a543aa5460e148f491b783c318d87cf434cf1d0a3763e2
Time (start): Sun, 2026-05-10 12:02:12
Time (end): Sun, 2026-05-10 12:02:19
Duration: 6.25 seconds
Number of files: 90712
Utilization of max. archive size: 0%
------------------------------------------------------------------------------
Original size Compressed size Deduplicated size
This archive: 10.90 GB 7.79 GB 133.62 kB
All archives: 21.81 GB 15.59 GB 6.03 GB
Unique chunks Total chunks
Chunk index: 63516 185364
------------------------------------------------------------------------------
6.25 seconds with a deduplicated size of 133.62kb (Borg recognising it doesn't need to duplicate unchanged files). Brill!
To list archives:
zkbro@laptop:~$ borg list ssh://borgwarehouse/./3281bb14
Enter passphrase for key ssh://borgwarehouse/./3281bb14:
zkbro-2026-05-10T11:55:17 Sun, 2026-05-10 11:55:22 [7c4fd84443e99d34c4307e97049b5e39f571c3c210e1f0e8848a9899190288d4]
zkbro-2026-05-10T12:02:04 Sun, 2026-05-10 12:02:12 [9e5529afa8dad4ff71a543aa5460e148f491b783c318d87cf434cf1d0a3763e2]
Use borg diff to check differences:
zkbro@laptop:~$ borg diff ssh://borgwarehouse/./3281bb14::zkbro-2026-05-10T11:55:17 zkbro-2026-05-10T12:02:04
Enter passphrase for key ssh://borgwarehouse/./3281bb14:
[ctime: Sat, 2026-05-09 09:55:59 -> Sun, 2026-05-10 12:01:53] [mtime: Sat, 2026-05-09 09:55:59 -> Sun, 2026-05-10 12:01:53] home/zkbro/02-Areas/notes
added 500 B home/zkbro/02-Areas/notes/apt2.md
removed 500 B home/zkbro/02-Areas/notes/apt.md
That's it. My data is backed up. Now, to extract the entire archive to my current directory, I just pick out the latest archive:
borg extract ssh://borgwarehouse/./3281bb14::zkbro-2026-05-10T12:02:04
or a specific folder, also printing extraction as it runs (with --list):
borg extract --list ssh://borgwarehouse/./3281bb14::zkbro-2026-05-10T12:02:04 home/zkbro/01-Projects
There are a lot more features in both the client and server side of Borg, but for now I'm happy this will serve it's purpose in temporarily holding my files while I upgrade my operating system.
It doesn't look like there's a scheduler function built into BorgBackup, but my next steps might be to setup something like a cronjob or systemd timer. Borgmatic and BorgUI both make scheduling easier. To be continued...