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 often develop and test code on several remote machines, which aren't all on the same NFS filesystem. For interactive work, I usually use SSHFS to mount remote filesystems on my local machine. For example:

mkdir ~/machine1
sshfs me@machine1.domain.org: ~/machine1 #mount machine1's home directory locally

I've been using CrashPlan for the last couple of years to back up my local hard disks. I'd like to start using CrashPlan to backup remote disks that are mounted locally.

In the CrashPlan UI, it gives me the option to back up ~/machine1. However, CrashPlan thinks that the ~/machine1 directory is empty, even when machine1.domain.org is mounted there.

How can I get CrashPlan to "see" drives that I've mounted using SSHFS?


A few closing thoughts:

  • I expect that backing up an SSHFS-mounted drive will be pretty slow. I'm not too worried about the speed; I just have small bits and pieces of data on each of these remote drives.
  • I could probably install CrashPlan on all the remote machines. But, this would be my last resort: CrashPlan doesn't have a command-line interface that I know of, so managing CrashPlan on a headless machine isn't very fun.
share|improve this question

2 Answers 2

up vote 1 down vote accepted

The reason why it isn't working is that no other user than your user can see sshfs mounted directories. Unless Crashplan is running as your user it won't be able to back it up. You can try it for yourself:

sudo -i
ls -al ~me/ | grep machine1
ls: cannot access /home/me/machine1: Permission denied
??????????   ? ?       ?              ?              ? machine1

There is a way to do mount sshfs to make files available for root too or everyone on the machine. If Crashplan is running as root you should only make it available for root.

sshfs -o allow_root me@machine1.domain.org: ~/machine1 

Or you can allow anyone (including root) on the machine to see your files with:

sshfs -o allow_other me@machine1.domain.org: ~/machine1 

You may need to allow for these flags in /etc/fuse.conf:

gksudo gedit /etc/fuse.conf

Change the line:

#user_allow_other

to

user_allow_other

You also need to be in the fuse group. run groups and if you are not fuse is listed you need to run:

sudo addgroup <your user> fuse

Then logout and in again and it should work.

share|improve this answer
    
I added user_allow_other to my /etc/fuse.conf. When I do sshfs -o allow_other, I get the error fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf. ls -l shows the mounted directory like this: drwxr-xr-x 1 5034 ssh 8192 Aug 25 22:11 machine1. Is there anything I can do to force allow_other to work? (I've had allow_other in the fuse.conf all along, and it hasn't seemed to help with CrashPlan's problem.) –  solvingPuzzles Aug 27 '13 at 1:33
    
Never mind.. it worked! Needed to chown me /etc/fuse.conf. Now, sshfs -o allow_other works, and CrashPlan's stuff works properly with the sshfs directories. –  solvingPuzzles Aug 27 '13 at 1:50
    
The reason it didn't work was because your user was not in fuse group or you hadn't started a new session after the change. Chown is unwise. –  Sylwester Aug 27 '13 at 7:44

Actually, running CrashPlan on a headless machine is kinda fun.

See http://support.crashplan.com/doku.php/how_to/configure_a_headless_client

You might prefer this because you'll get more granularity on setting up how the backups run.

share|improve this answer

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.