I would like to offer up my own backup script regarding the use of rsync, which can be found here.
I also offered details of its usage/behaviour in this other post.
The bottom part, starting at the "Imported ..." line, comes from a separate script to monitor the backup script's activities, which is available here.