Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carlos Mosqueda 240 posts 431 karma points
    Dec 09, 2018 @ 20:40
    Carlos Mosqueda
    0

    Updating Umbraco, Creating a DB back up, but Umbraco redirects to install when I switch to new DB issue

    I am trying to upgrade from Umbraco 7.9.0 to Umbraco latest 7.12.x.

    I am trying to create a back up of my MS SQL database.

    I have shared hosting and Plesk as my admin interface.

    Right now the "Copy" feature is not working, so the hosting company is looking into that. AND I can't create a new DB using Sql Server Management Studio (SSMS) at the root so I can do a new DB create in SSMS.
    Sooo, what I do is create a new DB (named something like "mydbu_ver712") in the Plesk admin, using the same DB user and it creates a new empty DB with my user as the production DB.

    I am using SSMS to run the "Tasks > Generate Scripts" and out put my schema and tables after the table in created through the Plesk admin panel. Seems to output what I think is correct.

    I THEN go to the new DB, and in SSMS right click on the DB and paste the SQL script into a new query.
    (For my example below, I have renamed the tables from the original), but my example prefix/schema looks like it outputs "mydbadmin".)

    Script below starts out something like this:

    (Original DB name (example) is "mydb", and new DB name is "mydbuver712")

    USE [my_db_u_ver712]
     GO
     /****** Object:  Schema [mydbadmin]    Script Date: 12/9/2018 
     12:25:45 PM ******/
     CREATE SCHEMA [mydbadmin]
     GO
     /****** Object:  Table [mydbadmin].[cmsContent]    Script Date: 
     12/9/2018 12:25:45 PM ******/
     SET ANSI_NULLS ON
     GO
     SET QUOTED_IDENTIFIER ON
     GO
     CREATE TABLE [mydbadmin].[cmsContent](
      ........
    

    So I have a few questions.

    1. You will see that there is a "CREATE SCHEMA" and when I run the script with that in it, I get an error saying that the object "mydbadmin" already exists.

    2. So I then move on and delete the DB, recreate it and then try to run the script WITHOUT the "CREATE SCHEMA" . And the script seems to load the tables fine without error.

    3. UMBRACO: So I go into the web.config and update the database name to my new DB name that I hopefully will be using while I do the upgrade.

    THE ISSUE: My issue is that after I point the web.config to the new DB, with the same user and credentials, I get the "Umbraco Upgrade" URL where it tries to toss the CMS into an upgrade. Though I have removed the "install" folder. At this point I haven't even done the overwrite of the Umbraco files to the newest CMS, I just pointed the web.config to my new database, which should, theoretically, be an exact copy of the current DB at this point before I even run any Umbraco upgrades.

    Why would Umbraco be trying to do the UPGRADE, when the new DB should be an exact copy (aside from the name), of each other.

    I don't want to run the upgrade until I know that the new DB can run on the current site before I do any upgrades, this way I can have an actual backup of both the DB and Umbraco. But if Umbraco is trying to run the upgrade script, I am not confident in doing this.

    Any pointers? Is there any where other than the web.config that the DB name is stored? Anything else?

    Thanks in advance,

    Carlos

  • Carlos Mosqueda 240 posts 431 karma points
    Dec 09, 2018 @ 21:00
    Carlos Mosqueda
    0

    Waaa waaa,

    So semi rookie mistake.

    Of course, before you create the actual script file in SSMS, you actually have to go into the "Advanced" button and export the Schema AND the data. Soooooo, yeh.

    Man I wished that Copy feature actually worked in Plesk.

Please Sign in or register to post replies

Write your reply to:

Draft