moodle-local_datacleaner
moodle-local_datacleaner copied to clipboard
Investigate skipping tables in restore step to save time
There is a large variety of tables that we want to restore the schema of, but not the data. Depending on the DB we can do this outside the moodle code, eg read this:
http://stackoverflow.com/questions/37038193/exclude-table-during-pg-restore
So not sure about the exact architecture here, but I think the rough steps are:
- [ ] create generic restore scripts (and maybe backup??) inside this plugin so that we have that under source control and this plugin is taking control of a little more of the process
- [ ] where applicable / possible we create the list of tables to restore data from (it seems we need a white list not a black list). We have a chicken and egg problem here as we don't yet have the DB restored. So maybe we parse the install.xml files and the excluded tables are hard coded? Or maybe because this is slowly changing, we have a cli script which generates the restore script based on current config, which you then copy as-is to the washing instance and run there.