Closed adabru closed 3 years ago
Shamelessly copying the wording from the OP of https://unix.stackexchange.com/q/459284/218172 :
When I create a squashfs image from multiple directories such as: /bin/ /usr/bin/ /usr/local/bin/ /some/other/random/folder/ /another/long/path/ If I use command mksquashfs /bin /usr/bin /usr/local/bin /some/other/random/folder /another/long/path MyNewImage.squashfs It gives me an image with these top-level folders: bin/ bin_1/ bin_2/ folder/ path/ I want my image to contain the full paths from the original filesystem: bin/ usr/bin/ usr/local/bin/ some/other/random/folder/ another/long/path/
When I create a squashfs image from multiple directories such as:
If I use command
mksquashfs /bin /usr/bin /usr/local/bin /some/other/random/folder /another/long/path MyNewImage.squashfs
It gives me an image with these top-level folders:
I want my image to contain the full paths from the original filesystem:
Currently as a workaround I'm using:
mksquashfs / MyNewImage.squashfs -wildcards -e \ !(bin|usr|some|another) \ usr/!(bin|local) \ usr/local/!(bin) \ some/!(other) \ some/other/!(random) \ some/other/random/!(folder) \ another/!(long) \ another/long/!(path)
This is rather cumbersome. A new feature like a basedir option that could be used like --basedir / or --basedir ~ would be very nice, for backing up only a smaller part of the filesystem.
--basedir /
--basedir ~
I find it inconvenient that man page is not up-to-date on that (Linux Mint 21).
Shamelessly copying the wording from the OP of https://unix.stackexchange.com/q/459284/218172 :
Currently as a workaround I'm using:
This is rather cumbersome. A new feature like a basedir option that could be used like
--basedir /
or--basedir ~
would be very nice, for backing up only a smaller part of the filesystem.