LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2016, 01:20 PM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Rep: Reputation: Disabled
rsync [...] --delete - number of files not the same


I run a command like this on a 1.1TB site:

rsync azh e 'ssh p 54321' root@123.456.789.0:/home/www/html/site_name/ /home/01/backup/site_name --delete

The first machine is a hosting plan and the second is a Cygwin64 installation on Win 7 (I am backing up a site from a hosting plan to the Win 7 with Cygwin).

After this has completed, I run something like this on both sides (hosting and Win 7):

find /home/www/html/site_name -type f | wc -l

to count the number of files in the backup directory, recursively, and the numbers are not the same. I get something like:

A) 9,793,041 - the hosting plan, and
B) 9,795,586 - Cygwin

I already run the rsync command with the --delete option at the end and the number of files is not the same. Does anybody have an idea what could be the reason for that?

Thanks.

###Edit:
I've actually checked the hosting plan now, and the number of files went up to 9,797,707. I am not sure what the reason could be, as the number of files should be static. I guess I can ask the script support about that. Either way, the --delete option is good and it should work as expected (just make the set A and set B exactly the same)?

Last edited by AdultFoundry; 10-29-2016 at 01:33 PM.
 
Old 10-31-2016, 06:05 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,082
Blog Entries: 3

Rep: Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665
The question has aged a bit, so I'll take some guesses. Maybe it is something with cygwin? Maybe you could investigate what are the differences with "diff"? For that, I'd try running "find" on the cygwin machine and make a list of files:

Code:
find /home/www/html/site_name -type f -print > cygwin.files
Upload that to your hosted service.
Then on your hosted system,

Code:
find /home/www/html/site_name -type f -print > hosting.files
and there check with "diff"

Code:
diff <(sort hosting.files) <(sort cygwin.files)
That will show with a > or a < which file has an extra name. Maybe that differences will give a clue.


Edit: also maybe the -h should really be an -H instead, but I can't see that affecting the results.

Last edited by Turbocapitalist; 10-31-2016 at 06:07 AM.
 
Old 11-01-2016, 04:01 AM   #3
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
This turned out to be the file system cache. I can omit two of the folders and the number of files will be the same.
 
  


Reply

Tags
cygwin


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
rsync fork failed because of very large number of files transfer unclesamcrazy Linux - Newbie 10 11-24-2015 01:30 AM
how to delete number of files packets Linux - Newbie 8 02-09-2015 08:46 PM
need to rsync only selected files (--files-from) also need to delete files on dest. ? BrianK Linux - General 5 10-22-2009 10:52 PM
how to delete *~ files created by rsync cyrilng Linux - Software 5 06-23-2009 02:04 AM
Based on what condition, will rsync delete files? edenCC Linux - Software 6 04-09-2009 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:40 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
Open Source Consulting | Domain Registration