Yes, the second to last step is for Moodle to use moodle_backup.xml to build a .mbz file - which is the complete backup of all those items.
So NONE of the folders with those long hash names have temporary backup.mbz.AYgzi9 files in them?
Normally, there is a reason for failure and they could be Apache related, PHP related, or even MySQL related. Normally, there are errors reported in logs, but you say there is not. So without more specific info, a suggested list:
Permissions on the data directory ... that directory should be outside of document root and the only user/group that should be able to write to it is the apache user. That being said, it looks like apache is able to write to it. You don't show ownership/permissions in your screen shot. So set the ownership/permissions liberally to begin with ...
@ the location of moodledata: chmod ugo+rw moodledata -R
Since NONE of the hashnamed folders have .mbz or temp .mbz files in them, they may not contain all the building blocks (ie, moodle_backup.xml file hadn't been completed yet). So basically all those are useless. Thus remove them all.
@ moodledata/temp/backup/: rm -fR *
Now some things for PHP ... increase the variables for time a script can run. Default is normally 30 seconds. Make it something like 120. Amount of memory a script may consume: Default is normally 128M ... increase it to 256M. Changes to php.ini required restart of apache service.
MySQL: large course backups will involved larger data packets. So one setting in MySQL is max_packets:
max_allowed_packet=500M
In building temp tables, MySQL might need to be able to open more files:
open_files_limit=6000
After you've made changed to my.cnf (MySQL config) and php.ini (site side PHP), *turn off* automated backups in the Moodle Admin interface - set it to manual.
Then run the cron job several times from the command line:
cd moodlecode/admin/cli/
php cron.php; php cron.php; php cron.php
Since you are down on the command line and in cli directory, let's backup a course via command line:
First make a directory outside of Moodle for the destination directory for the backups. Since you are running these scripts as root there should be no issues with writing to whatever directory you create.
Example: mkdir /home/moodlebackups/
php backup.php --courseid=2 --destination=/home/moodlebackups/
The course ID above is the course ID of the desired course to backup. You can see those by accessing a course with web browser and looking at URL line. Think I'd pick the course with the least number of resources (links to files you may have uploaded to the course) and the least number of quizzes in it (quiz/test is a heavy process and memory/resource hungry).
Running backups this way take apache out of the loop ... it's just PHP. The script won't display everything it's doing and will look something like:
== Performing backup... ==
Writing /home/m26backups/backup-moodle2-course-2-sa-20150525-1021.mbz
Backup completed.
If you want to watch what's going on in another terminal window:
cd /path_to_location_of/moodledata/temp/backup/
@ /path_to_location_of/moodledata/temp/backup/ type:
watch "ls -lR"
When you begin the cli backup in the other terminal window, click back on the second terminal session and 'watch'.
Am assuming you are not on a shared system.
'spirit of sharing', Ken