Copied to clipboard

Flag this post as spam?

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


  • Stefan Karlsson 14 posts 64 karma points
    Jan 28, 2014 @ 13:31
    Stefan Karlsson
    0

    Move Umbraco 6.0.2 from production to local.

    Hi i am trying to move my production environment to local so i can update the csm core.

    Before i start the upgrade i would like to get the local version work as expected.

    Things i have done:

    1. Copied the full source structure from my production environment to my local computer.
    2. Copied the database structure from production to a local sql express instance.
    3. Changed connectionstring inside the now local web.config so it points to my local sql express server.
    4. Changed url values inside umbracoDomains sql table to my local address: http://localhost:62992/

    The images disappear When this changes was made all images disappeared.

    The structure of the Media is:

    /Media/random-number/Image.jpg

    but when i change the db to the local patch are made like this:

    <img alt="Alt text" src="_Product Image.jpg">
    

    if i run local and changes back the connection string to the production db all images start to show again with the correct path.

    The Content tree is gone when i visit umbraco admin The tree is empty, i know the data is there but it does not render when i use the local db.

    Good to know:

    When i copied the db i used SQL Server Management studio's Export function.

  • Zakhar 171 posts 397 karma points
    Jan 28, 2014 @ 17:00
    Zakhar
    0

    Hey Stefan,

    Try to create full backup of your production server db and then restore it on your local machine. This will make sure the db looks exactly the same. Export/import might not always work.

    Zakhar.

  • Stefan Karlsson 14 posts 64 karma points
    Jan 29, 2014 @ 10:11
    Stefan Karlsson
    0

    Hi Zakhar and ty for the response, i have now made a restore from a full db-backup. The images still doesn't show up, what am i missing?

  • Zakhar 171 posts 397 karma points
    Jan 29, 2014 @ 10:29
    Zakhar
    0

    I've never had a problem like this before, have you tried to republish entire site / delete umbraco.config? Also what happens if you go to a content item, replace an image and republish, does it still outputs wrong url?

    Zakhar

  • Stefan Karlsson 14 posts 64 karma points
    Jan 29, 2014 @ 10:40
    Stefan Karlsson
    0

    The Content tree is gone when i visit umbraco admin The tree is empty, i know the data is there but it does not render when i use the local db.

    There is hard to republish when i can't even reach the content from the tree ;) What will the delete of umbraco.config do?

    The thing is still that the images show when i use the production db and not with local. Must be a db eller or a hard coded value somewhere, am i wrong?

  • Zakhar 171 posts 397 karma points
    Jan 29, 2014 @ 11:11
    Zakhar
    0

    Ah sorry, I missed that part about missing content, it's the main issue then. Are you sure you've done full restore (with replace)? Did you have any problems with it by chance, what version of db do you use? are they the same on your local and production machines?

    Have a look here :

    http://stackoverflow.com/questions/16010739/umbraco-6-0-3-missing-content-and-media-nodes

    http://our.umbraco.org/forum/getting-started/installing-umbraco/45534-Cannot-see-Content-Nodes-after-moving-database-to-stagging

    Might help you somehow.

    umbraco.config stores your content cached as xml, if you delete it Umbraco will recreate the file from db.

  • Stefan Karlsson 14 posts 64 karma points
    Jan 29, 2014 @ 11:40
    Stefan Karlsson
    0

    When i delete the umbroco.config i got xlts errors. The db has same version on production as in local. Just restored it from a fully created backup.

    I will have a look at the links you included, ty.

  • Stefan Karlsson 14 posts 64 karma points
    Jan 30, 2014 @ 11:36
    Stefan Karlsson
    0

    I have now figured out that this is a permission problem in the db.

    When i backup a db the user follows along the table but not the main security folder.

    I remove the user for the table and re create the user with same rights as in the production db.

    When i do this all the images disappear.

    What could i have missed?

    I also notice that the cmsContentType2ContentType table is under the sys schema. So my user is default in sys.

    The rest of the tables is owned by dbo.

    This is how my production and local looks like.

    Error from log:

    2014-01-30 10:49:11,224 [63] INFO  Umbraco.Core.Persistence.UmbracoDatabase - [Thread 60]    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at Umbraco.Core.Persistence.Database.

  • Zakhar 171 posts 397 karma points
    Jan 30, 2014 @ 12:29
    Zakhar
    0

    Hey Stefan,

    What user are you talking about? Is it database login? I usually create a new user, e.g. localdev and give it dbowner, dbreader and db_writer permissions to the db.

    Zakhar.

  • Stefan Karlsson 14 posts 64 karma points
    Jan 30, 2014 @ 14:19
    Stefan Karlsson
    0

    Hey Zakar,

    Yes and that is what i have done, but when i go to the local server i get this error. Could is be something with the sql version? Or is it some permissions.

    Will try em both :)

  • Stefan Karlsson 14 posts 64 karma points
    Jan 31, 2014 @ 15:50
    Stefan Karlsson
    0

    Just want to thank you Zakhar for all responses and tell you that i have now solved the problem. The table cmsContentType2ContentType and it constraints in the db was corrupt when i tried to backup the db.

    Needed to install a fresh copy of Umbraco and then move over all data with constraints again.

    Ty!

Please Sign in or register to post replies

Write your reply to:

Draft