Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cclloyd

macrumors 68000
Original poster
Oct 26, 2011
1,760
147
Alpha Centauri A
Is there a way I can set up a folder to keep in sync with a FTP folder? Automatically uploaded any changed files the instant they change and any new files added or remove any files deleted. An exact copy of the folder on the FTP.
 

switon

macrumors 6502a
Sep 10, 2012
636
1
RE: RAID 1 or rsync...

Is there a way I can set up a folder to keep in sync with a FTP folder? Automatically uploaded any changed files the instant they change and any new files added or remove any files deleted. An exact copy of the folder on the FTP.

Hi cclloyd,

It depends a little bit on what you mean by "the instant they change". If you truly mean simultaneously, then you are talking about some type of mirroring, generally called RAID 1. If you configure two partitions and RAID 1 mirroring, then any change to a folder on one partition will instantly and simultaneously changed to the identical folder on the other partition.

If, however, by "the instant they change" has some slack built into it, say a minute or so, then you could use the "rsync" terminal commands to perform the copies for you. The nice thing about rsync is that it "knows" (through checksums) when a directory and its subdirectories have changed, what the changes are, and it makes a differential copy over the network retaining ownerships, permissions, and links. You could setup a cron job to run rsync every minute on your FTP folder.

So, as I mentioned, it depends upon what you mean by "instant". If you truly mean instant, then RAID 1. If there is some slack time allowed, then rsync.

...just some thoughts...

Regards,
Switon
 

cclloyd

macrumors 68000
Original poster
Oct 26, 2011
1,760
147
Alpha Centauri A
Well I don't need full on RAID though, since it's only 1 directory with 1 remote directory on my server. But I do mean INSTANT.
 

switon

macrumors 6502a
Sep 10, 2012
636
1
Well I don't need full on RAID though, since it's only 1 directory with 1 remote directory on my server. But I do mean INSTANT.

Hi,

Well, since you really do mean "instant" --- then almost by definition you mean RAID 1. Realize that you could setup two small partitions and do RAID 1 with them, thus when someone writes using FTP it is mirrored instantly to both partitions.

There are probably other instant mirroring tools available, but RAID is the most common one.

Regards,
Switon
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.