by Perry Way.
It took a while to reverse-engineer but I did it. I'm able to make backups exactly as I want to now, programmatically.
Now on to the next step which is programmatic restoring of backup x into course y.
If anyone wants some help sifting through the code, the UI and the objects used for this functionality are very closely related and can be troublesome to figure out, so I'd be willing to share what I know from this exercise.