Solved

RSYNC

Posted on 2013-06-03
8
1,506 Views
Last Modified: 2013-06-05
Hi,
I have a new server and now did make a copy of the old server on the new one since the new one has much more space.
I used rsync but I noticed that it said something that it also did send files to my old server. I do not want this, I basically only wanted to copy one way, but I though rsync would be better then copy because I could "sync" it later just before closing the old machine to ensure I got the final updated copy of the old server on the new one without coping all again. So I though I used the -a option to archive only. Specifically I used:

rsync -avz root@000.000.000.000:/ /mnt/old_server/var/

it seemed to work fine but I do not understand that when I run it, it told me the following:

sent 9078091 bytes  received 7316092528 bytes  2774160.43 bytes/sec
total size is 103629161570  speedup is 14.15
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1505) [generator=3.0.6]

Is this "sent" just signals or did it "sync" files back to the old server?
If so how do I prevent this and only have it synced one way from the remote to local. Preferably, I like to run the command on the destination server (local) as I did with the command above.

However I would like to delete files on the destination that are no longer on the remote server such as session files, etc.

Maybe it is also false alarm if this data is only some signals send.

I appreciate any comment.

Best wishes,
Thom
0
Comment
Question by:Thomanji
  • 4
  • 2
  • 2
8 Comments
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
If you run rsync from the old to the new then it will sync what has changed on the old to the new.

If you want to delete files that are no longer on the old, from the new, use the --delete option like:
             rsync --delete -avz  

Chances are the error you received is a permission issue. Since you are running rsync in the verbose (v) mode you should see the specific error.

Are you the owner of all the files on the old system?
0
 

Author Comment

by:Thomanji
Comment Utility
Thanks for the info.
I am not concerned about the error since it simply says that some files have changed which is to be expected since there are lots of temp files.

I just do not want that it writes back any files from new server to the old one. I just like to have a clear copy of the old server on the new and want to ensure that data are only synced one way from old to new and not back.

All files should be sort of owned since I login using root
0
 
LVL 20

Accepted Solution

by:
carlmd earned 500 total points
Comment Utility
You should be good.

Using the "rsync from to" command will only put files from the "from" on the "to" system, not the other way.
0
 

Author Closing Comment

by:Thomanji
Comment Utility
ok, thanks for the confirmation
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 27

Expert Comment

by:serialband
Comment Utility
The "sent" is just the file "checksum fingerprints" to see if the files are identical or not.  If the files are identical, they don't get transfered, saving you time and bandwidth in the rsync process.
0
 

Author Comment

by:Thomanji
Comment Utility
Thank you very much serialband, this was actually the answer to my question. Thank you for confirming this and sorry but I did already assign the points.
0
 
LVL 27

Expert Comment

by:serialband
Comment Utility
That's ok, I didn't do it for the points.  I just figured that you might want to actually know what that sent data actually was.
0
 

Author Comment

by:Thomanji
Comment Utility
much appreciated
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now