Backup with Debian Trixie fails

I use Debian GNU/Linux 13 (trixie) and FreedomBox Version 25.9.3 on a Raspberry Pi 4 Model B.

After Freedombox was released with Debian Trixie, I deleted my old installation and reinstalled Freedombox. As before I connected two USB-sticks, called USBStick and pi2. They are accessible via Samba and the file manager.


When I want to save a backup, I first have to create an archive. The USB sticks are selectable.

But every time I start the process, the message “incorrect passphrase” appears without creating an archive. It makes no difference whether I want to save an encrypted or unencrypted backup: the message is always the same.







At first, I thought it might be because the USB sticks weren’t mounted automatically, so I changed this in the Cockpit. Now the sticks are always mounted automatically, even after a reboot.

But this didn’t change anything.

Then I thought I had to create the backup path via the console using the mkdir command. But the console output showed that the path already exists. However, the storage medium isn’t selectable when creating the backup. It seems that it can only be saved to the SD-card.

Any ideas?

After updating Freedombox to version 25.10 I tried it again. Now there appears the message “Fehler beim Verbinden mit Server: Command ‘[‘borg’, ‘init’, ‘–encryption’, ‘none’, ‘/media/root/USBStick/FreedomBoxBackups’]’ returned non-zero exit status 2.”

So I manually removed the cache directory by deleting the contents of /root/.cache/borg, which forced Borg to recreate the cache files during the next backup operation. But it dididn’t work. The message appeared again.

Just a naive question based on your screenshots: On top there are screenshots where it seems that you were using a passphrase for your backups, and at the end you’ve set encryption to ‘none’ (German ‘Keiner’). Could this be the cause that the borg command fails?

The screenshots are a bit confusing. I tried the following combinations:

  1. Hard drive or partition “USB stick”, encryption: “Key in repository” and passphrase
  2. Hard drive or partition “USB stick”, encryption: “None” and no passphrase

Do you have the option to log into the machine with SSH or via Cockpit and try to run the borg commands from the command line? This would allow passing a verbose-flag (-v) to maybe see more details about the root cause.

I now suspect that the connected USB sticks might not be writable for Freedombox. But I don’t know how to change that.

Yes I have the option to log into the machine with SSH or via Cockpit and I could try to run the borg commands from the command line. But I dont’ know the commands.

Just going by the error message in your screenshot above (red box) I would assume:

borg init --encryption none /media/root/USBStick/FreedomBoxBackups

You may probably need to run this as root user and may want to give the verbose-option I mentioned:

sudo borg init --verbose --encryption none /media/root/USBStick/FreedomBoxBackups

That may give some info on what is going wrong.

borg init --encryption none /media/root/USBStick/FreedomBoxBackups
Permission denied to /media/root/USBStick/FreedomBoxBackups.
pi@freedombox:~$ sudo borg init --encryption none /media/root/USBStick/FreedomBoxBackups
[sudo] password for pi:
A repository already exists at /media/root/USBStick/FreedomBoxBackups.
pi@freedombox:~$ sudo borg init --verbose --encryption none /media/root/USBStick/FreedomBoxBackups
A repository already exists at /media/root/USBStick/FreedomBoxBackups.

It was my stupid mistake, which I now realize: I had already connected two USB sticks with Freedombox and Debian Bookworm. Then I uninstalled Freedombox and reinstalled Freedombox with Trixie. I simply connected the USB sticks with the existing backups. That’s why Freedombox is complaining, saying the repository already exists.
I’ve now unplugged the USB sticks and deleted the backup repositories on the desktop computer. Then I reconnected the USB sticks and recreated the repositories. Everything works now! Thanks for your effort! The problem is solved.

1 Like

Hi @vrillo
I just encountered the same issue. This is a bug. You have to be able, to port an existing FreedomBoxBackup to a new machine or a new setup an mount it there.

I did run the mentioned command from @kopfkind and it said, that the FreedomBoxBackup already exists.

Does anybody have an idea how to add the existing Backup to a new setup? Until now I was able to ad an existing Backup with the button “Sicherungs-Speicherort hinzufügen” (I don’t know the English term, maybe: ad repository?) and this way to upload existing data and configuration.

1 Like

I just took some screenshots of a manual backup for illustration of FreedomBox version 25.9.3 and 25.11 on this issue.

This screenshot below shows a manual backup (Manuelle Sicherung) on a USB-STICK, made on version 25.11. It looks the same like on the versions before

