Course restore is taking huge time Unable to restore from backup

Course restore is taking huge time Unable to restore from backup

by Anil Karwankar -
Number of replies: 5

Version latest   4.5.1    Backup is from 4.1   Course restore is taking huge time Unable to restore from backup 

Course restore is taking huge time Unable to restore from backup

image.png

Average of ratings: -
In reply to Anil Karwankar

Re: Course restore is taking huge time Unable to restore from backup

by Mosaab Alsiddig -
In reply to Mosaab Alsiddig

Re: Course restore is taking huge time Unable to restore from backup

by Anil Karwankar -
Thanks but how to use for windows $sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/file.mbz --categoryid=1 My Moodle directory is c:\moodle and backup is in c:\backup directory
In reply to Mosaab Alsiddig

Re: Course restore is taking huge time Unable to restore from backup

by Anil Karwankar -

its asking for passphraseimage.png

what should i use for passphrase?

In reply to Anil Karwankar

Re: Course restore is taking huge time Unable to restore from backup

by Ken Task -
Picture of Particularly helpful Moodlers

Please see:

https://docs.moodle.org/405/en/Course_restore#Restore_via_CLI_for_administrators
doesn't show any passphrase for cli course restore.

If the backup file was created by CLI and the original user used encryption to create the .mbz file, you would need to get the passphrase from the person who created the .mbz

To see if I am correct ... copy the .mbz file to a test directory, and try to uncompressed it ... an .mbz is a tar.gz (gunzipped) file.
Not sure what the command would be on Windows platform, but if it were on linux:
tar -xvf nameofbackupfile.mbz

If you get the same prompt, it's been encrypted and you'll need to look for a hacker tool to un-encrypt the file.

Good luck!

'SoS', Ken

In reply to Anil Karwankar

Re: Course restore is taking huge time Unable to restore from backup

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You are already super-user (see the '#' prompt). So another sudo doesn't make sense. The format you are looking for is "# su -c COMMAND USER'. Your USER is obviously www-data. The COMMAND is "/usr/bin/php ..." (you need the quotes).