![]() |
How could I make the a file on two computers the exact same?
I have two computers, both of which I use for development, so I want to have the source code files the same on both. They both run Ubuntu 11.10, and both have the source in the same directories (/home/ben/Programs/C/Crimson), and are both on the same network. Currently, I email the files, or use Bluetooth, however both of these are rather slow at sending them, and I would not know which is the most recent. Is there a program which can be put on both, and get the files (If they are newer, so if computer2 has it updated at 10:00PM, and computer 1 at 9:00PM, it would copy the computer2 one onto computer1, could you tell me? If not, how could I make the file be the same? I have tried Ubuntu One, and products like it, but these seem rather slow at uploading (I have a 40KB/s connection uploading, and 300KB/s downloading, but both computers have 802.11n, which should be much faster, as the folder is 2MB, the uploading would take about 51 seconds to upload and then about 6 to download, a total of 57 seconds, where as using the 802.11n network, it would be done in (If n only reaches about 100MB/s) 0.02 seconds, which is much faster), so I would prefer a application which works on my network.
Oh, by the way, the slow web speeds are because of the service provider. The internal network is Wireless N. |
You could use rsync, but if you are developing you should maybe use source control? Svn or git. You could also use nfs from one of the servers and mount it on hybrid other one
|
Quote:
|
why make it so difficult way?
Just share folder from other computer using nfs and then mount it to other. Then you have files in one location only. This of course means that you must have sharing computer running all time. If you don't want that, then buy a cheap network disk where you store files. Good idea is also backup your files using rsync and cron job regularly, even if you use files from two computers. Then you can easily go back if something happens. If you want to use "cloud", you can setup dropbox folder to both computers. Then dropbox keeps files updated in both automatically. It just copies changed files over network, so I think it fast in your case. |
Quote:
If I use nfs with this tutorial, would the files stay in /home/user with the NFS? If it was turned off would they stay? Would it just be that one PC is connecting to the other's directory? |
You might try the unison file synchronizer.
http://www.cis.upenn.edu/~bcpierce/unison/ It works kind of like a 2-way rsync, and lets you choose which direction to propagate if the same file has been updated differently on both ends. You can even tell it to call an external program like diff in order to merge files if you want. |
Quote:
|
DropBox is one option. Dropbox syncs automatically, as long as you have an internet connection, so the most recent version is always the one that is available.
|
Quote:
Quote:
|
Quote:
|
Quote:
|
All times are GMT -5. The time now is 07:24 PM. |