Sounds like a plan, and it's what I do most of the times when switching from dev -> staging -> live. I'd just recommend to do a backup/restore of the database, otherwise, you might run into incompatible id's (for content nodes)
Afterwards, publish all top level nodes and additionally, republish entire site to refresh the cache -> those steps are not mandatory, but I tend to do it for every move.
You could still do the import of data, but I'd remove the identity seed on the target tables (haven't done it before, and don't know what impact if would have if you switch it back on)
Hmmm.. what does "incompatible id's" mean? And what is "identity seed" and "target tables"? And should I at all be any concerned given your reply "it's what I do most of the time"... ;-)
Sounds to me like I can do this just as I plan, and it will work like charm.
@richard: that's exactly what i've suggested as well!
@skaue: each record you'll be importing in the target db will get a unique node id, not necessarily identical to the source record, which may cause pages to break (if you create links to other pages from the rte for example), that's what I mean with incompatible id's (identity seed is a sql server term / target table is the table on the target db, the database you're going to move the data to)
Oh, and btw, umbraco has some nice products for this job, it's called Courier!
Hmm... I'm getting an SQL error when trying to publish changes, and was wondering if it may have something to do with my export/import-approach
Cannot insert the value NULL into column 'id', table 'axdata_cms_dk.dbo.cmsPropertyData'; column does not allow nulls. INSERT fails. The statement has been terminated.
Apparently your id-field in the db does not have the "identity" property set to true - open the table in your Visual Web Developer Express (or whatever you use to view db), and set the id-property called Identity to true.
My problem is that I have an already running umbraco on a webhotel, and with limited access to the sql server I cannot create a backup (no access to filesystem on server). I want to move the umbraco site to a new server where I have full RDP access, though only SQL Server Express.
Im planning to do the exact same thing as the original post describes.
Just to be clear, I do not need to make a "blank" installation of umbraco on the server where I intend to copy to? Umbraco has never been used on that server, but copying my local files is enough to get Umbraco running?
If you don't want to have a blank install (I assume you mean no following the install wizard) you must restore the database that you used locally to develop the site on your server and then copy the local files
How to duplicate an Umbraco installation
I have a working Umbraco installation I want to duplicate to save me some configuration time.
My plan is to do the following:
1) Create a new database and import all data from source to this database
2) Create a new website and copy all files from source to this website
3) Modify web.config to point at new database created in step 1
Before I do something stupid; does this sound like a brilliant plan?
Thanks for reading! :-)
Hi skaue,
Sounds like a plan, and it's what I do most of the times when switching from dev -> staging -> live. I'd just recommend to do a backup/restore of the database, otherwise, you might run into incompatible id's (for content nodes)
Afterwards, publish all top level nodes and additionally, republish entire site to refresh the cache -> those steps are not mandatory, but I tend to do it for every move.
Cheers,
/Dirk
You could still do the import of data, but I'd remove the identity seed on the target tables (haven't done it before, and don't know what impact if would have if you switch it back on)
/Dirk
Hmmm.. what does "incompatible id's" mean? And what is "identity seed" and "target tables"? And should I at all be any concerned given your reply "it's what I do most of the time"... ;-)
Sounds to me like I can do this just as I plan, and it will work like charm.
Why not just Backup and Restore the database and then follow the step 2 and 3 that you mentioned?
Cheers,
Richard
@richard: that's exactly what i've suggested as well!
@skaue: each record you'll be importing in the target db will get a unique node id, not necessarily identical to the source record, which may cause pages to break (if you create links to other pages from the rte for example), that's what I mean with incompatible id's (identity seed is a sql server term / target table is the table on the target db, the database you're going to move the data to)
Oh, and btw, umbraco has some nice products for this job, it's called Courier!
Cheers,
/Dirk
@ Dirk, sorry, I really need weekend :-(
No worries Richard, now skaue will have to follow our advice as we both have been suggesting the same?
/dirk
hehehehe..... As long as you both agree. I might consider running a backup/restore instead of import.
I didn't know about the ID issue, but I've been testing the site and everything seems to work... even links created in rte
Hmm... I'm getting an SQL error when trying to publish changes, and was wondering if it may have something to do with my export/import-approach
Cannot insert the value NULL into column 'id', table 'axdata_cms_dk.dbo.cmsPropertyData'; column does not allow nulls. INSERT fails.
The statement has been terminated.
oh, and running sql express, without any profiler tool ofc, how do I debug sql's in umbraco?
Apparently your id-field in the db does not have the "identity" property set to true - open the table in your Visual Web Developer Express (or whatever you use to view db), and set the id-property called Identity to true.
>Tommy
Thanks!! You are right, and this is why export/import DOES NOT WORK... I will do a backup/restore instead....
If you use the Database Publishing wizard available from e.g. Visual Web Developer Express you will get identity properties etc. also.
>Tommy
My problem is that I have an already running umbraco on a webhotel, and with limited access to the sql server I cannot create a backup (no access to filesystem on server). I want to move the umbraco site to a new server where I have full RDP access, though only SQL Server Express.
Sure, but the publishing wizard will give you a large sql file containing everything - and you can execute that on your hosted db.
I used Sql Management Studio to script all the tables (drop/create included) including data.
Running that on the the target server worked flawlessly already a couple of times. (= no issues with id's).
YMMV
Im planning to do the exact same thing as the original post describes.
Just to be clear, I do not need to make a "blank" installation of umbraco on the server where I intend to copy to? Umbraco has never been used on that server, but copying my local files is enough to get Umbraco running?
Thanks!
@sledger,
If you don't want to have a blank install (I assume you mean no following the install wizard) you must restore the database that you used locally to develop the site on your server and then copy the local files
Cheers,
Richard
is working on a reply...