We are also seeing this error while running from the cli. We run admin/cli/automated_backups.php every night and since we switched to 2.6.3 (from 2.4.3) we started getting a PHP fatal error. I tried changing to the new backup format that Tim suggested and they failed with the same error just in a different file (tgz_extractor.php). I am not sure where to go from here. I have traced back as far as the execute function in backup/util/plan/backup_execution_step.class.php and printed out ini_get('max_execution_time'). The value is as I would expect 3600 (it is set in execute_plan). I am not sure where the 120 second setting is being set.
The issue appears to be with course sizes (as mentioned above). If we delete some files from the course the backup will run until it hits the next large course. The thing that is getting me here is that this used to work in 2.4.3. Some of the courses have been the same size since 2010.
Any idea's on where to go from here?
We are running PHP 5.5.12, Moodle 2.6.3, and MySQL 5.5.37.