Copied to clipboard

Flag this post as spam?

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


  • Arlan 58 posts 184 karma points
    May 05, 2015 @ 18:47
    Arlan
    0

    Deploy umbraco website

    I have created website using umbraco 7.2 locally, everything is created (pages,macros,document types), all content (text,images,etc) is entered on pages. the database is local (windows 7) sql server express 2012

    what would be best way to deploy whole website to third party hosting (godaddy in my case)?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 05, 2015 @ 20:09
    Dennis Aaen
    100

    Hi Arlan,

    If the first time you are deploying your site after end development, then I would take the following approach.

    First take a backup of your sql server express 2012 database. After you have taken the backup, then install this backup on the new envioment. Then you need to copy over the Umbraco files to your hosting provider, it could be using FTP.

    You could leave out the App_Data / Logs \ App_Data \ TEMP, because it won't give opinion to have logs from your localhost in production. The last thing you need is to point the connection string til new database in the web config on your live environment.

    Hope this helps,

    /Dennis

     

  • Arlan 58 posts 184 karma points
    May 14, 2015 @ 06:28
    Arlan
    0

    Dennis

    followed your steps all good!

  • Arlan 58 posts 184 karma points
    May 14, 2015 @ 06:48
    Arlan
    0

    Dennis
    I was going in backoffice, checking/opening  pages and some pages have this error: 

    would that be that database didnt copy 100% or files? How would i go about fixing this? thanks

     

    Received an error from the server

    Failed to retrieve data for content id 3182

    Cannot insert the value NULL into column 'id', table 'maryvanndb1.dbo.cmsPropertyData'; column does not allow nulls. INSERT fails. The statement has been terminated.

    EXCEPTION DETAILS:
    System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'id', table 'maryvanndb1.dbo.cmsPropertyData'; column does not allow nulls. INSERT fails. The statement has been terminated.
    STACKTRACE:
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 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, TaskCompletionSource`1 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.ExecuteScalar()
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 299
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy)
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy retryPolicy)
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command)
       at Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco)
       at Umbraco.Core.Persistence.Database.Insert(Object poco)
       at Umbraco.Core.Persistence.Repositories.VersionableRepositoryBase`2.GetPropertyCollection(Sql docSql, IEnumerable`1 documentDefs)
       at Umbraco.Core.Persistence.Repositories.ContentRepository.CreateContentFromDto(DocumentDto dto, Guid versionId, Sql docSql)
       at Umbraco.Core.Persistence.Repositories.ContentRepository.PerformGet(Int32 id)
       at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.Get(TId id)
       at Umbraco.Core.Services.ContentService.GetById(Int32 id)
       at Umbraco.Web.Editors.ContentController.CheckPermissions(IDictionary`2 storage, IUser user, IUserService userService, IContentService contentService, Int32 nodeId, Char[] permissionsToCheck, IContent contentItem)
       at Umbraco.Web.WebApi.Filters.EnsureUserPermissionForContentAttribute.OnActionExecuting(HttpActionContext actionContext)
       at System.Web.Http.Filters.ActionFilterAttribute.System.Web.Http.Filters.IActionFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation)
  • Arlan 58 posts 184 karma points
    May 14, 2015 @ 06:58
    Arlan
    0

    one more thing, all content is good and visible on visitor side, just in backoffice i get the errors.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 14, 2015 @ 11:11
    Dennis Aaen
    1

    Hi Arlan,

    What you could try to check if there something wrong with the copy of the database, is following. If you still have the old database you try point the connections strings to this database to see if you get the same errors in the back office if not then you know if something with the database.

    Perhaps it doesn't have copied all the files correctly to the server.

    Hope this can help you solve your issue.

    /Dennis

  • Arlan 58 posts 184 karma points
    May 14, 2015 @ 19:03
    Arlan
    0

    Dennis

    I compared the database tables in local and production, they looks different, for example id,contentNodeId are not the same, and the prodcution doesnt have any values under the Keys

     

     

     

     

     

     

    How do you copy database from local to prodcution? what are the steps?

     I used SQL Server 2012 Management Studio to export database, steps

    right click on database>Tasks>Import Data>

     

     

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 14, 2015 @ 19:16
    Dennis Aaen
    0

    Hi Arlan,

    Try to see this video from YouTube about how to create a backup of a database using the SQL Server management studio https://www.youtube.com/watch?v=eK526X3UhMM.

    After you have created the database backup then try to see this video about how to restore a database using the QL Server management studio, from a backup. https://www.youtube.com/watch?v=nFpwRMYCOR8

    Hope this helps,

    /Dennis

  • Arlan 58 posts 184 karma points
    May 14, 2015 @ 20:33
    Arlan
    0

    Dennis

    I looked at those videos, did that but still the tables are not the same,
    looks like i have same problem as here

    https://our.umbraco.org/forum/umbraco-pro/contour/8870-Cannot-insert-the-value-NULL-into-column-%27Created%27,-table-%27mydbdboUFRecords%27-column-does-not-allow-nulls

     http://stackoverflow.com/questions/15171124/local-sql-server-database-to-godaddy-sql-server

    The issue is with the Export tables functionality in Sql management studio, as it doesn't do anything by exporting the tables.
    Default values, keys, constraints, etc etc, are not included.
    We use the Sql Wizard usually to generate scripts with instead:
    http://sqlhost.codeplex.com/wikipage?title=Database%20Publishing%20Wizard&referringTitle=Home

    i could not make it this work, going to install from umbraco on godaddy from 0, then when get more time look into this more and post the answer.

Please Sign in or register to post replies

Write your reply to:

Draft