Restore site from database

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
9/5/2011 9:41:26 AM
Gravatar
Total Posts 26

Restore site from database

Hallo,

I have (had sad) a website for a scoutting group, a friend of mine have a server, where I have the website hosted, unfortunately is the harddrive in the server broken, and all my website files are gone - and I only have a local backup of my design skin, not all the text and images...

The server use MS SQL server, and the database is on another harddrive, so my qustion is... Can I restore the website from the database? So it can generate my pages, so I "Only" have to restore the images?

Regards

Søren, Denmark

9/5/2011 9:48:53 AM
Gravatar
Total Posts 18439

Re: Restore site from database

Hi Soren,

If the database was not affected by the file system problem then you should still be able to connect to it using the same connection string. All of the site content is in the database except images and files uploaded.

To restore a database on another machine you would first have to get a backup of the database by creating a backup using SQL Server Management studio on one machine then restore the backup on a new database on another machine also using SQL Server Management Studio.

Else if you get the database files and copy them to your local machine it "might" be possible to attach to it as an existing database rather than restoring it from a backup, but you'll have to do some googling to learn about that possibility.

Hope that helps,

Joe

9/5/2011 9:57:04 AM
Gravatar
Total Posts 26

Re: Restore site from database

Hey Joe,

Super, that was the answer I was hoping fore :-)
Can I simply download the Mojo files from your website again, and the just setup the database connection to my existing database, and it will then restore when I run the setup.aspx file?

Regards
Søren

9/5/2011 10:08:52 AM
Gravatar
Total Posts 18439

Re: Restore site from database

If you install the same version of mojoPortal and the database is still intact then you don't even need to run the setup page (though it doesn't hurt anything to run it). If you install a newer version of mojoPortal and the database is still intact then it should also work but it will upgrade the database when you visit the setup page.

I would first make sure you can connect to the database form SQL Server Management Studio and verify that it still has the tables and stored procedures. If the database is on a remote machine you may or may not not be able to connect to it from your local machine. In that case if you are trying to restore a copy on your local machine you would need to connect using SQL Tools on the remote machine, make a backup, copy the backup to your local machine, create a new database on the local machine and restore the backup over the new database.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.