joecool@webmasterz.org
2006-Apr-04 19:02 UTC
rsync not removing files that are out of date
I'm running on Red Hat Enterprise 3 machine with ~700Gb of Storage backing up to a similar machine using rsync backups running 6 times a day on various directories in /home/. The inital rsync copied roughly 150gb. Everything appears to be backing up correctly so no loss of data which is good :) The problem is that he backup server is not removing data that has been removed from the primary server. Some users work with really large images (75-500mb) and often put them in temp directories until the product is finished and then remove the old one. The rsync client is not seeing this so on the server I have an empty $home/somepath/temp/ directory and on the backup machine I have a $home/somepath/temp directory that is 20gig. I would rather not exclude the directories if I can help it. Now I have about 700Gig of storage but that will be filled in a week if I don't find a way to automagiclly remove these temp files on the backup server. Here is my command line: #rsync -ahv --ignore-times --size-only linux1::home/rdrive /home/ I had to use --ignore-times because some files get changed and windows uses modified time stamps and rsync appears to use the created time stamp. So the theory is that when a file size changes it syncs it. appears to be working so far. I have tried various -u --update --inplace, etc but i'm nervous about the --delete commands because they seem to delete from the sender (the primary server) which would not be good any suggestions? Please don't be ascared to tell me i'm an idiot and i'm doing something backwards. Thanks, Joe
On Tue, 2006-04-04 at 14:55 -0400, joecool@webmasterz.org wrote:> I have tried various -u --update --inplace, etc but i'm nervous about the > --delete commands because they seem to delete from the sender (the primary > server) which would not be goodNo, all the --delete* options delete files from the receiver if their counterparts on the sender have disappeared. Maybe you're confusing them with --remove-sent-files, which does delete transferred regular files and symlinks from the sender. In fact, I think --remove-sent-files is the only option that causes rsync to modify the sender in any way. -- Matt McCutchen hashproduct@verizon.net http://hashproduct.metaesthetics.net/
Ooops I wouldn't do that. Try #rsync -ahv --modify-window=3601 linux1::home/rdrive /home/ ie only look at files more than an hour only or if the file size has changed. I copy from a Windows server to a Linux backup so I use: set CYGWIN=nontsec set bw=1500 rsync -azP --exclude-from=D:\excluded.txt --delete-excluded --delete --modify-window=3601 --bwlimit=%bw% abcd@windowsserver::share/ /cygdrive/h/windowsserver/share -- Stuart Halliday ECS Technology ltd Registered in Scotland - #212513
Apparently Analagous Threads
- Flag file management techniques using rsync
- When opening a file it takes up to half a minute!
- [LLVMdev] llvm-2.7: --with-udis86 failure
- Problem with compiling shared C/C++ library for loading into R (Linux)
- Problem with compiling shared C/C++ library for loading into R (Linux)