make rsync output deleted files?
I have been using rdist for several years to sync a couple computers' data areas. I recently switched to using rsync, but am running into a problem. With rdist, I get a list on stdout of which files were updated, installed, or removed. I can't figure out how to make rsync give me the same output. When I use the delete option, I have so far been unable to get any indication of what files were deleted. The only place I've found this information is in the log file on the rsync server, but that doesn't help me as the client computer does not have access to that file. The only files I every see on stdout are the files transferred, no matter how many v flags I put. Help!
|
I just redirect the standard output to a file and the deletes are at the bottom of that file.
Code:
rsync -avz --delete-after -e ssh /mnt/tech/aclinux root@sony:/home/check > /home/list.txt |
No matter what I try, I never see the deleted files. Here is my code:
Code:
#!/bin/csh /root/backup 194# ./backup.nas3.csh Thu Mar 17 15:32:14 HST 2005 building file list ... done wrote 876 bytes read 40 bytes 203.56 bytes/sec total size is 981447446 speedup is 1071449.18 Thu Mar 17 15:32:18 HST 2005 I've tried -e ssh, --delete-after, --stats, and nothing works. I even tried --log-format, but it doesn't seem to be making any difference. Maybe I'm doing something really stupid but for the life of me I can't see what it is. The script works as far as actually doing the work that it's intended to do, but I want the feedback, because when I was using rdist it was useful a few times to catch some problems before they became problems. |
Our systems are abit different, I'm using bash and the rsync is located in a different place. Other than that, your date statement looked like this...
Code:
`date +%y%m%d`" Code:
`date '+%y%m%d'`" Code:
#!/bin/bash |
What version of rsync are you using? I don't think the extra bits (like the date) make any difference as it never seems to matter how I do the command, it never gives me that output, so maybe my version is old or something.
|
On my FC3 system it's this...
rsync version 2.6.3 protocol version 28 |
Hmm, mine is "rsync version 2.6.2 protocol version 28"
I have one computer that is running Solaris 2.8 and the other is redhat 7.3, but it's a vender-specific installation. I will try to play with a couple other distributions to make sure it's not an os issue. |
HA! I just installed the rsync 2.6.3 rpm and rsynced to/from that computer and there are the deleted files. But when I rsync from a 2.6.2 computer to the 2.6.3 computer I don't see the deleted files....and I can't go from 2.6.3 to 2.6.2 at all. So I guess my job for today is to upgrade rsync on all my computers :)
Thanks a lot for your help, this really helps! |
Glad you got it going! :)
|
All times are GMT -5. The time now is 06:25 AM. |