old files not getting deleted

Charles Sprickman spork at bway.net
Sat Feb 13 16:56:17 MST 2010


Howdy,

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.

How can I track this down?

My command line looks like so:

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)

The exclude file looks like this:
/proc/*
/dev/*
/var/log/**.gz
/var/log/**.bz2
/var/db/mysql/**
/home/spork/admin/**
/entropy
/cdrom
/mnt
/dist/**
/media/**
/rescue/**
/spool/obj/**
/sys/**
/usr/src/**
/usr/obj/**
/usr/ports/**
/usr/local/dcc/log/**

Mail lives in /home/vpopmail/domains/example.com/user/

Logging is enabled, and here's a snippet of the log for a particular maildir 
I'm watching:

(user's maildir)
2010/02/12 01:34:32 [71490] .d..t...... 
spool/jails/mailbak.example.com/home/vpopmail/domains/example.com/exampleuser/Maildir/

(some courier-related files)
2010/02/12 01:34:32 [71490] >f.st...... 
spool/jails/mailbak.example.com/home/vpopmail/domains/example.com/exampleuser/Maildir/courierpop3dsizelist
2010/02/12 01:34:32 [71490] >f.st...... 
spool/jails/mailbak.example.com/home/vpopmail/domains/example.com/exampleuser/Maildir/maildirsize

(read mail directory)
2010/02/12 01:34:32 [71490] .d..t......
spool/jails/mailbak.example.com/home/vpopmail/domains/example.com/exampleuser/Maildir/cur/

(rsync copying files to destination)
2010/02/12 01:34:32 [71490] >f+++++++++ 
spool/jails/mailbak.example.com/home/vpopmail/domains/example.com/exampleuser/Maildir/cur/1265857445.23118.mailhost.example.com,S=196114:2,S
2010/02/12 01:34:32 [71490] >f+++++++++ 
spool/jails/mailbak.example.com/home/vpopmail/domains/example.com/exampleuser/Maildir/cur/1265857724.27538.mailhost.example.com,S=65542:2,S

The rest of the log continues like this, just files being added, nothing 
deleted.

What am I missing?

Thanks,

Charles


More information about the rsync mailing list