LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-05-2012, 01:18 PM   #1
theace18
LQ Newbie
 
Registered: Jun 2012
Posts: 25

Rep: Reputation: Disabled
rsync and du sizes differ


Hey Everyone,

I am trying to rsync some things from my server to a backup server offsite. However when I run a du on the server and a du on the offsite backup server, their sizes are WAY different

Primary Server:

[root@mediaserver media]# du -chs
1.5G .
1.5G total


Backup Server:

[root@linux-backup media]# du -chs
15G .
15G total


Here is a sample of my rsync command that I am using:

rsync --stats --archive --delete --recursive /media/ root@10.10.10.73:/media/


Am I doing something wrong? Not sure the size on my backup server differs so much. Any help would be greatly appreciated. Thanks!

- Philippe
 
Old 06-05-2012, 01:47 PM   #2
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 3,199

Rep: Reputation: 1136Reputation: 1136Reputation: 1136Reputation: 1136Reputation: 1136Reputation: 1136Reputation: 1136Reputation: 1136Reputation: 1136
What kind of files are you backing up? The typical answer is you have some hard links in your source, which are then being expanded in the copy. For example, you might have a 100MB file, and then three hard links to it. On the source machine it's just four links to the same 100MB, so total disk usage is 100MB, but a standard rsync call would copy over the four links as four separate 100MB files, using 400MB of disk space on the destination machine.
 
Old 06-05-2012, 01:53 PM   #3
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,139

Rep: Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363
if you have sparse files you would need -S also: http://extrabright.com/blog/2007/06/...es-with-rsync/.
also there can be other files on the target, have you tried a deeper compare on the differences? Would be much better if you found a file or a single dir to compare.
 
Old 06-05-2012, 02:27 PM   #4
theace18
LQ Newbie
 
Registered: Jun 2012
Posts: 25

Original Poster
Rep: Reputation: Disabled
Ah hard links! Forgot about those guys. Makes sense now. Thanks!
 
  


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
differ in signedness ge1 Programming 1 07-13-2011 04:27 AM
How does one Distro differ from another? theif519 Linux - Newbie 6 05-12-2011 04:30 PM
IMP: How Linux like OS differ kumars.nitin123 Linux - Desktop 2 10-30-2009 09:10 PM
define different physical sizes on Multiple Monitors of different sizes MasterC Linux - Desktop 2 03-18-2008 05:24 PM
sw RAID - mdadm - Almost Done! - HD sizes differ slightly Supafast Linux - General 1 07-27-2005 12:30 PM


All times are GMT -5. The time now is 05:08 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