Full system backup not archiving /boot/ #1125

Closed
opened 2025-08-03 15:01:12 +00:00 by sm8ps · 2 comments

What I'm trying to do and why

Full system backup with a BTRFS root filesystem but a separate partition for boot/ with an EXT4-filesystem.
/etc/fstab looks something like this:

/dev/disk/sda1 /boot     ext4 defaults 0 1
/dev/disk/sad2 /         btrfs subvol=@,noatime,defaults 0 1
/dev/disk/sda3 /boot/efi vfat defaults 0 1

I have Borgmatic running with the btrfs:option but the directory /boot/ is empty in the archives. Everything else is absolutely fine.
The line # one_file_system: true is commented out in the Borgmatic configuration and thus the option should default to false. The behavior does not change even upon explicitly setting it so.

Steps to reproduce

As outlined above.

Actual behavior

As explained: /boot/ is archived but not its content.

Expected behavior

Intuitively, I would expect that the setting one_file_system: false should make the content of /boot/ be archived as well.

Other notes / implementation ideas

I sort of see how the snapshotting of the BTRFS root filesystem might leave not be able to reach the EXT-FS on the boot partition. If this is a limitation then it might be good to have it documented as it seems a bit counter-intutitive.

borgmatic version

2.0.7

borgmatic installation method

pipx install

Borg version

1.4.1

Python version

3.12.3

Database version (if applicable)

No response

Operating system and version

Ubuntu Linux 24.04.2 LTS (Server)

### What I'm trying to do and why Full system backup with a BTRFS root filesystem but a separate partition for boot/ with an EXT4-filesystem. /etc/fstab looks something like this: ``` /dev/disk/sda1 /boot ext4 defaults 0 1 /dev/disk/sad2 / btrfs subvol=@,noatime,defaults 0 1 /dev/disk/sda3 /boot/efi vfat defaults 0 1 ``` I have Borgmatic running with the `btrfs:`option but the directory `/boot/` is empty in the archives. Everything else is absolutely fine. The line `# one_file_system: true` is commented out in the Borgmatic configuration and thus the option should default to false. The behavior does not change even upon explicitly setting it so. ### Steps to reproduce As outlined above. ### Actual behavior As explained: `/boot/` is archived but not its content. ### Expected behavior Intuitively, I would expect that the setting `one_file_system: false` should make the content of `/boot/` be archived as well. ### Other notes / implementation ideas I sort of see how the snapshotting of the BTRFS root filesystem might leave not be able to reach the EXT-FS on the boot partition. If this is a limitation then it might be good to have it documented as it seems a bit counter-intutitive. ### borgmatic version 2.0.7 ### borgmatic installation method pipx install ### Borg version 1.4.1 ### Python version 3.12.3 ### Database version (if applicable) _No response_ ### Operating system and version Ubuntu Linux 24.04.2 LTS (Server)
Owner

Yeah, what's going on here is that while Borg can indeed cross filesystems (when one_file_system is `true), Btrfs snapshotting can't. So I'll take this as a ticket to improve the documentation on this point.

In the meantime, the two ways I can think of to work around this limitation:

  • Explicitly add /boot to source_directories. If that still doesn't work, please let me know.
  • Or don't enable Btrfs snapshotting at all in borgmatic. However, then you'd have to give up the benefits of Btrfs snapshots for backups.

It's also theoretically possible that borgmatic could be made smart enough to detect this situation and implicitly add /boot to the source directories passed to Borg. I'll also look into that possibility as part of this ticket.

Yeah, what's going on here is that while Borg can indeed cross filesystems (when `one_file_system` is `true), Btrfs snapshotting can't. So I'll take this as a ticket to improve the documentation on this point. In the meantime, the two ways I can think of to work around this limitation: - Explicitly add `/boot` to `source_directories`. If that still doesn't work, please let me know. - _Or_ don't enable Btrfs snapshotting at all in borgmatic. However, then you'd have to give up the benefits of Btrfs snapshots for backups. It's also theoretically possible that borgmatic could be made smart enough to detect this situation and implicitly add `/boot` to the source directories passed to Borg. I'll also look into that possibility as part of this ticket.
Author

Thanks for the quick response @witten ! Judging from far I do not see any general solution. Maybe it is worth mentioning just the way you state it and including the work-around.

BTW, I want to thank everybody involved in this project for the incredibly useful tool. I have used Borg for about a decade and while it always worked well it was quite demanding to set-up and use, given that one does not have to use it frequently once automated. After upgrading my servers I decided to go the snapshot way and eventually found out about Borgmatic which has been truly phantastic in use, simple, intuitive and powerful. Just one thing I would change if I could: personally, I am calling it Borgmagic. Cheers!

Thanks for the quick response @witten ! Judging from far I do not see any general solution. Maybe it is worth mentioning just the way you state it and including the work-around. BTW, I want to thank everybody involved in this project for the incredibly useful tool. I have used Borg for about a decade and while it always worked well it was quite demanding to set-up and use, given that one does not have to use it frequently once automated. After upgrading my servers I decided to go the snapshot way and eventually found out about Borgmatic which has been truly phantastic in use, simple, intuitive and powerful. Just one thing I would change if I could: personally, I am calling it Borgmagic. Cheers!
sm8ps closed this issue 2025-08-03 20:25:42 +00:00
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
borgmatic-collective/borgmatic#1125
No description provided.