Forums | Mahara Community

Support /
Backup and Restore


Yaju Mahida's profile picture
Posts: 131

10 March 2009, 3:26

For backup of eportfolio, do we need to backup the Database and Maharadata at the same time ? What sort of policy should be applied as I think they both required to backup at the same time. If u can give techincal details about this will be great. Thanks in advance.
anonymous profile picture
Account deleted
Posts: 91

10 March 2009, 7:40

Every night we dump the datbase to file and take a backup of the directory which contains the source and MahraData. We keep two weeks worth of daily copies.

Would be interesting to hear what others do... for sure, you need to do "something" Surprised

Yaju Mahida's profile picture
Posts: 131

10 March 2009, 18:51

Well, that seems very simple. But here is the question that should we

Synchronize the timing for Database and also Data area of Mahara ?

Take one example at 12pm someone have backuped the Database and at 12.10 the Data area was backuped.

Now, at 12.05 one user uploaded something and is in the Data area. Assume that at 12.15 the both systems are crashed and now we have to restore from backup.

But  what about 12.05 when something was done that is not database (reference or etc..) but it exist in data area. 

anonymous profile picture
Account deleted
Posts: 1643

10 March 2009, 21:21

Hi - that won't cause too many issues, you'll just have a file in dataroot that won't be used anywhere in Mahara itself. It'll likely be overwritten soon after anyway, as it was probably created with an artefact ID just after where you restore from, and when someone uploads an artefact with that ID again the file will be replaced.

It makes sense to back them up as closely to each other as possible, of course. You'll never get it perfect unless you can grab near-instant snapshots of the filesystem when you do the database dump, which might be manageable depending on your setup.

Yaju Mahida's profile picture
Posts: 131

10 March 2009, 23:06

Nigel, In our case the database and application both are on different machines.

I tried practical about this and found that the file is displayed in My Files but as the backup was not synchronized  when I click the file it gives error that Access Denied. And user have lost artefact despite is displayed available to him.

This requires that there should be backup facility implemented within the Mahara itself. Don't you think this ? Laughing

I will appreciate if someone wil share the technical solution for backup.

 

 

anonymous profile picture
Account deleted
Posts: 1643

11 March 2009, 0:07

I don't see how implementing it in Mahara is going to be any different, you can't do transactions on filesystem operations along with the database at the same time so you're always going to have a small window for problems.

What exactly did you do in your testing? I would have thought that if you would have backed up your dataroot afterwards, then any files the user added would have not made it into the database dump, so wouldn't have been displayed in the files section.

anonymous profile picture
Account deleted
Posts: 808

11 March 2009, 0:45

If you back up the dataroot second, you could still get that problem if someone deletes a file after the db dump, but before the dataroot copy.
Yaju Mahida's profile picture
Posts: 131

11 March 2009, 1:15

Yap got it......
anonymous profile picture
Account deleted
Posts: 1643

11 March 2009, 1:36

Life is hard Cool I can't see a good solution to this, for the reason I outlined previously. You can't start a filesystem level transaction so you're going to lose some data. I suppose what you _could_ do is dump the dataroot first, then dump the db, then purge entries from the DB newer than the dump time, but it all sounds like a lot of hassle really.
Iñaki Arenaza's profile picture
Posts: 253

11 March 2009, 13:14

Unless you add a 'maintenance mode' setting (ideally settable externally, to allow automation) , where mahara refuses to do anything that implies modifications (something like Moodle's maintenance mode). Then you could dump your database and copy your data directory because they would be in a steady state.

Saludos. Iñaki.

 

11 results