jacknjill
Posts: 1
Joined: Wed Sep 12, 2012 5:47 pm

File server with auto synch of folders?

Wed Sep 12, 2012 5:52 pm

I want firstly to use a Raspberry pi as a general NAS server holding system backups, videos, music, pictures etc, I’m going to use samba for these purposes.

Secondly I want to have several folders that I work on often, synched between my laptop; my desktop and my NAS server. So that when I save a file in my uni folder on my laptop, it updates my NAS server uni folder, and when my desktop is switched on, the NAS server will update the desktop uni folder. Most of the time the files I’ll be working with will be small excel,word,pdf etc files, no large media files being synched constantly. One thing I would like to clarify is that I’m not content to just save it to a single shared folder on my server as I’ll need to access these files on my laptop when I’m out of town at my uni campus/don't have internet access, also I like the idea of important work being backed up of three different hard drives.

My question is can samba do this? Is it somewhat straightforward to setup? Is there an alternate solution that does what I require? Thanks a lot.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: File server with auto synch of folders?

Thu Sep 13, 2012 9:59 am

Everything you want is possible.
Straightforward to setup ? I'm not sure. I heard that NFS is faster than SMB.
Anyway , format your drives as ext4 , or else you'll get bad performance.
Then i would look into rsync or rsync-based tools. AFAIK it does file-deltas.
Then things like port-forwarding and dyndns setups (to have access from everywhere)


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

argief
Posts: 18
Joined: Sat Aug 18, 2012 6:35 pm

Re: File server with auto synch of folders?

Fri Sep 14, 2012 10:41 pm

Here is a comparison of transfer speeds for different networking filesystems:
http://wdtvforum.com/main/index.php?topic=5393.0

NFS is faster by far. However, keep in mind that NFS is not that well supported in Windows. There are workarounds, and since Win7 you can install the add-on for NFS support (if you have Win7 Professional). I also find NFS to browse and connect faster, which just makes it feel more stable. It is also considerably less complicated to setup than SAMBA.

sharpapotheosis
Posts: 58
Joined: Thu May 24, 2012 6:47 pm

Re: File server with auto synch of folders?

Wed Sep 19, 2012 10:53 am

I'm not sure if there's a Windows version, but I'm using unison for the syncing aspect, and cron to schedule/automate it.

purg
Posts: 22
Joined: Fri Jun 08, 2012 8:07 pm

Re: File server with auto synch of folders?

Fri Sep 21, 2012 2:39 pm

I also use the RPi as backup / sync location also as a gateway to sync to remote host. The remote part prevents the laptop needing to upload at my DSL speed moving the task to RPi which stays online 24/7.

UNISON version 2.32.52 is the key, both versions exist on Windows and Debian. One drawback, all systems must have the same verison. Ive just been lucky, my online host has this 2.32.52 version allowing a remote backup too.

XP, Windows 7 laptops and RPi sync together
RPI to online host sync over night ensuring everything is remotely backed up

http://www.cis.upenn.edu/~bcpierce/unison/download.html

If you also want a remote hosted location (shell, VPS style of hosting) because sometimes you're unable to install on this location, this must be the unison version for all devices. If only local using RPi & laptop you control the version installed. Ive written a few autoit automation scripts for the windows unison side i'll try to post later if requested.

anotherbloke
Posts: 22
Joined: Sun Jun 17, 2012 10:30 pm

Re: File server with auto synch of folders?

Fri Sep 21, 2012 4:35 pm

I have a samba share on Pi and use robocopy on my laptop win7 to sync/copy files to the Pi and then use synctoy on my winxp desktop to sync with the Pi.

Maybe not the best setup but it works well and i have copies of files also going into dropbox on my winxp desktop so the files get backed up onto the net.

Virgus
Posts: 2
Joined: Thu Jul 11, 2013 11:34 pm

Re: File server with auto synch of folders?

Sat Jun 25, 2016 4:43 am

purg wrote:I also use the RPi as backup / sync location also as a gateway to sync to remote host. The remote part prevents the laptop needing to upload at my DSL speed moving the task to RPi which stays online 24/7.

XP, Windows 7 laptops and RPi sync together
RPI to online host sync over night ensuring everything is remotely backed up

Ive written a few autoit automation scripts for the windows unison side i'll try to post later if requested.
Hello purg, very nice description of what you did!

Despite 4 years passed I hope you might read this comment of mine.
I'd like more information on what you did exactly as I have the same needs as you described.
I'd love to have a look to your autoit scrips as well as to the RPi side of your solution.

Have a nice day,
Virgus

Return to “Networking and servers”