1834142 Members
2325 Online
110064 Solutions
New Discussion

Re: fbackup Index

 
Timothy P. Jackson
Valued Contributor

fbackup Index

Hello Everyone!

I am having a problem understanding the what is put in an fbackup index. I am using fbackup to transfer data from one machine to another over an NFS mount. I need to verify that transfer completed successfully. To do this I am using "ls -R dir1 | wc -l" which gives me a total file count.

Here is where it gets a little wierd. Because I am excluding some files from dir1 so that they will not be transfered to the other machine, I need to find another way to make sure all the files transfered. I figured that I could do a "cat indexfile | wc -l" to get a total of what fbackup transfered. Unfortunately these counts do not match up. Here is what I am getting if I transfer data from dir1 on local machine to dir2 on a remote machine.

dir1 = 5965 files
dir2 = 5949 files

The difference between the two counts might be explained because I am excluding some files/directories in my graph. But when I do my "cat indexfile | wc -l" I get a file count of 5886 files.

Does any one have any idea why the index has fewer entries then files transfered?

Sorry for being long winded and I hope I explained it so that you can understand it.

Any help would be greatly appreciated!!

Tim

2 REPLIES 2
Bill Hassell
Honored Contributor

Re: fbackup Index

ls -R contains a *lot* of extra junk if you are trying to count files and directories. It will have blank lines, the name of the next directory on a separate line and if your ls command is aliased to ls -a, the 'hidden' files . and .. will be shown. So ls is the wrong command to use.

Instead, use find as in:

find dir1


Bill Hassell, sysadmin
Timothy P. Jackson
Valued Contributor

Re: fbackup Index

Thanks Bill!!

I really appreciate the help. This is one of those times where I was trying to make things more complicated then they really were. Your solution works great!