by Sean Scott.
Thank you Ken.
The script you provided was very helpful. I did have to make a small change to it, as it threw an error. After digging around in Google I was able to correct the issue and use the script. You saved me a ton of time.
Thank again.
Just in case anyone else tries to use it this is what the final script looked like:
#!/bin/bash
#
cd /ctdlc/moodle31/admin/cli/;
for i in $(cat [/PATH/TO/MOODLECODE]/admin/cli/courseids.txt)
do
echo "Course ID in que:" $i;
php backup.php --courseid=$i --destination=/home/archives/
done
ls -l /home/archives/;
echo 'Done!';