Hi, all
I know how to run the cli script to backup the course, but is any method allow backup the course without user data on command line?
Thanks
If I re-call correctly, that CLI script takes some parameters found in the options set for backups.
http://yoursite/admin/settings.php?section=backupgeneralsettings
Include users check box is selected by default which means automated backups will include users. Uncheck (deselect that item), run the cli script on one course as a test and you'll see the backup filename includes 'nu' ... no users.
php backup.php --courseid=[CID#]
where [CID#] is the course ID number.
In addition, I have a little script in /admin/cli/ that creates a text file so I can find course ID's from command line:
mysql -u root -p -e "use moodle;select id,fullname,shortname from mdl_course;" > courses.txt;cat courses.txt
courses.txt looks like:
id fullname shortname
1 Moodle 27 M27
2 SA SA
4 Moodle Sharing MSHARE
After making your no user CLI backups, you'll have to go back to the settings and re-set whatever is desired for backups.
'spirit of sharing', Ken
Hi,
But surely it would be usefull if the CLI backup script was able to take parameters (on command line) that could be different from what is selected in Moodle!
Il would allow to include (or not) user data, logs...
Perhaps look if something for that exists in the tracker, or create it
Séverin
Totally agree, it would be useful to have a couple of optons, IHMO. Author of the script can be seen in header comments of the script itself. Might consider contacting directly and inquiring.
'spirit of sharing', Ken
Ok, but just posting a message like that is only intentionnal, and doesn't really help...
So, i've created MDL-52050
If you find 100 people to vote for it, it will really help
Séverin
Hi,
If someone is interested by this, don't hesitate to vote, comment, developp something for MDL-52050 !
Séverin
What version of Moodle? Have you tried the new backup format? That sometimes makes it easier for larger courses to backup.