Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6588

Re: Bulk Archiving Courses

$
0
0

by Sean Scott.  

Hi Ken,

Can you tell me how to modify the script to use --courseshortname instead of --courseid


I'm assuming the $i needs to be modified since course shortname is alpha numeric. Just not sure how to do it. 

Thank you for your help.

This is the script that works with the --courseid

#!/bin/bash

#

cd /ctdlc/moodle/admin/cli/;

echo pwd

for i in $(cat /ctdlc/moodle/admin/cli/2017Summer1.txt)

do

    echo "Course ID in que:" $i;

    php backup.php --courseid=$i --destination=/mnt/nas/archives/

done

ls -l /mnt/nas/;

echo 'Done!';

I would like to use --courseshortname

#!/bin/bash

#

cd /ctdlc/moodle/admin/cli/;

echo pwd

for i in $(cat /ctdlc/moodle/admin/cli/shortnameSU17.txt)

do

    echo "Course Shortname in que:" $i;

    php backup.php --courseshortname=$i --destination=/mnt/nas/shortnameSU17/

done

ls -l /mnt/nas/;

echo 'Done!';



Viewing all articles
Browse latest Browse all 6588

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>