[lug] rsync option --delete

stimits at comcast.net stimits at comcast.net
Mon Sep 1 15:20:49 MDT 2014


Hi,
 
I have an embedded system I'm backing up to a loopback mounted file system on a remote host (they're sitting next to each other with gigabit directly between them)...the loopback image was originally what was used to create the file system on the embedded system as an exact copy. Although the loopback used to be an exact byte-for-byte replica with the actual file system on the embedded system, the two have diverged due to package updates. The loopback mounted system is used for both backup and for cross-compiling.
 
So...to keep the loopback on the host sync'd with the embedded system, rsync has been used. Mostly it is working right, but something is causing the loopback destination of rsync to not delete some of the files which no longer exist on the embedded source file system. So with the limited size of the loopback, I'm finding this failure to delete what shouldn't still remain to be something like a memory leak, consuming space which is valuable. I run as root on the embedded system, and connect as root on the host (permissions are not an issue), with this command:
cd /boot
rsync -avczr -e ssh --delete-before * root at my_host:/embedded/boot
(boot is a small directory with easily confirmed file listings, so I chose this as a test)

I've tried --delete, and --delete-before. I have older kernels removed on the embedded source's /boot, and newer kernels added. It fails to remove all files on destination which no longer exist. What am I missing, or what do I need to do so extraneous files are deleted and do not take up space?
 
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20140901/e9cf86cd/attachment.html>


More information about the LUG mailing list