Results 1 to 5 of 5

Thread: Syncing with a network folder

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Beans
    33

    Syncing with a network folder

    I'm trying to sync to a folder on my NAS by synology. I have a large music folder that I use accross my network with Windows 7 computers, and my laptop now has 10.10. As I'd like to take the music with me on the laptop, I wish to sync from this network folder to the music folder in my home folder in Maverick. I wish to syncronize both directions. However, all the sync programs I've found and installed (unison, luckybackup, grsync) simply won't recognize the samba network mounted folder. I've tried bookmarking the location in Natilus, and pasting in the actual "smb" address to the drive location field to no avail. I'm a perpetual newbie more or less, so I don't know what to do next. The sync programs all want to work with a "local" folder/drive. Is there a way to trick them into thinking the folder is local? On Windows, I've not had any issue with sync programs such as goodsync or synctoy by mapping a network drive. I don't see a similar solution to this in Ubuntu. Any ideas?

  2. #2
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,134
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Syncing with a network folder

    Sure, unison will handle this for you. I'd probably add a mount option in /etc/fstab to take care of mounting the Windows share. Then, you'll easily be able to run Unison to sync both ways.
    Make the mount point
    Code:
    sudo mkdir /var/music
    Allow your user read/write
    Code:
    sudo chown <user>:<user> /var/music
    *Replace <user> with your username
    Edit /etc/fstab
    Code:
    sudo gedit /etc/fstab
    Paste this at the bottom
    Code:
    //192.168.1.1/music    /var/music cifs  0    0
    mount the share
    Code:
    sudo mount -a
    Sync the files
    Code:
    unison /var/music /home/<user>/Music/
    This would sync from your Windows share to your local user music folder.

    That might not be clear enough to follow, so let me know if you need clarification.

  3. #3
    Join Date
    Jun 2007
    Beans
    33

    Re: Syncing with a network folder

    Rubylaser, thank you! So far so good... I'm halting at the edit of fstab to ask one quick question - is the //192.168.1.1/music a generic address to my windows share of the music folder I want to sync to, or do I need to find that exact address? Forgive the ignorance here, but I know that the address you specified is the address of my Linksys router, but I think the ip address of the Synology NAS is something different, and as the music folder is nested inside another folder, it might be something a little more unique? I can find the Synology ip address in windows, a little unclear as to how to find it in Ubuntu (but am sure its easy with the right terminal commands). Am I on the right track? Thanks again!

  4. #4
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,134
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Syncing with a network folder

    The 192.168.1.1/music is a generic ip address and share name. The /music part will be whatever you made your share name. Your NAS ip address will be the same whether you get it from the Ubuntu install or your Windows machine, since you know how to get it from Windows, just get the ip from there. Also, if you know what the path is to the share from Windows, if you paste it here, I'll show you the correct /etc/fstab line.
    Last edited by rubylaser; February 8th, 2011 at 01:07 PM.

  5. #5
    Join Date
    Jun 2007
    Beans
    33

    Re: Syncing with a network folder

    Yup, got it figured out. I ended up using the authentication method as follows to connect to my share on my Synology NAS:

    //192.168.1.103/myshare/music /var/music cifs credentials=/home/greenearth/Documents/.psswrd,iocharset=utf8,codepage=cp850,noperm,auto 0 0
    Otherwise, I followed your instructions exactly and I'm sync'ed up! Working perfectly! Thanks again for your help...

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •