LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-03-2006, 06:37 AM   #1
TheBrick
Member
 
Registered: Mar 2006
Location: London
Distribution: SUSE 10.0 Home soon to go (no internet conection), gentoo laptop, slack on development box
Posts: 81

Rep: Reputation: 15
Rsync duplication files


Hello all,

I have been trying to use rsync to keep files updated between two computers. I have tried this with mock file and all seems to work. however when I do it for real it just creats another file of the same name with in the file. My rsync code is

Code:
rsync -vra tommy@192.168.1.5:/home/tommy/fortran /home/tommy/fortran
I have also tried
Code:
rsync -vrU tommy@192.168.1.5:/home/tommy/fortran /home/tommy/fortran
As I understand it both of these should end up updating the files and folders within ~/fortran however what happens is I end up with all of my old files still with in ~/fortran and in ~/fortran/fortran/

e.g
Code:
~/fortran $ ls -l
total 6
drwxr-xr-x  4 tommy users 1648 Jul 10 09:53 ValidatedStrain
drwxr-xr-x  9 tommy users  256 Aug  3 10:23 fortran 
######### My backeding up file has just created a new file all other files are old!###################
drwxr-xr-x  5 tommy users 1688 Jul 10 09:53 random_methods
drwxr-xr-x  2 tommy users 1368 Jul 10 09:54 repeatestrain
drwxr-xr-x  3 tommy users  104 Jul 10 09:54 safe_copy_of_stokesian
drwxr-xr-x  4 tommy users 1592 Jul 10 09:54 shear
drwxr-xr-x  4 tommy users  880 Jul 10 09:54 testing
drwxr-xr-x  2 tommy users  272 Jul 10 09:54 testout
I end up with new copies of all of the files. Please help as it is becoming very difficult keeping track of things. As with every question I ask this is probibly very simple but I am a very simple guy!

Last edited by TheBrick; 08-03-2006 at 06:40 AM.
 
Old 08-03-2006, 07:02 AM   #2
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
This is an excerpt from "man rsync":
Quote:
rsync -avz foo:src/bar /data/tmp


This would recursively transfer all files from the directory src/bar on the machine foo into the /data/tmp/bar directory on the local machine. The files are transferred in "archive" mode, which ensures that symbolic links, devices, attributes, permissions, ownerships, etc. are preserved in the transfer. Additionally, compression will be used to reduce the size of data portions of the transfer.


rsync -avz foo:src/bar/ /data/tmp


A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name", but in both cases the attributes of the containing directory are transferred to the containing directory on the destination. In other words, each of the following commands copies the files in the same way, including their setting of the attributes of /dest/foo:


rsync -av /src/foo /dest
rsync -av /src/foo/ /dest/foo
 
Old 08-03-2006, 07:15 AM   #3
TheBrick
Member
 
Registered: Mar 2006
Location: London
Distribution: SUSE 10.0 Home soon to go (no internet conection), gentoo laptop, slack on development box
Posts: 81

Original Poster
Rep: Reputation: 15
Thanks very much. I had been googling buth every thing I tried ended up with the results I got.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What files to exclude when using rsync TongueTied Linux - General 2 07-20-2006 08:39 PM
can't get rsync exclude files Batta Linux - Newbie 1 03-27-2006 10:39 PM
RSYNC and dot files Buto Linux - General 1 09-22-2005 02:39 PM
rsync skipping files s_siouris Linux - Software 4 04-06-2005 11:00 AM
Server duplication with Rsync... capstone737 LinuxQuestions.org Member Success Stories 0 03-15-2003 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:15 PM.

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
Open Source Consulting | Domain Registration