Reinstall Orchard onto Shared Host and recover previous posts

Topics: Installing Orchard, Troubleshooting
Jul 23, 2015 at 6:02 PM
Edited Jul 23, 2015 at 6:29 PM

I was running Orchard on my shared host and it stopped working. After some investigation, it became apparent that I couldn't make it work. so I deleted the existing Orchard files and folders and uploaded the contents of via FTP onto the site. (I tried later versions, but couldn't get them to run. I think that's because my shared host only has .Net 4.0 rather than .Net 4.5 installed.)

Is there any way to restore the data from my old site to this reinstalled site? The old site saved the data in an existing SQL Server that I have as part of the site. so I thought if I used the same site name, user name, password, connection string, table prefix as on the old site. it would just populate the new site based on the existing Orchard data held in the existing SQL Server.

No such luck. After keying the info in and hitting finish setup, it fails with the following error:

Setup failed: could not load an entity: [Orchard.Users.Models.RegistrationSettingsPartRecord#1][SQL: SELECT registrati0_.Id as Id171_0_, registrati0_.UsersCanRegister as UsersCan2_171_0_, registrati0_.UsersMustValidateEmail as UsersMus3_171_0_, registrati0_.ValidateEmailRegisteredWebsite as Validate4_171_0_, registrati0_.ValidateEmailContactEMail as Validate5_171_0_, registrati0_.UsersAreModerated as UsersAre6_171_0_, registrati0_.NotifyModeration as NotifyMo7_171_0_, registrati0_.NotificationsRecipients as Notifica8_171_0_, registrati0_.EnableLostPassword as EnableLo9_171_0_ FROM orc_Orchard_Users_RegistrationSettingsPartRecord registrati0_ WHERE registrati0_.Id=?]

I then finished creating the new site using new details and saving the data to SQL Server compact. I then replaced the settings.txt file in the new instance with my copy from my old instance ( I kept this and a couple of files only, not the whole lot) This led to a different error:

Invalid object name 'orc_Orchard_OutputCache_CacheSettingsPartRecord'.

I can't see orc_Orchard_OutputCache_CacheSettingsPartRecord in SQL server, only orc_Orchard_OutputCache_CacheParameterRecord. Erm, there may be a chance that I've installed a newer (or older) version than I had originally. Is there anything I can do to get my old data back into the site? Is there anywhere in the database schema that the application version is stored?