System backup for Moodle

System backup for Moodle

by A. H. -
Number of replies: 7
Hi,

We are trying to setup a backup plan which will allow us to restore:
1- The Linux system and moodle directories and database
2- Restore courses upon an instructor's request

We currently have around 1100 courses. Internal backup of moodle (creating the zip files) is taking around 9 hours!
Then backing up these zip files and the system to a tape is taking around 1 - 2 hours.
Thus if we start the backup at 11pm, it wont finish before 10am the other day.

Our target is to have the backup run without causing any load on the server during rush hours or during hours where users start to access (8am till 11pm).

We have a redundant server which is synchronizing with the real server every 1 hour. I dont feel comfortable doing my backup from the redundant server although that will decrease the load on the real server.

Any suggestions?

Thank you in advance,
amer
Average of ratings: -
In reply to A. H.

Re: System backup for Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Two points about backups:
1. You have to be clear against what you take backups: a meteorite hits the machine or a teacher just removed a document which he wants to have back.

2. There is no such thing called backups, only backup/restore.

Whatever your aims are, grinding a productive server 9 hours a day just for a "backup" doesn't sound very efficient ;-(

Few quick personal thoughts about backup/restore concept against meteorites (for Unix only):

- there are two or possibly three directories to look after
a) $moodledata: this is obvious
b) $admin: mysqldump puts the sql-dump of the whole database here. plus any documentation about the server, your notes, etc.
c) Moodle source directory. Only if you have customized it, otherwise just document the CVS tag.

That means, there is no backup of the Linux-system. What for? The hosting provider creates me one in 15 Min. (I'm taling about root servers). In the $admin I have the sources and a script to create the (L)AMP+Moodle Stack in an hour.

- the two or three directories get "zipped" daily. Full-zip every Sunday, only a diff all the other days. This "zipping" is done in the same server.

- Shift those archives to a different server in a different location. Keep only 12 full-backups (3 Months) and 24 diffs (one month).

Do some crash-tests, like flooding the machine room smile
Average of ratings: Useful (1)
In reply to A. H.

Re: System backup for Moodle

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
We don't use the internal backup. It's too slow for us.

We just do full database dump (less than 5-10 minutes), then a regular server backup (under 1-2 hours) to tape. We keep these daily tapes for a couple of weeks, and the weekly tapes for a couple of months.

If we need to restore a single course, we have a non-production server running the same Moodle version where we restore the full database dump and files, then use Moodle to bakcup that particular course, and restore the .zip on the production server.

Saludos. Iñaki.
Average of ratings: Useful (2)
In reply to Iñaki Arenaza

Re: System backup for Moodle

by A. H. -
Dear All,

With such backups,
1- Are you able to Rebuild the server in case the whole system crashed? ( its rare to happen, but still it happens! )
2- Following your backup to restore a course seems illogical to me when it comes to restoring 60GB of data and the database (we have around 1200 courses now).

The solution i came up with is to separate the active courses from the archived courses where archived courses are 3x active courses (moving the archived courses to another server). This will decrease the internal backup done by moodle to around 3 hours rather 9 hours. This will allow me to restore lost courses or material in courses by simply getting the zip file and restoring.

Do you think that solves my problem? i still didnt apply
In reply to A. H.

Re: System backup for Moodle

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

1- Are you able to Rebuild the server in case the whole system crashed? ( its rare to happen, but still it happens! )

We have a complete server backup, so we can easily rebuild the whole system (it's really easy with Linux).

Following your backup to restore a course seems illogical to me when it comes to restoring 60GB of data and the database (we have around 1200 courses now).

We just need to restore the database (a few dozen megabytes so far) and the data of the particular course (no need to restore all the courses' files just to deal with a single course). So say a few hundreds megabytes more.

Depending on your backup hardware, that can be 15-30 minutes or less.

YMMV, of course.

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: System backup for Moodle

by Chris Lamb -

The 'meteorite' scenario seems to have been well covered by others in this thread, but to cover the other risk, that of a teacher saying "Oops, that wasn't the one I wanted to delete!", you could try training your staff to take their own backups of their own courses, especially before they start deleting things, and save the resulting zip files to their own machines.

Making the backups is easy, restoring them can be a bit more tricky, but you can tell them to make their own backups and if they need anything restored to bring you the zip file(s) on a CD for you to do.

HTH

Chris

In reply to A. H.

Re: System backup for Moodle

by ambo arif -
i having problem in writing courses on the moodle, where bullet appear automatically when add resources or activity in the course. I am using power Mac G4 running mac OS 10.3 server with MySQL 5.0.24 and php 4.3.11. The problem here is the cannot remove. hopefully anyone can help me