Rsync of several directories doesn't delete files
tim.conway at philips.com
tim.conway at philips.com
Fri Sep 20 14:10:00 EST 2002
Dan: try changing your commandline a bit. I don't know the code well
enough to explain why, but I think this will work better:
rsync -avR --rsh=ssh --delete --exclude-from=/tmp/excludes.daily /.
backup:/home/backup/www/.
For some reason, naming the directory inside itself seems to make things work better.
Tim Conway
tim.conway at philips.com
303.682.4917 office, 303.921.0301 cell
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, caesupport2 on AIM
"There are some who call me.... Tim?"
Daniel Ramaley <daniel.ramaley at DRAKE.EDU>
Sent by: rsync-admin at lists.samba.org
09/19/2002 03:49 PM
Please respond to daniel.ramaley
To: rsync at lists.samba.org
cc: (bcc: Tim Conway/LMT/SC/PHILIPS)
Subject: Rsync of several directories doesn't delete files
Classification:
Hello. I'm trying to use rsync to keep a backup of a web server (named
"www") on a separate machine (named "backup"). "Www" is running Trustix
Linux 1.5 (kernel 2-2-20-2tr) with rsync 2.5.4 protocol 26. "Backup" is
running OpenBSD 3.0. Rsync is using OpenSSH 3.1p1 as the transport. Files
that are deleted from "www" are not deleted from "backup" on subsequent
runs of rsync.
My rsync line looks like this:
rsync -avR --rsh=ssh --delete --exclude-from=/tmp/excludes.daily \
/ backup:/home/backup/www/
/tmp/excludes.daily includes 2 lines:
/proc
/var/tmp
First i added an extra "-v" to the rsync command. At the suggestion of
some
newsgroup postings that i found using google, i searched the output for IO
errors, but found nothing. At the top of the output i expected the output
to include what files were being deleted, but it did not, which indicates
that rsync wasn't even trying to delete anything.
Next i added "--force" and "--ignore-errors" to rsync's command line. I
didn't expect them to do anything, but i tried anyway. The excess files
still weren't deleted.
In a 2-year old post to mailing.unix.rsync i found someone with the same
problem i'm having. The solution was to not do an rsync of the entire
drive, but rather just do one directory at a time. As a test i tried
removing the "--force" and "--ignore-errors" and changing / to /home in my
rsync line:
rsync -avvR --rsh=ssh --delete --exclude-from=/tmp/excludes.daily \
/home backup:/home/backup/www/
That worked. Files in /home that had been removed on "www" were removed on
"backup." The output from rsync included a line for each file that was
deleted.
So, deletion does not work if i try to rsync my entire filesystem, but
does
work if i only try to rsync one directory. I guess at this poing i'm
looking for some pointers. Is there some switch to rsync that i'm missing
that allows it to delete files when operating on the entire filesystem?
What else am i overlooking or doing incorrectly?
Thanks in advance for any assistance you may provide.
------------------------------------------------------------------------
Dan Ramaley
Digital Media Library Specialist
(515) 271-1934
Cowles Library 140, Drake University
--
To unsubscribe or change options:
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
More information about the rsync
mailing list