Is there a 'temp/backup' directory in the data folder for your Moodle?
From observations and poking and probing with a Moodle that had issues with backing up a single course, found that folder is used as a temporary 'construction area' ... first file it writes is an XML file which contains all the info for a portion of the backup. In one of your postings about this, the first error is about creating that xml file. If it can't do that, the rest of the routine will fail.
Not sure you've responded about D:\ IS ... IS it a physical drive on the same server? or is it a drive that is mapped via Windows protocols? (the folder actually resides on another physical server).
Reason I ask, Moodle will use internet protocols to write to it. IF a mapped drive and a true Windows share, Moodle may not be allowed by Windows to write to it via the methods Moodle is using.
On a Linux server I can mount a Windows share and have it appear to Apache as a local folder that has been configured to allow Apache/Moodle to write to it. Realize that doesn't help you, just attempting to help 'talk' you through trouble shooting. Maybe something I say/suggest will help you stumble upon the solution.
Let's try this (automated backups set to execute in Moodle):
cd [moodlewebroot]/admin/cli/
Then issue the following command:
php automated_backups.php
For each course in the Moodle, a hashed numbered folder will be created in [moodledata]/temp/backup/
As each course is backed up the following will be created:
./946957ddb621768cd984dfc495c8da59:
total 140
drwxrwxrwx 19 root root 4096 Oct 12 17:01 activities
-rw-rw-rw- 1 root root 79 Oct 12 17:01 completion.xml
drwxrwxrwx 3 root root 4096 Oct 12 17:01 course
drwxrwxrwx 12 root root 4096 Oct 12 17:02 files
-rw-rw-rw- 1 root root 8209 Oct 12 17:02 files.xml
-rw-rw-rw- 1 root root 1762 Oct 12 17:01 gradebook.xml
and the temporary .mbz will be created.
Here's what it looks like:
[root@moodle cli]# php automated_backups.php
Server Time: Wed, 12 Oct 2011 16:56:23 -0500
Checking automated backup status...OK
Getting admin info
Checking courses
Skipping deleted courses...0 courses
Running required automated backups...
Backing up Kens Moodle 2...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Sys Admin...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Build Your Own LAMP Box - short course (byolb)...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Podcasting 101...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Moodle Networks and Networking (mnet)...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Installing a SandBox Moodle for Training...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Basic Moodle Administration (basic)...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Advanced Moodle Administration (golinux)...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up SandBox (sandbox)...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Android Apps...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Backing up Exploration into VirtualBox (exploring)...complete - next execution: Sunday, 16 October 2011, 12:30 AM
Sending email to admin
Automated backups complete.
Automated cron backups completed correctly
Execution took 462.815278 seconds
NOTE the execution time ... might need to increase your PHP settings IF backups of the courses are large.
Dunno if Windows has such a thing as the 'watch' command, but on a Linux server one can change into the working directory for backups and watch them happen with:
watch "ls -l"
while located in [moodledata]/temp/backup/
Useful if troubleshooting ... like we are right now! ;)
'spirit of sharing', Ken