old files not getting deleted
Charles Sprickman
spork at bway.net
Thu Feb 18 13:36:01 MST 2010
On Wed, 17 Feb 2010, Matt McCutchen wrote:
> On Sat, 2010-02-13 at 18:56 -0500, Charles Sprickman wrote:
>> I've been having a bear of a time tracking this down. I'm currently using
>> rsync to back a bunch of servers up to a ZFS pool on a server. I recently
>> noticed my deltas between ZFS snapshots seemed a bit large, so I started
>> looking more closely at what was being backed up. Looking at some Maildirs, I
>> found that messages (files) that had been deleted on the server were not being
>> deleted by rsync. My flags include a "--delete" option, and I also tried the
>> other delete options (delete-during, delete-after) with no luck.
>>
>> If I manually run rsync with the same flags, but specify the direct path to a
>> user's Maildir, files are deleted properly. My script runs from the root of
>> the filesystem though, and relies on an included exclude file to negate things
>> I don't want to back up.
>
>> rsync --archive --stats --numeric-ids --delete --partial --inplace --hard-links
>> --exclude-from=/usr/local/rsb/conf/exclude.default.fbsd
>> --rsync-path="/usr/local/bin/rsync" --rsh="/usr/bin/ssh -p 22 -i
>> /usr/local/rsb/conf/id_dsa" --log-file=/var/log/rsbackup/$RSYNC_SERVER.log
>> backups@$RSYNC_SERVER:/ /tank/backups/$RSYNC_SERVER (note, no trailing slash on
>> destdir)
>
> Maybe you are getting an I/O error. By default, rsync skips all
> deletion of destination files when it gets an I/O error on the source,
> to avoid erroneous deletion of destination files if the I/O error caused
> them to be omitted from the file list. (This is a very blunt measure
> and making it more granular would be a good enhancement request, but
> really the user should address the cause of the I/O errors.) Look at
> rsync's output to stderr, and also look for a message "IO error
> encountered -- skipping file deletion".
I see that at the very end of the logfile:
2010/02/14 01:41:46 [79743] IO error encountered -- skipping file deletion
There are always a few errors, like "file disappeared" and the like since
this is a live system (and mailboxes no less, where content is always
changing).
A few examples:
2010/02/16 01:24:20 [87560] rsync:
readlink_stat("/spool/jails/mailbak.example.net/home/vpopmail/domains/example.net/A/spec/Maildir/new/1248843513.66447.example.net")
failed: Bad file descriptor (9)
2010/02/16 01:24:20 [87560] rsync:
readlink_stat("/spool/jails/mailbak.example.net/home/vpopmail/domains/example.net/A/spec/Maildir/new/1183175697.M407633P83781V00020D07I00573A16_0.example.net,S=19682")
failed: Bad file descriptor (9)
2010/02/17 01:23:36 [91479] rsync: opendir
"/spool/jails/mailbak.example.net/dev/fd/3" failed: Bad file descriptor
(9)
Can I turn this behavior off?
Thanks,
Charles
> --
> Matt
>
>
More information about the rsync
mailing list