LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 10-27-2011, 05:38 AM   #1
ThatPerson
Member
 
Registered: Aug 2011
Location: Somewhere in a land far, far, away.
Distribution: Linux Mint 14, OpenSUSE 12.3 RC1
Posts: 223

Rep: Reputation: Disabled
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.

Last edited by ThatPerson; 10-27-2011 at 05:41 AM.
 
Old 10-27-2011, 05:57 AM   #2
droyden
Member
 
Registered: Feb 2007
Location: UK
Posts: 150

Rep: Reputation: 19
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
 
1 members found this post helpful.
Old 10-27-2011, 06:09 AM   #3
ThatPerson
Member
 
Registered: Aug 2011
Location: Somewhere in a land far, far, away.
Distribution: Linux Mint 14, OpenSUSE 12.3 RC1
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by droyden View Post
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
Thanks for the tips, I will look into them later. By the second one, couldn't I also set them up as FTP servers, and FTP from one to the other to put the new stuff on, and have it set to the directory? How would this be done?
 
Old 10-27-2011, 06:58 AM   #4
m_kane
Member
 
Registered: Jan 2009
Posts: 30

Rep: Reputation: 2
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.

Last edited by m_kane; 10-27-2011 at 07:01 AM.
 
Old 10-27-2011, 07:15 AM   #5
ThatPerson
Member
 
Registered: Aug 2011
Location: Somewhere in a land far, far, away.
Distribution: Linux Mint 14, OpenSUSE 12.3 RC1
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by m_kane View Post
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.

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?
 
Old 10-27-2011, 01:29 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
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.
 
Old 10-27-2011, 01:41 PM   #7
m_kane
Member
 
Registered: Jan 2009
Posts: 30

Rep: Reputation: 2
Quote:
Originally Posted by ThatPerson View Post
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?
Files will stay, nfs just shares directories to other users.
 
Old 10-27-2011, 01:47 PM   #8
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
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.
 
Old 10-27-2011, 02:46 PM   #9
ThatPerson
Member
 
Registered: Aug 2011
Location: Somewhere in a land far, far, away.
Distribution: Linux Mint 14, OpenSUSE 12.3 RC1
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by David the H. View Post
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.
Perfect. Thanks!

Quote:
Originally Posted by k3lt01 View Post
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.
As I said in the first post, I have tried things like DropBox and Ubuntu One and found them too slow.
 
Old 10-27-2011, 04:19 PM   #10
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
Quote:
Originally Posted by ThatPerson View Post
As I said in the first post, I have tried things like DropBox and Ubuntu One and found them too slow.
Are you sure there may not be another issue then? I would be checking your connection then because I have no such problem with DropBox and I have some pretty big files in my DB folder. I have heard UbuntuOne can be slow but I have never used it so cannot comment.
 
Old 10-27-2011, 04:27 PM   #11
ThatPerson
Member
 
Registered: Aug 2011
Location: Somewhere in a land far, far, away.
Distribution: Linux Mint 14, OpenSUSE 12.3 RC1
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
Are you sure there may not be another issue then? I would be checking your connection then because I have no such problem with DropBox and I have some pretty big files in my DB folder. I have heard UbuntuOne can be slow but I have never used it so cannot comment.
Very slow web connection. About 200KB/s download, and 40KB/s upload. For a 1MB file, it takes quite a while. I am going to have a look into dropbox, just incase.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do make an exact copy of my Linux drive? joseph2020 Linux - Hardware 23 01-30-2010 01:41 PM
Determining the exact make of an Ethernet card punt Fedora 2 12-01-2006 04:12 PM
make exact copy of hda1 for new HD nephish Linux - General 5 06-24-2006 05:49 PM
How to make exact computer disk image? k-kid Linux - General 2 02-04-2005 11:44 AM
make an exact copy of Fedora from 1 PC to another lothario Linux - Newbie 1 06-04-2004 01:34 PM


All times are GMT -5. The time now is 03:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration