Forums | Mahara Community

Support /
Deleting files that do not exist

anonymous profile picture
Account deleted
Posts: 91

24 August 2009, 3:37

Hello All,

We managed to lose all our "Mahara Data" ... and backups Surprised

Now we have to decide whether to rebuild Mahara from scratch, or just try and clean up what we have.

Our installation has only really been used for testing thus far, so it is feasible to rebuild it, that said, some people have done some work with it...

I would really like to know how difficult it would be to clear down the database of any file references where the files no longer exist, and wheter there are likely to be any issues with future upgrades (if we clear down the tables).

On a more general note, what do people think would be the best course of action:

  1. Hack around cleaning up the db.
  2. Rebuild from scratch
  3. Do nothing and let users clean up their own files


anonymous profile picture
Account deleted
Posts: 1643

25 August 2009, 18:52


Files in dataroot are pretty much all either 'file' or 'profileicon' artefacts.

You could probably delete from the artefact table where artefacttype = 'file' or artefacttype = 'profileicon' (plus removing records from foreign key tables like artefact_file_files, and resetting everyones profileicon column to NULL in the usr table).

You could at least give that a go and see what happens. Though losing your dataroot is pretty catastrophic I would have thought. I wouldn't just leave the system as-is though, we haven't exactly tested running the site when the files are gone Wink

If that fails, then a rebuild from scratch it is. 

2 results