Solved

RSYNC

Posted on 2013-06-03
8
1,590 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 20

Expert Comment

by:carlmd
ID: 39216235
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
ID: 39218973
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
ID: 39219009
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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Closing Comment

by:Thomanji
ID: 39221122
ok, thanks for the confirmation
0
 
LVL 29

Expert Comment

by:serialband
ID: 39223175
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
ID: 39224425
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 29

Expert Comment

by:serialband
ID: 39224607
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
ID: 39224630
much appreciated
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

697 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