Missing files after full sync

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
ron_uit_best
Posts: 32
Joined: 25. Oct 2009, 09:36
Location: Netherlands

Missing files after full sync

Post by ron_uit_best »

Hey,

Most probably not Salix-related, but after a full synchronisation with grsync it seems not all files are copied. The strange thing is that when I rightclick for properties in my home directory 'images' it says about 6900 files. On the Nas (target dir for grsync) it says 5200 files.

When I export the 'ls' command in my images dir to a text file and do the same for the target dir, both are equally long. There are no hidden files in my images directory. There is also about 4G missing out of 15G.

Could it be that the info in rightclick for properties are incorrect? What can I try to verify I am not missing anything I would like to keep?

Tnx, Ron
User avatar
gapan
Salix Wizard
Posts: 6362
Joined: 6. Jun 2009, 17:40

Re: Missing files after full sync

Post by gapan »

Could it be a problem with wrong permissions?

If the properties window does not display the right number of files/sizes, try using du -h from inside both of your images directories. Is the same filesystem used in both drives?
Image
Image
ron_uit_best
Posts: 32
Joined: 25. Oct 2009, 09:36
Location: Netherlands

Re: Missing files after full sync

Post by ron_uit_best »

Hey Gapan,

Tnx for answering. the command du -h gives the opposite: 15G on the local side and 18G on the side of the NAS. This NAS is a Conceptronic CH3HNAS, Raid 1 configuration, no idea what filesystem it uses. My local harddisk uses Ext4.
The permissions in the images folder are all set to my own user account. That's why I chose this folder to compare; there should be no difference.

Maybe ' du' has options that can show the number of files? Since my comparison in Openoffice (1st post) shows no differences.
This is pretty confusing and all I want is a reliable backup, one that uses rsync (so I don't have the need to install the backup software in order to retrieve lost data).

Ron
User avatar
gapan
Salix Wizard
Posts: 6362
Joined: 6. Jun 2009, 17:40

Re: Missing files after full sync

Post by gapan »

This is probably due to the different file systems. One way to figure it out, could be to create a tarball of the files in one drive and then another tarball of the files in the other drive. Put them in the same location and see if the size is the same. Don't compress the tarball, just tar it.

One other thing could be to run

Code: Select all

find ./ -type f | wc -l
in each location, see if you get the same number of files.
Image
Image
ron_uit_best
Posts: 32
Joined: 25. Oct 2009, 09:36
Location: Netherlands

Re: Missing files after full sync

Post by ron_uit_best »

Hey Gapan,

Tnx very much! your find command gave a number of 6917 in the local folder and 6915 in the target dir. So only 2 files difference. Could be links of backup files of a certain image, I don't know and it is only 2, so I don't bother much about it.

Tnx again; will try it on more folders soon. And I will from now on, use the find command to put all files in a certain directory structure in a text file.

Regards, Ron
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: Missing files after full sync

Post by damNageHack »

You could also do the following command in terminal, then you will see which files are different.

Code: Select all

diff -rq <source> <target>
Replace <source> with the name of your source folder and <target> with the name of a folder to compare with.
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Missing files after full sync

Post by thenktor »

I'd suggest to use rsync instead of grsync. Run as root:

Code: Select all

rsync -av --del /home/pictures/ /mnt/nas/pictures/
Note the trailing slashes (or see the rsync man page). This comamnd gives nice verbose output and preservers all file attributes.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
ron_uit_best
Posts: 32
Joined: 25. Oct 2009, 09:36
Location: Netherlands

Re: Missing files after full sync

Post by ron_uit_best »

I used to use rsync, but on my Nas there is no rsync running, so I thought I could not use it. But I mounted the Nas-drive as a network folder and rsync works fine on it. I tried DirSyncPro (memory error) en Backintime (screen blinks then program ends).
I hoped for a GUI solution. But I don 't mind using my old scripts again. I use 'rsync -vlrpogtE --delete source target'
But I see -a does most of it already and I have to remove the -g option: -a --no-g
If not I get this error:

Code: Select all

rsync: chgrp "/drives/Nas_Backup/Afbeeldingen/Ron/2008-Noorwegen/Esther/DSC03164.JPG" failed: Permission denied (13)
Without the -g option there is no problem. Why do I have to use root, Thenktor? Every file to backup is in my homedir. Or is there a specific reason?

Ron
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Missing files after full sync

Post by thenktor »

IIRC the "-a" option only works as root, but I could be wrong.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
Post Reply