You are not logged in.
I recently made a full copy of the hard drive (using dd) to an external drive, expecting that this should have all of the data for me to restore. In the backup, my home directory is encrypted using fscrypt and homectl (all other files are fine).
I am now trying to restore my old home directory, unsuccessfully so far. Here are the steps I have followed
I have restored all files from the backup except for the homedirectory (including files in /var/lib/systemd/home). The home directory could not be copied as it is encrypted.
Booted the new system perfectly fine into root, and mounted the dd backup to /mnt/bkp
I have modified the identity file to point to /mnt/bkp/home/me and /mnt/bkp/home/me.homedir
After a reboot, I can successfully activate the user, and I can access /mnt/bkp/home/me and file in that directory
What I cannot do is access any files in any subdirectories of /mnt/bkp/home/me. They are all in their fscrypt encrypted form (that is, 30 or so characters)
I have tried having the identity file mount to /home/me instead of /mnt/bkp/home/me in case that was an issue, but the same thing happens. The fact that I can decrypt the home directory and files within it is promising, but I'm unsure why I am not able to decrypt any of the directories/files in any subdirectories. Does anyone have an idea as to what I can do?
I did see the other post over at https://bbs.archlinux.org/viewtopic.php?id=276632 about copying the key files, and the concern raised about https://github.com/systemd/systemd/issues/17688 shouldn't be an issue here as I can access the .identity file in the home directory.
Last edited by JP-Ellis (2023-05-06 09:50:10)
Offline
Not sure this is an issue, but you can specify UID/GID while mounting. I'd try to match the original there and also ensure there is no clash with an existing (/restored) user. Please state the homectl commands you tried to mount the systemd.home directory.
Offline