You are not logged in.

#1 2009-04-17 21:52:37

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Auto keep files in sync between 2 network machines

I'm running Arch Linux on a machine and Windows Vista on another and there are a bunch of files that I would like to keep in sync in both of them. Both have their own copy of the files...

If I do a change in a file/folder on Arch (renaming, moving, deleting, modifying, etc...) I need that change to be reflected on the Vista machine. As far as I can tell, I would need to have some software on both machines to keep them in sync and I'm starting with Arch.

Is there anything I could use to, when a file/folder modification is detected, to immediately and automatically reflect that change on a network folder?

I'll worry with the Vista bit after this first "phase" on Arch.

Much like Dropbox but on a network level and without any centralized file repository. I've been trying Dropbox but it doesn't quiet work as I expected, doing the changes on Dropbox's server and then reflect them on the second machine takes more time than to do it directly to a folder through the network.

Well, we could not even see this as network, I just need a folder's modifications in it's files/folders to be automatically reflected on a different folder, it could even be in the same machine. I just need that type of action immediately and automatically.

Is there anything for this?

Last edited by Nazgulled (2009-04-17 21:55:13)

Offline

#2 2009-04-18 00:05:09

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Auto keep files in sync between 2 network machines

Have a look into rsync which should be able to do what you're looking for, assuming you can mount Vista's hard drive on your Linux machine, or you want to run Cygwin to get rsync on Vista.

Offline

#3 2009-04-18 14:57:18

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: Auto keep files in sync between 2 network machines

I've looked at rsync in the past but I don't see how can I use it to update the files, as soon as change is made to a specific folder, without any user interaction...

Offline

#4 2009-04-18 18:59:03

Tenken
Member
Registered: 2008-02-01
Posts: 126

Re: Auto keep files in sync between 2 network machines

You can't get rsync to update instantaneously, but you could add it to your cron to run every minute.

Last edited by Tenken (2009-04-18 19:00:27)

Offline

#5 2009-04-18 20:30:59

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: Auto keep files in sync between 2 network machines

If you're considering rsync then you should also look at unison, it's multi platform and easily replicates both ways: http://www.cis.upenn.edu/~bcpierce/unison/


You need to install an RTFM interface.

Offline

#6 2009-04-18 21:58:11

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Auto keep files in sync between 2 network machines

Are both these machines always on the network? If so I would recommend setting up a nfs share.


Website - Blog - arch-home
Arch User since March 2005

Offline

#7 2009-04-19 01:02:44

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: Auto keep files in sync between 2 network machines

Tenken wrote:

You can't get rsync to update instantaneously, but you could add it to your cron to run every minute.

That's unacceptable for what I need, I need it to be updated as soon as I press the "save" button.

pyther wrote:

Are both these machines always on the network? If so I would recommend setting up a nfs share.

Never heard of nfs shares... Just took a quick look at the wiki and I guess I need a server on one machine and a client on the other. I would prefer to have the server on Vista, what would I need for that? And for the Arch client, just reading the wiki would probably be enough?

Offline

#8 2009-04-19 01:56:35

PinkFloydYoshi
Member
From: United Kingdom
Registered: 2008-11-20
Posts: 29

Re: Auto keep files in sync between 2 network machines

I think he means he wants some redundancy rather than a central point (an NFS share or Samba share), but still keep something accessible from both machines. rsync, again, every minute would do this, however connection between both machines would have to be maintained. rsync will keep two folders in sync (and won't update files that already exist, but rsync is very flexible in that you can change exactly how it does things) but you'd, as has been said, have to run every minute in order for it to keep the folders in sync.

Nothing else is coming to mind. If it's a form of reduncancy you're after, I might suggest setting an el cheapo box up with a pair of disks of desired size, and use software RAID to create a RAID1 array. Or, you can do what I did and get an HP proliant with a SmartArray card in and hardware RAID1 the drives together. If that's tickled your fancy though, eBuyer have some ProLiant ML115's and ML110's that can do hard RAID with SATA drives that they're selling cheap. Not the cheapest they've been but the servers fluctuate in price so regularly you never know when you'll see it so low again.

Oh, also, a nightly sync has it's advantages too. If ever you delete a file and you have a nightly sync you can just get the file back off the nightly, but if you've got hundreds and hundreds of GB's worth of data, that might be getting toward costly, especially if you do what I do and keep the last 5 days worth of data across 5 1.5Tb Seagate Freeagent drives.

Last edited by PinkFloydYoshi (2009-04-19 01:59:50)

Offline

#9 2009-04-19 12:18:47

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: Auto keep files in sync between 2 network machines

Not what I'm looking for, but thanks.

Offline

#10 2009-04-19 14:23:19

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Auto keep files in sync between 2 network machines

Woops it helps when I read the first post more carefully. Microsoft does not support a nfs. However you can share a folder in windows and then mount it using cifs in linux.


Website - Blog - arch-home
Arch User since March 2005

Offline

#11 2009-04-19 14:40:53

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: Auto keep files in sync between 2 network machines

I've tested in the past, it didn't work as I expected...

Nevermind, I'm sick of this, I'm just going to use VirtualBox's shared folders. It also doesn't work as I expected but it works better than any other solution I tried...

Offline

#12 2009-04-19 14:43:26

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Auto keep files in sync between 2 network machines

How are you excepting it to work?


Website - Blog - arch-home
Arch User since March 2005

Offline

#13 2009-04-19 14:50:05

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: Auto keep files in sync between 2 network machines

I really appreciate your help but forget about it. At least for the time being.

I honestly don't have any more time to waste with this, I'm way behind schedule with my projects as it is...

Offline

#14 2009-04-19 16:01:38

akira86
Member
Registered: 2009-01-16
Posts: 119

Re: Auto keep files in sync between 2 network machines

In that case : for other readers
RAID 1 through the network : http://www.linux.com/feature/137516

Offline

Board footer

Powered by FluxBB