If you are carrying this out from the cron job, then DOCUMENT_ROOT will not exist. The DOCUMENT_ROOT along with other $_SERVER variables are effectively setup through the web server (see the $_SERVER manual page), and when you are running the script from cron, there is no web server involved. See this earlier, similar question.

Try setting the road to your backup directory in accordance with the position of the PHP script. For instance, in case your script is within .../your_folder/scripts/backup_script.php, as well as your (pre-produced) backup directory is .../your_folder/backup/, then

$backup_dir = dirname(__FILE__) . '/../backup'

...after which use $backup_dir rather than getenv('DOCUMENT_ROOT').

It's much like your hosts's instructions are correct, but only when running the script on the internet server, not in the command line.