Update Survey Solutions

Dear Survey Solutions support team,

We have deployed Survey Solutions 5.18 on a local server. We would like to upgrade to 5.19 and keep all the old data previously collected. Will a simple reinstall of the software do the work?

Peng

Dear Peng,

While we’re still working on improving our local installation toolkit, we had decided to disable in-place upgrades. Current installer only works for fresh installations.

We plan to relax this requirement from the next release and allow in-place upgrades.

Meanwhile, I will write to you another message explaining the manual steps if you wish to upgrade your current setup.

Best,
Zurab

Dear,
We have a local installation off survey solution since two month. How we can update it to new version 18.08 of survey solutions without loosing data?

Best regards

You just need to run the latest installer on the machine where you are running the previous version and upgrade mode will be activated. This will keep all the settings intact and will NOT touch the database.

without loosing data

It’s very important that you do regular backups of your data, you should also do a fresh backup just before running any upgrade to make sure you have something to fallback in case of any unexpected problems.

1 Like

Dear Zurab,

We upgraded our server from 5.18 to 18.12.5 on Tencent cloud sever in China today. Then we lost all of the data, like we have an all-new server now. And unfutunately, 3 out of many questionnaires did not back up before the upgrade. That is, we lost 3 questionnaires with tens of completed questionaires on our local cloud server. 

So what should we do now, and are there any possible ways for us to restore the data? Thanks!

Biaoyue Wang

Dear Biaoyue,

Do you have access to the Postgres database? If so, you may check if the old data is still there.

Peng

Yes, we tried to search both in SurveySolutions’ folders and pgAdmin’s tables, but we still can not find the old questionnaire and respective data. Thanks for your advice. @jiapeng

Can you restore the backups on a different machine and see where the data gets saved there? Then check the same location on the real server?

@wangbiaoyue, let me ask couple questions first:
a) Do you do regular backups of your database? if so, what do you mean 3 questionnaires did not back up?
b) What skills do you/anybody in your team have to manage a database?

If the answer to either of this is No, then you have to stop whatever data-collection activity you do and either switch to our cloud, so that we manage your data, or find someone who can maintain your server for you. Running local server without proper IT skills will inevitably lead to issues that may include data loss.

Having said all above, Survey Solutions code doesn’t have ‘drop database’ or ‘drop table’ etc in it at all, so there is no way any bug in installer, or the headquarters app itself would result in a deleted database.

It is unclear what you mean by ‘not being able to find questionnaires and respective data in pgadmin tables’, postgresql has concept of database>schema>table>record do you not see a database (named SurveySolutions) on your server? or do you try to find some specific record in a specific table? I don’t think you would be able to find data by simply browsing our databases - it meant to be for internal (for Survey Solutions app) use and not meant to be directly accessed/analyzed by users.

Please take a look at my response to another user’s question here, we still haven’t observed such a problem on our systems but if there is an issue with the installer, there would be something like what I described in that response.

Let me answer your questions quickly:
a) we do regularly backup our data, but this time of losing data was unexpected because the backup of the 3 questionnaires’s data had been deleted wrongly.

b) I have some knowledge of SQL database software and C#.

I checked the SurveySolutions database in ProgreSQL, saw some tables about user accounts and others, but could not see any tables about the questionnaires.

So now, I want to ask, is it possible for us to copy a table of a questionnaire of SurveySolutions generally?


As to the upgrade, generally after we finished it, the old data and questionnaires are still remain, but this time - all of them disappear, like an all-new server.

@zurab The above reply is for you. Thanks!

I’m glad to see that you’re comfortable working with postgresql, but still having difficulty understanding few things, let me ask differently:
What do you mean ‘back up of 3 questionnaires data are deleted’? if you backup the database, say, using pg_dump, it saves all data of all tables in the database, so it will contain everything to the moment of time you started the backup. So, unless you found a bug in postgresql/pg_dump itself, the backup file you generate should contain the snapshot of the database at the moment at the specific time moment. Could you help me understand this?

Second, I see from your screenshot that there is a schema called scheduler, we don’t have that in our application, also I see one table in the public schema, that is not ours also. Has database been manually altered?

As I said earlier, of course you have full control of your machines and have access to the postgres database but it is NOT meant to be manipulated externally, and we cannot and will not guaranty that system continues working if such external manipulations are performed.

So, to recoup - Survey Solutions does not delete database so there must be something else going on and I will not be able to help unless you help us understand exactly what happened - what actions did you do on the server?

Thank you Zurab.

But we just backup the SurveySolutions data by generated the data of the questionnaire on HQ, not by the PostgreSQL. The 3 questionnaires and related data were exported and then deleted.

Today, we will try to re-install the previous version of SurveySolutions, hope it can read and show the old setting and quetionnaires and other things. Will this work?

@zurab

ok, so by ‘backup’ you mean exporting data into stata/tab/spss format. I get this part now.

The you exported data for 3 questionnaires, and then you deleted those from the system. And then you installed new version (and here I’ll have to repeat again - which does not delete any data during installation or otherwise).

So let’s go back to the first question, when you say after installation all data were gone, what do you mean? there was not even an admin user, you were presented with ‘finish installation’ (create admin) page?
or, you logged in with your old user but inside the system didn’t see data as expected?
can you give me more screenshots how app looks now?

please don’t install anything, especially an old version right now, without figuring out what is going on I don’t want to further complicate the situation because I am already confused with what you have or haven’t done so don’t want to do more steps.

Here are some information offered by my teammate Boya:

Before the upgrading, we didn’t delete any data from the HQ system (just exported and then deleted on another computer). And after upgrading, all data which we collected - tasks, reports and users information were gone. But only can see some records of Audit log on the HQ system. It’s like a all-new system.

So you mean upgrading won’t delete any data from server, right? Where can I find it?

And importantly, even we can not see anything on the “Teams and Roles”, we can still log in by the old users (like, SP, HQ, Interviewer).

After we finished the upgrading, no “finish installation” and creat admin page - because all of these data are remain (as I can see them in the SQL tables) - although I can not see them in “Teams and Roles” now.
@zurab Thanks!

So could you let us know your email or skype account (please send to wangbiaoyue@pku.edu.cn)? And then let me send you our server log in acount and HQ ID, and you can have a look if it is necessary.
@zurab

Yes, please send us the server logs from \site\app_data\logs\ folder to support at mysurvey dot solutions

Dear zurab,

We have sent you the logs files throught support email.

For this upgrading system problem, I want to underline again that: 1)I think the data in the server is still stored in the SQL; 2) the new version SS can not show them after upgrading but can read or use the old user accuont data, like - we can log in by the old user account although we can not see it in the “Teams and Roles” tab.

Thank you very much!

As I responded in the private support email, there seems to be an issue with the database migration. However let me not continue our dialog here not to confuse other forum readers. As soon as we have a resolution and you confirm it working I will update my response in this post for everybody else’s reference.