LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-06-2013, 02:47 PM   #1
ratotopi
Member
 
Registered: Dec 2011
Posts: 114

Rep: Reputation: 6
rsync result


Hi
I created the new partition with the same disk space as the old one and did the rsync of the whole partition. The old partition is mounted as /opt/oracle and the new one is mounted as /new/oracle. I ran rsync command
rsync -avz /opt/oracle/ /new/oracle/
but now /new/oracle partition shows more used disk space then the /old/oracle partition. Why is it so ? what can I do to make it the same. Thank you for your advice

Last edited by ratotopi; 09-06-2013 at 02:50 PM.
 
Old 09-06-2013, 05:12 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,464

Rep: Reputation: 2605Reputation: 2605Reputation: 2605Reputation: 2605Reputation: 2605Reputation: 2605Reputation: 2605Reputation: 2605Reputation: 2605Reputation: 2605Reputation: 2605
rsync is not dd

are the drives 100% identical ?
the same format?
the same block size ?
and did you take into account ".trash" ?
 
Old 09-06-2013, 08:53 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
rsync result

dd is the fastest way to do this as mentioned.

you could also boot up clonezilla for a more gui friendly approach.
 
Old 09-06-2013, 10:44 PM   #4
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 242
Blog Entries: 3

Rep: Reputation: 17
AS refer by "John VV" it should be the same .then below are the command which will work as per your requirement


dry-run (it will show you what file or directory it will sync but it didn't done any thing if need to sync then remove the "-n" switch from the command


rsync -avz -n -X /opt/oracle/ /new

when sync required
rsync -avz -X /opt/oracle/ /new

-X = one-file-system (This tells rsync to avoid crossing a filesystem boundary when recursing)
-n = dry-run (This tells rsync to not do any file transfers, instead it will just report the actions it would have taken.)


rsync -avz -X /opt/oracle/ /new
 
Old 09-07-2013, 09:17 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,360

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
The sizes of directories can be smaller on the new filesystem. In the old filesystem there may be directories that are large because they once contained a large number of files. In the new filesystem, the directories will not have any excess size.
 
  


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
am not getting any result when am using 'if', without getting result for below script alavala53 Linux - General 3 10-25-2012 07:00 PM
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 04:23 AM
[SOLVED] rsync execution issue with crontab - Have given full path to rsync too!! Prabagaran Linux - Server 6 04-15-2011 02:39 AM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 10:48 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration