Bash script for cloning database on server

If you need to copy DB, lets say from production to develop you can use this script and call it like "develclone.sh original_db cloned_db"
For faster cloning it will exclude cache tables data.

Messages api, make message programmatically for orders

I wanted to add a message to orders when I did some auto approving of orders. To add some trace of that you need to load user which will be the one that did that. Send $values that will be used for token replacement in message and also select which message type you are going to use. In here I made a clone of default message "commerce_order_admin_comment" and used that.