Check out the LimeSurvey source code on GitHub!

restoring responses from sql table dump?

5 years 9 months ago #61000 by ckolar
Have used LS forever and now using it in my organization officially after convincing them to put it into pruduction, so it is run by real sysadmins and not under my desk.

I was in a hurry, so I created a new survey (lime_survey_98765) by copying the existing one (lime_survey_12345) that just closed but that will use identical questions. Then I got sloppy. Wasn't paying attention, was in a hurry, thought "wow, it copied the token table too, let me delete that" and then "wow, it copied the response table too, let me delete the responses" and then I loaded new tokens and then I sent out the invite --

and then came the inevitable realization that I was not working on the copy.

So survey 12345 is now filling with new responses. I contacted my sysadmin and he was able to pull the response table from the previous day's backup, so I have the sql dump of the response table lime_survey_12345. If I have to I can pull it apart and tally responses in SPSS or whatever and it will be my penance for having been careless. But the data was saved.

But I was wondering if there is a way, without involving the sysadmin and using only my user powers, to use the sql dump to upload the responses into lime_survey_98765 -- that is the empty identical copy of the survey that the data was derived from. The "import response table" feature seems to want to list archived response tables in the database using the same survey id, but I was kind of hoping that there would be an import SQL option for response data. My guess is that I am wishing for too much. Thanks in advance. Chris

Please Log in to join the conversation.

5 years 8 months ago #62131 by blfesper

This may be a convoluted solution, but may help. Assuming you have your dev box running under your desk, run the sql dump on that system, populating the results into that LimeSurvey system.

From there, I would assume you could export a .vv survey file from the results on your desk system. That export, I think, could be used to import back into the production system. It appears that the import checks for duplicates.

Obviously, I would test this locally by creating copies of the surveys in dev and doing the export/imports to be sure you don't corrupt any data.


Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form