LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 01: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 01:50 PM.
 
Old 09-06-2013, 04:12 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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, 07:53 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
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, 09:44 PM   #4
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248
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, 08:17 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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



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 06:00 PM
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 03:23 AM
[SOLVED] rsync execution issue with crontab - Have given full path to rsync too!! Prabagaran Linux - Server 6 04-15-2011 01:39 AM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 09:48 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM

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

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