Is sshfs+encfs stable?

Solution 1:

Well, I have a friend who makes backup to my server using that very method. According to him it works well.

Dealing with SSHFS and EncFS there are a few potential caveats to be aware of, such as uid mapping, workarounds for rename behaviors etc. Last year I did a writeup on how to use rdiff-backup across SSHFS and EncFS. Those pointers might very well also apply on your backup software.

http://wiki.rdiff-backup.org/wiki/index.php/BackupToSshfsMount
http://wiki.rdiff-backup.org/wiki/index.php/BackupToEncfsAcrossSshfs

Of course, as with any other backup solution is should be properly tested. That also includes doing test restores.

Solution 2:

I've been using encfs -> sshfs for some months now and have not had to restart it or kill any hung processes etc. However when I layered posixovl on top of those - so that all my local users could have proper ownership and file permissions on the remote file space (which was under a single account in a different username-space) - it hung within a day. When I removed posixovl (fuser -m and umount -l are damned useful!) everything started working nicely again. Didn't need to restart sshfs.

This is how I have the three fuse filesystems set up.

As the user who owns the remote account:

sshfs username@remote-site:/home/username/encrypted ~username/remotesite-encrypted  -o idmap=user -o uid=`id -u` -o gid=`id -g` -o reconnect -o allow_root
encfs ~username/remotesite-encrypted ~username/remotesite -o allow_root

As root:

/usr/local/sbin/mount.posixovl -F -S /home/username/remote-site/user-directories /remotesite  -- -o allow_other