Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was about to use the encryptfs procedure to migrate my existing home folder and discovered that the process needs 2.5x the size of home to complete. I have 258GB in my home, but only 430GB free. Is there a way that I can encrypt home without reinstalling?

share|improve this question
    
yes, but you need to temporarily store some of the home data to another partition and then encrypt the home partition (which is less used). However, you should maybe also think about not encrypting the whole home directory, but only important private data. –  Michael K Jan 13 '12 at 13:55
    
What happens if I move "documents," then encrypt, then copy documents back after encryption? will this work? –  Kendor Jan 14 '12 at 1:26
    
yes of course, it is as if you would store new data on your home drive. –  Michael K Jan 16 '12 at 7:07
add comment

1 Answer 1

up vote 1 down vote accepted

Full disclosure here, I'm the co-author and maintainer of the ecryptfs-migrate-home utility.

Note that the 2.5x multiplier is perhaps an aggressive overestimation of the required disk space, but I've published that recommendation as a safety precaution

To answer your question, yes, it is possible, though perhaps slightly risky, and not generally recommended.

You could accomplish this by editing the shell script, /usr/bin/ecryptfs-migrate-home, and modify the line that looks like this:

rsync -aP "$orig/" "$USER_HOME/" 1>&2 

to:

mv -vf "$orig/"* "$orig/".* "$USER_HOME/" 1>&2 

This will move files in place, instead of copying them.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.