Merge pull request #469 from norv/fixes_up

Fix database backup.
Trivial tweaks.

Signed-off-by: Norv <a.w.norv@gmail.com>
Post modify bug: wrong function used to get message data. (and a few other places).
These two functions are badly named

Signed-off-by: Norv <a.w.norv@gmail.com>