ecryptfs and storebackup

Alexander Klauer alexander.klauer at googlemail.com
Tue May 29 12:49:28 UTC 2012


Hi,

I'm using Ubuntu 12.04 with an ecryptfs-encrypted home directory. I'd
like to periodically backup my homedir to an untrusted location. To
this end, I use storebackup to backup my encrypted homedir
/home/.ecryptfs/klauer to /var/local/backup and periodically rsync
/var/local/backup to the untrusted backup server.

For the recovery test, I did (as root)

ecryptfs-recover-private /var/local/backup/default/2012.05.16_00.00.02/.Private/

mounting and decrypting my homedir to a location in the /tmp
directory. ecryptfs-recover-private says everything was successful,
however, while the mounted homedir contains  the correct directory
structure, file names, directory time stamps, etc., the file data
themselves are missing. For example, a ls -l in the mounted homedir
yields

ls: cannot access examples.desktop: No such file or directory
ls: cannot access mbox: No such file or directory
total 60
drwxr-xr-x  2 klauer klauer  4096 May 15 14:31 Desktop
drwxr-xr-x  5 klauer klauer  4096 May 15 21:06 Documents
drwxr-xr-x  2 klauer klauer  4096 May 15 12:38 Downloads
-?????????  ? ?      ?          ?            ? examples.desktop
-?????????  ? ?      ?          ?            ? mbox
drwxr-xr-x  2 klauer klauer  4096 Apr 23 15:56 Music
drwxr-xr-x  2 klauer klauer  4096 Apr 23 15:56 Pictures
drwxr-xr-x  2 klauer klauer  4096 Apr 23 15:56 Public
drwxr-xr-x  2 klauer klauer  4096 Apr 23 15:56 Templates
drwxr-xr-x  2 klauer klauer  4096 Apr 23 15:56 Videos

The relevant line of the mount output looks like:

/var/local/backup/default/2012.05.16_00.00.02/.Private on
/tmp/ecryptfs.xxxxxxxx type ecryptfs
(ro,ecryptfs_sig=yyyyyyyyyyyyyyyyyyy,ecryptfs_fnek_sig=zzzzzzzzzzzzzz,ecryptfs_cipher=aes,ecryptfs_key_bytes=16)

An strace of ls -l shows that getdents() returns the entry of, say,
examples.desktop, but lstat() fails with ENOENT.

What am I missing?

Best regards,
Alexander




More information about the ubuntu-users mailing list