- 06 Aug 2024
- 1 minute to read
Site backups
- Updated on 06 Aug 2024
- 1 minute to read
A site backup allows a Site Administrator to save everything associated with a Totara site. These backups can be restored to bring a site back to the point in time when the backup was made.
Performing regular backups is highly recommended to reduce the amount of lost information in the event of a problem on the site, and to speed up the overall recovery process.
What to back up
A Totara system comprises three parts:
- The data stored in the database e.g. a MySQL database
- The uploaded files, e.g. site and course files uploaded via Totara located in moodledata
- The Totara code, e.g. everything in /server/htdocs/totara
You can confirm where each of these is located in a Totara installation by checking the config.php file.
$CFG->dbname shows the database name$CFG->prefix shows the database table name, prefix$CFG->dataroot controls where the uploaded files are stored, and $CFG->wwwroot points to where the code is stored.
Generally speaking, the database ("dbname and prefix") and the uploaded files (dataroot) are the two most important to copy on a regular basis. These contain information that will change most often.
The Totara code (wwwroot) is less important as a frequent backup, since it will only change when the the actual code is changed through upgrades, add-ins, and code tweaks. You can always get a copy of the standard Totara code from Totara, so you only have to back up the parts you added or changed yourself.