My home directory is encrypted with ecryptfs. I wanted to try some things that required reinstalling my system, so I backed up to a flash drive with this command:
sudo tar cf backup.tar.zstd --one-file-system --acls --xattrs --zstd /
My system has 3 partitions, efi, root, and swap. The --one-file-system was intended to grab the encrypted ecryptfs data and skip the decrypted mount.
I did my tests then, from a live usb, restored the backup this way:
tar xf backup.tar.zstd --xattrs --zstd -C /mnt
genfstab -U /mnt > /mnt/etc/fstab
arch-chroot /mnt
grub-install /dev/nvme0n1
grub-mkconfig -o /boot/grub/grub.cfg
And it boots, I can log into sddm with my password and reach a desktop, but my ecryptfs will not mount. What broke?
/filesystem? Your$HOMEis on a different file system if I understand you correctly, it's ecryptfs, so with--one-file-systemI would expect that only/and not your$HOME. Is that not what happened?/home/.ecryptfswas backed up successfully. My problem is that it won't decrypt anymoreecryptfs-recover-privatemanaged to find the files, then i just copied everything over. My question is, what caused it to stop mounting at login? What didn't the tar command back up, and what's the right way to do it?