Revert "base-files: sysupgrade: always setup overlay when creating backup"
authorRafał Miłecki <rafal@milecki.pl>
Thu, 22 Feb 2024 15:43:47 +0000 (16:43 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 22 Feb 2024 21:08:14 +0000 (22:08 +0100)
commit157d6019df425b7ffe77ee369a7ca5c21ea2aed0
tree3eb65f34e01ad2ca17769ac510cfceb7db574970
parent7bffa8ab108f07940ee2c0e5d8573d5c4431e0ed
Revert "base-files: sysupgrade: always setup overlay when creating backup"

This reverts commit 4fa9aaf0bed984d200b3c48d1cc81fca7847c394.

That seemed like a good idea allowing us to include any runtime
generated file in archive. Unfortuantely it broke backups with files
from mounted directories.

When mounting overlay with / as lowerdir its mounts don't propagete in
the mountpoint. That resulted in empty directories:
/tmp/overlay.XXXXXX/backup/tmp/
/tmp/overlay.XXXXXX/backup/var/
/tmp/overlay.XXXXXX/backup/dev/
/tmp/overlay.XXXXXX/backup/proc/
etc.

As some platforms / users try to backup files like /var/dhcp.leases or
/boot/cmdline.txt it means we can't use that solution.

Link: http://lists.openwrt.org/pipermail/openwrt-devel/2024-February/042320.html
Link: https://lore.kernel.org/linux-fsdevel/67bb0571-a6e0-44ea-9ab6-91c267d0642f@gmail.com/T/#u
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
package/base-files/files/sbin/sysupgrade