Humus numericus

Aller au contenu | Aller au menu | Aller à la recherche

R, Spip et autres

How to use CrashPlan with an encrypted home folder

I’m currently trying the CrashPlan online backup service, and I’m quite happy with it. The only problem I ran into is for two computers with encrypted home directories using ecryptfs.

The problem is that when the crashplan engine starts at boot time, the home folder is empty until the user has logged in. This seems to cause problems to crashplan : fortunately it doesn’t delete the corresponding backup data, but it seems it can’t detect changes in data in this home even after it is mounted unencrypted.

After a short answer from support, I’ve tried to use a quite dirty way to solve the problem : manually modify the crashplan init script to delay its startup until the user is logged in.

So the /etc/init.d/crashplan file has been modified by adding the following to the start section. Of course you’ve got to change /home/foo/bin with a directory or file that exists in your home :

case "$1" in
start)
while [ ! -e /home/foo/bin ]; do
sleep 2
done
$SCRIPTNAME start
;;
(…)

Then we have to modify the way the init script is invoked at boot time, because otherwise the sleep 2 instruction will make your boot process hang. So first remove all symlinks to your init script in /etc/rc*.d :

update-rc.d -f crashplan remove

And add the following line to /etc/rc.local :

/etc/init.d/crashplan start &

You could also add kill symlinks but that doesn’t seem mandatory as the default CrashPlan install doesn’t seem to do it.