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 want to mount a shared directory on my mac into a folder on my Ubuntu server so that I can copy backup files to the mac using some sort of automation.

Before I even start on the whole automation thing I would like to be able to mount the directory manually.

Oh how I have Googled! I have come up with many versions the mount command. The one that came closest to working (that is, it asked for my password and didn't object to the answer) was this:

sudo mount -o user=**** //192.168.1.4/server_backups /files/mountpoint

It produced the following error:

mount error(95): Operation not supported

Am I on the right track? I have tried various versions of the command. Either it fails on authentication or I get the above error.

Any help or advice would be greatly appreciated,

thanks,

Simon.

share|improve this question
    
Simon, check this link out. It looks like someone got it working. superuser.com/questions/185707/… –  amanthethy Jul 30 at 16:12
    
@amanthethy Thanks for supplying that link. Unfortunately it doesn't help. I am using Ubuntu in a command line only environment and that solution requires a graphical interface. –  Simon Jul 30 at 16:23
    
You should look into using SSHFS instead of mount then. linuxnix.com/2011/03/mount-directory-locally-linux-sshfs.html and support.apple.com/kb/PH13759 –  amanthethy Jul 30 at 17:15

2 Answers 2

up vote 1 down vote accepted

A shared folder is not the best way if you want to automate backups to your mac

Instead enable SSH on the Mac on and transfer your backups over it.

Go into System Preferences’. Under ‘Internet & Networking’ there is a ‘Sharing’ icon. Run that. In the list that appears, check the ‘Remote Login.

Since you want to use automation. this will serve quite good.

Here is an example of how copy a folder from your Ubuntu computer to your mac

rsync -azvr /path/to/source/folder MAC:/path/to/where/you/want/to/saveit/

where MAC is the ip address of your mac the good thing with rsync that if you re-run this command it will only copy the changed files from the source directory over to your mac saving time and bandwith.

the z flag adds compression. If you are copying a lot of already compressed files like movies, images or mp3s you don't gain any speed in using it

IF you still want some kind of drive mapping so you can browse the computer from guy. It can also be done over ssh with the help of sshfs

on your ubuntu computer install sshfs. Then add your user to the fuse group and finnally mount the remote server

from terminal:

sudo apt-get install sshfs #to install sshfs
mkdir macfolder 
sshfs username@MAC:/ macfolder

will mount your mac root filesystem under the folder macfolder

share|improve this answer
    
Thanks for that tomodachi - I like the look of this solution, I shall be trying it in the morning. I still want to acheive the drive mapping, the solution above looks good but this solution looks just right for backup purposes. –  Simon Jul 30 at 17:35
    
@Simon added instruction for mounting the folder over ssh as well –  tomodachi Jul 30 at 18:48
    
Yes, that all worked thank you tomodachi. rsync is definately the solution for me regarding the backups. The sshfs solution will be most useful for other purposes. rsync has given me another problem but I think i should open a new thread for it. –  Simon Jul 31 at 9:19

How to mount SSH locations using SSHFS.

Step 1:

  • "On your Mac, open Sharing preferences if it isn’t already open, then select Remote Login. Selecting Remote Login also enables the secure FTP (sftp) service."

Step 2:

  • From Ubuntu, install SSHFS sudo apt-get install sshfs.
  • Make a mount point. #mkdir /mnt/macMount
  • Mount the SSH Folder #sshfs YOUR_MAC_USERNAME@YOUR.MAC.IP:/ /mnt/macMount/
  • Then check to see it worked. cd /mnt/macMount and ls to confirm things are where they should be
share|improve this answer
    
Thanks amanthethy ... I will try this one in the morning. –  Simon Jul 30 at 17:33
    
This worked ... thanks amanthethy. –  Simon Jul 31 at 9:16

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.