1

After some trial and error, I've managed to backup my Ubuntu 10.04 workstation and it's time for my Laptop. It also runs 10.04, but has an encrypted /home folder.

Running the below snippet as root clearly doesn't work well with encryption, so how should I do this?

sudo -i
cd /
tar -cvpzf sysbackup-20110821.tar.gz \
    --exclude=/sysbackup-20110821.tar.gz \
    --exclude=/proc \
    --exclude=/lost+found \
    --exclude=/sys \
    --exclude=/mnt \
    --exclude=/media \
    --exclude=/dev /

1 Answer 1

2

From the ecryptfs man page, try to mount it somewhere as a regular folder, and then execute your tar command.

sudo -i
mkdir /mnt/usermount 2>/dev/null
cd /
mount -t ecryptfs /home/user /mnt/usermount -o passwd=<your_pass_phrase> no_sig_cache
tar -cvpzf sysbackup-20110821.tar.gz \
  --exclude=/sysbackup-20110821.tar.gz \
  --exclude=/proc \
  --exclude=/lost+found \
  --exclude=/sys \
  --exclude=/media \
  --exclude=/dev /
umount /mnt/usermount
rm -rf /mnt/usermount

Note above that I removed the --exclude /mnt and also created the directory /mnt/usermount just in case you don't have it.

2
  • What a -o mount option without arguments is supposed to do? I think you messed-up mount command line.
    – enzotib
    Aug 22, 2011 at 21:56
  • Again, I suppose no spaces are allowed in -o arguments. Generally you find them separated by commas without spaces, like for exampe -o defaults,noatime,umask=0022
    – enzotib
    Aug 23, 2011 at 6:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .