On Mon, Jan 18, 2010 at 06:20:27PM +0100, Leonardo Canducci wrote: > I'm using rsync -aHS to backup some stuff (mostly jpgs and > docs from my home) to an external usb hard drive (same > ext3 fs). snip > I've noticed some dir size doesn't match: snip
Ext3 has a limitation in the way it stores directory entries: the space allocated for a directories contents can grow but not shrink. You can test this by creating a new directory, adding a single file, checking the size of the directory, then creating a large number of files ("for i in `seq 1 100000000`; do mktemp --tmpdir=<testdir>& done" or similar): check the size again. Then remove all the files, re-check. Thus checking the size of the source and destination folders is not useful if the rate of change/growth for the folders will differ (which for an active partition and a relatively inactive backup partition will always be the case). The most reliable (imho) way to ensure that you have an accurate copy is an rsync dry run: rsync -van --delete ./src ./dest (or similar). If it says it will make no changes, you're ok. -- Jon Dowland
signature.asc
Description: Digital signature