Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 5969  / 3 Years ago, mon, september 13, 2021, 10:51:11

Hi I have a new notebook and I want to move my home data to the new computer.



I think there are multiple ways of doing this




  • copy all to a external hdd and move back on new computer

  • do an Deja-Dup backup and then restore on the new computer

  • rsyc/move to new computer via sshfs

  • ...?



My question is how do I keep the current ecrypt encryption of /home in place and get it working properly on the new computer.
How do I have to install the new computer so I can use the encrypted home files from the old?



If I would use Deja-Dup do I need to worry about the ecrypt stuff on the old machine or does the new installation simply enctypt everything new?


More From » encryption

 Answers
2

Great question! I actually do this quite frequently (every few months). To do so, I use rsync to copy all of my /home partition/directory from the OLD machine to the NEW one.



First, ensure that you have openssh-server and ecryptfs-utils installed and running on the NEW machine.



sudo apt-get install openssh-server ecryptfs-utils


You could install your public SSH key in the root user's /root/.ssh/authorized_keys file. But I usually set a root password on the NEW machine.



sudo passwd


Also, on the NEW machine, create a new user, who's name and password precisely matches the name and password on the old machine.



sudo adduser YOURUSER


Make absolutley sure that YOURUSER is NOT currently logged into either the NEW machine or the OLD machine.



Now, from the OLD machine, as root, rsync your /home directory from the OLD to the NEW machine:



sudo rsync -aP /home/ NEW:/home/


Finally, make absolutely sure that the files on the NEW machine are owned by YOURUSER:



sudo chown -R /home/.ecryptfs/YOURUSER /home/YOURUSER


And that should do it! You should be able to login as normal to your NEW machine and read and write your data!



Full disclosure: I'm the author and maintainer of Ubuntu's Encrypted Home Directory feature.


[#39161] Tuesday, September 14, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fieldcheon

Total Points: 24
Total Questions: 105
Total Answers: 109

Location: Western Sahara
Member since Tue, Feb 16, 2021
3 Years ago
fieldcheon questions
Fri, Apr 1, 22, 05:58, 2 Years ago
Wed, Feb 2, 22, 03:31, 2 Years ago
Sat, Aug 14, 21, 01:24, 3 Years ago
;