Clone easily my SB drive

Hello,

I’m searching an easy way to clone my data on another drive.
Before Silverblue, my Fedora was installed on a USB SSD key ( Corsair GTX Voyager ), to permit me to move the key from my laptop to my PC or any x64 bits computer at works / friends etc.
As a backup, I’ve another USB key, where I’m running a rsync between the whole partitions ( with some extra steps to replace UUID in special files for /boot/EFI & fstab etc, SELinux was disabled )

This was very useful, and I would like a similar solution with Silverblue, but SELinux is enabled & rights seems specials on SB. I suppose I can’t write on the whole partitions even if it’s plugged as an external drive ? I also suppose this could break the system.

So, do you have any suggestions please?

May be the solution is only to copy my ~/ and to keep a list of installed packages on host and inside the toolbox ? (not sure there is commands for that)
Then, when I launch the 2nd drive, I execute a script to install missing packages on host and toolbox.

Two ideas on that:

  1. You spin up your own OStree variant that you can build the other thumbdrive off of, and then sync your home, etc. I’m not quite sure what kind of packages you’re using (flatpak vs rpm-ostree, etc) so that may take some research and planning to work out the best way to do it, but if you took this approach, you could just build each thumbdrive off the same base OStree branch.

  2. Or use dd outside of Silverblue (e.g. boot a live disk and use dd to do a direct device clone of one thumbdrive to the other)

There’s a few other options that could poentitally work as well, but there’s not much detail on exactly what you’re hoping to achieve necessarily - so these are just vague ideas for the moment, but they might give you a good start point to do some reading/thinking :slight_smile:

Thanks @ketudb for your propositions.
I don’t like too much the idea of sync online my ~/ for security reasons (BTW, the whole partitions are encrypted)
And the dd outside mean many time required on every backup.

I’ll try to see if my scripts could works with SELinux enabled and on SB, but I have serious doubts. Currently, the script doing a rsync of each partitions to the 2nd mounted USB key.

May be I will be restricted to only copy my /home. I have docker installed in layered package, so I also need to copy /var/lib/docker and I’m not sure I could.

Another solution could be to copy special folders like /var/lib/docker to my /home/docker for the backup, and when I boot on the backup, to manually overwrite the /var/lib/docker from my /home/docker

There is a command to known which layered packages packages are installed with rpm-ostree please?