sanalkumar.siva@wipro.com
2005-Feb-14 15:11 UTC
Any option in rsync to get the list of new files
Hi, Is there any option in rsync to get the list of new files when we use rsync to perform the backup from the source to destination? We've used the option "-b" and "--backup-dir" options to get the list of deleted/modified files in a separate directory. Your reply will be very helpful, Thanks and Best Regards Sanal Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. -------------- next part -------------- HTML attachment scrubbed and removed
On Mon, Feb 14, 2005 at 08:43:00PM +0530, sanalkumar.siva@wipro.com wrote:> Is there any option in rsync to get the list of new files when we > use rsync to perform the backup from the source to destination?One choice is to run two rsync commands, the first with --existing, which would give you a list of files that were being updated, and then the second with --ignore-existing, which would give you a list of files that were being created. If you use the --log-format option instead of -v, the output is even easier for a script to parse. For instance: rsync -a --existing --log-format='%t %o %f' src/ dest/ | tee out.txt That would output lines like this: 2005/02/14 18:05:52 send foobar.txt 2005/02/14 18:05:52 send barbaz.c ..wayne..