rsync in Mac OS X Lion to copy a backup directory from my local HD to a network mounted share (local LAN). My goal is to archive the local backup to the network drive, thereby freeing up local disk space.
rsync command I am using is:
rsync -aPW * /Volumes/netshare/path
For some reason, my free disk space is decreasing as rsync runs, and I eventually run out of space. After killing the
rsync process and waiting, the consumed disk space is eventually freed and returns as free space.
It seems as if the copied files are being cached locally (even though they're already on the local drive) prior to being copied by
rsync. I've checked and it's not swap space, and I have 1.5 GB of free RAM as rsync is running.
Has anyone else noticed this and is there a way to disable this caching in
I've tested with
cp, and copying a file in Finder, and free disk space decreases in all 3 scenarios, so it's a general OS issue. I've been using
lsof to see which files
rsync has open, and nothing there appears to be growing in size. My theory has been that the files are being cached somewhere on the drive as the copy progresses. I have > 2GB RAM free and 0 swap space being used, so it doesn't appear to be a virtual memory usage issue.
As I mention below, disabling local snapshots also had no effect on the growing disk space.