Course restore is taking huge time Unable to restore from backup

Course restore is taking huge time Unable to restore from backup

Anil Karwankar -
回帖数: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

回复Anil Karwankar

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

Mosaab Alsiddig -
回复Mosaab Alsiddig

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

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
回复Mosaab Alsiddig

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

Anil Karwankar -

its asking for passphraseimage.png

what should i use for passphrase?

回复Anil Karwankar

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

Ken Task -
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

回复Anil Karwankar

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

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 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).