Difference between revisions of "Moodle: Backup Site"

From OnnoWiki
Jump to navigation Jump to search
(New page: Sumber: https://docs.moodle.org/23/en/Site_backup Script mv moodle-database.sql.gz moodle-database-old.sql.gz mysqldump -h namamesin -u usernamemoodle --password=passwordmoodle -C -Q ...)
 
Line 8: Line 8:
 
  gzip moodle-database.sql
 
  gzip moodle-database.sql
 
  tar czf /var/www/pustaka/backupmoodle/moodlecms.tar.gz /var/www/moodle
 
  tar czf /var/www/pustaka/backupmoodle/moodlecms.tar.gz /var/www/moodle
 +
 +
 +
 +
==Restore==
 +
 +
* Buat site moodle seperti biasa
 +
* Setup database
 +
* Restore
 +
 +
mysql -p new_database < moodlesqlfile.sql
  
  
Line 15: Line 25:
  
 
* https://docs.moodle.org/23/en/Site_backup
 
* https://docs.moodle.org/23/en/Site_backup
 +
* https://docs.moodle.org/23/en/Site_restore

Revision as of 11:29, 14 September 2015

Sumber: https://docs.moodle.org/23/en/Site_backup


Script

mv moodle-database.sql.gz moodle-database-old.sql.gz
mysqldump -h namamesin -u usernamemoodle --password=passwordmoodle -C -Q -e --create-options databasemoodle > moodle-database.sql
gzip moodle-database.sql
tar czf /var/www/pustaka/backupmoodle/moodlecms.tar.gz /var/www/moodle


Restore

  • Buat site moodle seperti biasa
  • Setup database
  • Restore
mysql -p new_database < moodlesqlfile.sql



Referensi