Closed travula closed 8 years ago
Please go through the document https://github.com/vlead/port-labs-to-openedx/blob/develop/src/backup.org
Need to work on
Database level Backup
Open edX platfom uses two databases
Database level backup This is the way to take backup of edX platform
Take backup of MySql database using following command (LMS)
mysqldump -u root -p --all-databases > ./backup.sql
Take backup of MongoDB database using following command (CMS)
mongodump -o ./mongo-backup
Also documented in https://github.com/vlead/port-labs-to-openedx/blob/develop/src/platform-install-configure/backup.org#taking-backup-of-lms-machine
Restore the databases in the new edx-plaform from the backups taken above. Steps to restore
Restore MongoDB database
mongorestore -drop ./mongo-backup
Restore Mysql database
mysql -u root -p < ./backup.sql
Steps are documented in https://github.com/vlead/port-labs-to-openedx/blob/develop/src/platform-install-configure/backup.org#restoring-the-database
Successfully restored .Tested the newly created platform after restoring databases. Everything is working fine
Now, need to work on file level backup and restoring them...
Explored how to take backup of files uploaded by Students/Superusers. https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/named-release-birch/building_course/course_files.html
As per google group's suggestions, File level backup is taken care by databases(MySql and MongoDB) backup. Means, Uploaded files(assets) are storing/saving in the form of metadata and bytes into the databases. So all those assets are stored in MongoDB using GridFS. If you connect to your mongo instance and use the edxapp database, you'll see the fs.files and fs.chunks collections. The asset file metadata is stored in fs.files and the actual bytes are in fs.chunks.
Reference: https://groups.google.com/forum/#!topic/edx-code/Zdx8T6YY3IU
So, I tried their suggestions. It worked Performed following step
Complete documentation is at https://github.com/vlead/port-labs-to-openedx/blob/develop/src/platform-install-configure/backup.org
Open edX platform has both CMS and LMS features. It uses mysql and nosql (mongodb) databases for saving the course content and student activity.
These databases are backed up and a new platform is restored form the backup.
Note: The Open edX platform software version running on the machine from which backup is made is same as the version running on the machine which is restored from backup.