Unfortunately, it won't be quite that simple. Almost everything in umbraco has representation in the umbracoNode
table.
Then, all of the custom property data that you have will be stored in these tables
Umbraco 7
cmsPropertyData
cmsPropertyType
.
Umbraco 8+
umbracoPropertyData
cmsPropertyType
I've found that I can get most of what I want with queries like this:
SELECT TOP 1000 *
FROM cmsPropertyData pd
INNER JOIN cmsPropertyType pt
ON pt.id = pd.propertytypeid
INNER JOIN umbracoNode n
ON n.id = pd.contentNodeId
WHERE n.id = 1853
However, you're after info about a specific document type, so you're might look more like this:
SELECT TOP 1000 *
FROM cmsPropertyData pd
INNER JOIN cmsPropertyType pt
ON pt.id = pd.propertytypeid
INNER JOIN cmsContent c
ON c.nodeId = pd.contentNodeId
INNER JOIN cmsContentType ct
ON ct.nodeId = c.contentType
WHERE ct.alias = 'BlogPost'
And then, you'd probably be getting data back for multiple versions of each blog post node, so you'd need to do more joins with the version tables cmsContentVersion
table to get just the latest data.
The version data is stored in tables like this
Umbraco 7:
Umbraco 8+:
If you are using Umbraco 7, you might think about trying to sidestep some of the database queries and try using the xml cache on disk that already exists. You can find an xml representation of all of the published content at App_Data\umbraco.config
. You should be able to trim it down to just the xml representation of the Blog Posts.
I was also reading at this stackoverflow post that you can just export by document type as a Package. You could go to Developer->Packages->Created packages
and right click to create. Then in the Package Contents
tab, just check the Blog Post document type. Not sure if that will be useful to you because I haven't tried that myself. Looks promising though.