This screenshot below shows a refreshed view of the browser, after the USB-STICK was removed on version 25.11 and it doesn’t look like on the versions before (see below)

This screenshot below shows the manual backup (Manuelle Sicherung) on a USB-STICK made with version 25.11 that was added to the backup-repository on version 25.9.3. This is not possible on 25.11 anymore

This screenshot below shows a refreshed view of the browser, after the USB-STICK with the FreedomBoxBackups was removed on version 25.9.3. This is how it was until before version 25.10 or 25.11

1 Like

Hello,
same issue !
sudo borg init --encryption=repokey /var/borg_dt/FreedomBoxBackups/
[sudo] password for xxx:
Local Exception
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/borg/archiver.py”, line 5391, in main
exit_code = archiver.run(args)
File “/usr/lib/python3/dist-packages/borg/archiver.py”, line 5309, in run
rc = func(args)
File “/usr/lib/python3/dist-packages/borg/archiver.py”, line 176, in wrapper
with repository:
^^^^^^^^^^
File “/usr/lib/python3/dist-packages/borg/repository.py”, line 215, in enter
self.create(self.path)
~~~~~~~~~~~^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/borg/repository.py”, line 306, in create
os.mkdir(path)
~~~~~~~~^^^^^^
PermissionError: [Errno 13] Permission denied: ‘/var/borg_dt/FreedomBoxBackups’

Platform: Linux fdmb 6.12.48+deb13-armmp-lpae #1 SMP Debian 6.12.48-1 (2025-09-20) armv7l
Linux: Unknown Linux
Borg: 1.4.0 Python: CPython 3.13.5 msgpack: 1.0.3 fuse: pyfuse3 3.4.0 [pyfuse3,llfuse]
PID: 2582 CWD: /home/xxx
sys.argv: [‘/usr/bin/borg’, ‘init’, ‘–encryption=repokey’, ‘/var/borg_dt/FreedomBoxBackups/’]
SSH_ORIGINAL_COMMAND: None

Recently, when I installled Freedombox on a rockpro64, I tried selecting previous remote backup location, it failed no matter what I did.

I restored using an archive file. I create it this way (on the remote machine where the backups are stored):

$ sudo su
# borg list /home/sftp-fb/backup
scheduled: daily, weekly: 2024-01-07:02:47 Sun, 2024-01-07 03:48:22 [ac965a86f11b4c2c6041948b7f54016839d592e9c1ad5a10c3983347e9a2985f
scheduled: daily, weekly: 2024-01-14:02:35 Sun, 2024-01-14 03:36:57 [0c07a4f2f00b2296eaab9cdd43c81aecf82db43bdf237ae2a93b7aca3160dbcd
scheduled: daily: 2024-01-17:02:40   Wed, 2024-01-17 03:41:30 [69ba8bef4f19a60a9fdfe5f86bf7442150419054f9d5fd5770d35513322f4613]
scheduled: daily: 2024-01-18:02:41   Thu, 2024-01-18 03:43:03 [c876d32b766001e8ca22b3585d6d24df14b187e7754c87fc4e83d2386bfca295]
scheduled: daily: 2024-01-19:02:43   Fri, 2024-01-19 03:44:33 [8aac27ed1036210b582dc4a79af4bbe606e9528636b1e0b8285c6072b33e263f]
scheduled: daily: 2024-01-20:02:37   Sat, 2024-01-20 03:38:44 [2e5af7589ade556588b6a17a2a1dec02972901715a7bac30863d2efc5c646ce1]
scheduled: daily, weekly: 2024-01-21:02:02 Sun, 2024-01-21 03:03:25 [172b671b2705ee3f85b58aa8a995e36b6f967a8bd417360c306cb29df6e30cd6]

# borg export-tar /home/sftp-fb/backup::"scheduled: daily, weekly: 2024-01-21:02:02" /home/sftp-fb/backup/archive.tar.gz

Then I added an empty remote backup location.

Note: I configure my remote server with chroot and sftp restriction for the backup user. Previously, it was working fine. Now, I have to disable those restrictions to add the repository, but I can re-enable them afterwards and scheduled backups still work.

1 Like

Hi @vrillo
I just made a test, to see if backups can be moved to another machine and be mounted there. Yes, they can as the Announcements for 25.13 mentioned the fixed backups and the test confirmed it. May you mark it as solved.