I've written a shell script for backing up a Drupal site installed in a Stanford AFS group or department account. (This version doesn't work anywhere else.)
It does a dump of the Drupal database and creates a compressed archive of the entire Drupal directory from which it is run. Both the directory archive and .sql file are written to a DrupalBackups directory under the top level directory of the department or group account from which it is run. (If the DrupalBackups directory doesn't already exist, it is created.)
It is completely automated and doesn't require any user input other than an (optional) file label (which can be entered as an argument, otherwise the script asks for a label).