How to recover from a borg repository

I wish to recover from a previous backup of my home directory the .mozilla/ subdirectory to give me back all the Firefox bookmarks in addition to the folder structure on my Firefox toolbar. [1]

My /home directory and subdirectories are backed up locally, and without encryption, to a 4T Toshiba external drive. It is currently situated at /mnt/sdd1/

sudo ls -l /mnt/sdd1/

drwx------ 3 root root 4096 Feb 17 18:27 home
drwx------ 2 root root 16384 Oct 16 11:38 lost+found

james@tibrogargan borgXtr]$ sudo ls -l /mnt/sdd1/home
total 85552
-rw------- 1 root root 209 Oct 17 00:34 config
drwx------ 4 root root 4096 Feb 17 18:19 data
-rw------- 1 root root 7900 Feb 8 22:03 hints.1366
-rw------- 1 root root 87578378 Feb 8 22:03 index.1366
-rw------- 1 root root 190 Feb 8 22:03 integrity.1366
-rw------- 1 root root 73 Oct 17 00:34 README

I have attempted a number of different ways to extract .mozilla/ to a temporary folder. Here is one attempt:

[james@tibrogargan borgXtr]$ date;sudo borg extract /mnt/sdd1/::home james/.mozilla; echo $?;date
Sat 17 Feb 2024 19:52:22 AEDT
/mnt/sdd1 is not a valid repository. Check repo config.
Sat 17 Feb 2024 19:52:29 AEDT

Is anyone here able to suggest the correct way to recover /home/james/.mozilla/ ?

Thank you for your attention.


[1] The .mozilla/ subdirectory was wiped when I tried to install another Linux distribution. I agreed to let it provide me with a newer Mozilla Firefox than what I previously had. I don’t recall being asked if I would like to keep my bookmarks and toolbar folders.

From the official docs

Extract the “src” directory but exclude object files

$ borg extract /path/to/repo::my-files home/USERNAME/src

I think I tried that. Here’s the result:

[james@tibrogargan borgXtr]$ sudo borg extract /mnt/sdd1/home::james home/james/.mozilla; echo $?
[sudo] password for james:
Archive james does not exist

Can you list the content of the borg repo?

borg list /path/to/repo

That should show you all the available snapshots.

I would just mount the borg repository and use cp resp. rsync:


tmpdir=$(mktemp -d) 
sudo borg mount  <BORG_REPO> $tmpdir

then you can cd $tmpdir and get what you want.

Hi, I use borg myself, - but have the Vorta frontend installed, which makes managing the archives, and more importantly, restoring them, much easier. Strongly recommend it.