How to restore all the courses I have backuped ?

How to restore all the courses I have backuped ?

by jiandu cc -
Number of replies: 5

I have backuped all the courses in mysite according the cli ( using the automated_backups.php ).

I changed the backup_auto_destination like "E:\courseBK",

and then the script have created many .mbz files in "E:\courseBK".

I want to restore these courses to another site in one time instead of choosing them one by one.

Is there any way can resole my problem?

Average of ratings: -
In reply to jiandu cc

回复: How to restore all the courses I have backuped ?

by jiandu cc -

Another problem is that I tried to backup the users but it doesn't include  the password string .+_+

In reply to jiandu cc

Re: How to restore all the courses I have backuped ?

by Ken Task -
Picture of Particularly helpful Moodlers

Clarifications please ... what's the goal? and why backups?

IF Site A (the one where you ran the autobackups) was a older version of Moodle and Site B is a newer version of Moodle and you don't want to migrate Site A to Site B, then choosing the route to restore backups could be an approach.

Just make sure that whatever addons/themes, etc. that was on Site A, have also been installed and functioning on Site B.  And recommend not trying to restore course ID 1 from A to B ... that course is the front page of the Moodle.

Before making a suggestion of how one might be able to massively restore backups ... a couple of questions:

1 -  the 'other site' you've mentioned ... is it on the same physical server where the backups?  or is the 'other site' on a different server?

2 -  can you install Moosh and get it to run on Windows?

http://moosh-online.com/faq/

https://moodle.org/mod/forum/discuss.php?d=257341#p1131493

https://github.com/tmuras/moosh/issues/40

Of the two questions, #2 is more important but both would have to be known for one will have to use scripts created by you to accomplish what you want to do.

As far as the other problem with users ... since you are on Windows am assuming LDAP authentication is the default.   LDAP authentication in Moodle typically doesn't store the password for users in backups.  When restoring a course to either different site on same server or different site on another server, both/either would have to have LDAP configured for authentication for the backups to restore and be 'useful'.

Comment: this is really somewhat out of the scope of these forums which explains why you've not gotten any responses to the postings in this thread.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to jiandu cc

Re: How to restore all the courses I have backuped ?

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

If the folder is accessible from the other site and you do not require user data, you can use the course upload feature to do this.  You will just list the course backups as your course template in the csv file.  Check the moodle documentation for instructions.

In reply to Emma Richardson

Re: How to restore all the courses I have backuped ?

by Ken Task -
Picture of Particularly helpful Moodlers

Emma ... mind providing the URL to the moodle doc mentioned?   Can't see to find specific information concerning ... nor an example of a backup.mbz file of a course from another sever.

Op also posted an issue about users ... we've not heard back yet. ;)

Thanks, in advance, Ken

In reply to Ken Task

Re: How to restore all the courses I have backuped ?

by Ken Task -
Picture of Particularly helpful Moodlers

Never mind ... found it ... several options for @jiandu cc to consider/sort through ...

https://docs.moodle.org/32/en/Upload_courses#Short_file_example

Course action fields
backupfile
 An absolute path to a backup file (.mbz) to import in the course.

(This means the full path to your course, for example /home/yourmoodle/public_html/moodle27/transfert/backup.mbz . If you are unsure of this, look at include_path in Site administration>Server>PHP info.)

Course process
This allows you to specify actions to be taken for every course uploaded.

Shortname template
If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.

Restore file
A backup file (.mbz) to import in the course after create/update.

Restore from course
The shortname of a course to import content from after create/update.

Reset after upload
 Whether to reset the course after creating/updating it.

Will have to test that some day and compare it to a moosh method.   Still though, above might be the only way one could on Windows.

'spirit of sharing', Ken