tar -czvf /home/nagesh/`date +"%d-%m-%y"`_changes.tar.gz --after-date="`date +%F --newer='yesterday'`" sri/* \
laxmi/* > log_backup.log
You're redirecting all output to log_backup.log so that's working correctly. The "problem" is that every directory gets tar'ed (by the way, if the amount of backup data is big, there are better alternatives than tar).
I also see you're using both
"--newer". No need for that:
Quoted from man tar
-N, --after-date DATE, --newer DATE
only store files newer than DATE
It means that "-N" is exactly the same as "--after-date" which is exactly the same as "--newer". Only use one of those. It's probably up to how you define the DATE, i.e. newer than what should be backed up (is "yesterday" good format?).
doesn't understand the format you're trying to give it, and doesn't care about the "newer than" -thing, thus backing up everything. So, newer than what are you trying to backup? Running that script every day, backing up only data that has changed since yesterday? In that case you'll need to figure out how to tell that in date
format, and use that.
Try this and tell me if it works; I haven't tried it out, just wrote from what I think I remember about using date in scripts (it's just your codepiece, modified a bit):
tar -czvf /home/nagesh/$(date -d yesterday)_changes.tar.gz --after-date="$(date -d yesterday)" sri/* laxmi/* > log_backup.log