unable to restore a umbraco cloud database locally
hey out there,
hit a weird one today: i've created a backpac file of a database in our umbraco cloud account using ssms but i can't seem to restore it locally!
from what i've gathered from support, the databases are v2012. i'm trying to restore it to a local instance of 2014 or 2016 but i don't think this is the root of the problem as usually going up versions is fine (and i'm trying to avoid installing 2012 if i can!).
this is the error i get back from ssms:
Could not import package.
Warning SQL72012: The object [MyDatabaseName_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Warning SQL72012: The object [MyDatabaseName_Log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Error SQL72014: .Net SqlClient Data Provider: Msg 12824, Level 16, State 1, Line 5 The sp_configure value 'contained database authentication' must be set to 1 in order to alter a contained database. You may need to use RECONFIGURE to set the value_in_use.
Error SQL72045: Script execution error. The executed script:
IF EXISTS (SELECT 1
FROM [master].[dbo].[sysdatabases]
WHERE [name] = N'$(DatabaseName)')
BEGIN
ALTER DATABASE [$(DatabaseName)]
SET CONTAINMENT = PARTIAL
WITH ROLLBACK IMMEDIATE;
END
Error SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed.
Error SQL72045: Script execution error. The executed script:
IF EXISTS (SELECT 1
FROM [master].[dbo].[sysdatabases]
WHERE [name] = N'$(DatabaseName)')
BEGIN
ALTER DATABASE [$(DatabaseName)]
SET CONTAINMENT = PARTIAL
WITH ROLLBACK IMMEDIATE;
END
has anyone managed to restore a umbraco cloud database locally?!
correctamundo, it's umbraco cloud (i've started refering to it as that rather than 'umbraco as a service' or 'uaas' as it seems to return more results in google!).
the trick we have is that although we can restore a sql ce version of the development database locally when checking the project out from git, we actually need the live database as it contains a lot more data than the development database.
afaik there's not a way when running up a freshly checked out version of the source code to specify which database you want to restore from, i.e. development or live?
Bumping thread with a solution, for anyone searching for the same issue, if restore doesn't work (other reasons)
"The error is because on the SQL Instance level, you have contained databases disabled (ie contained database authentication is not set to 1) and then the script is trying to set containment to partial."
Command to run on SQL Server:
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO
unable to restore a umbraco cloud database locally
hey out there,
hit a weird one today: i've created a backpac file of a database in our umbraco cloud account using ssms but i can't seem to restore it locally!
from what i've gathered from support, the databases are v2012. i'm trying to restore it to a local instance of 2014 or 2016 but i don't think this is the root of the problem as usually going up versions is fine (and i'm trying to avoid installing 2012 if i can!).
this is the error i get back from ssms:
has anyone managed to restore a umbraco cloud database locally?!
cheers,
jake
Hi Jake
You don't need to restore Umbraco DAtabase locally if you are using Umbraco Cloud product.
What did you mean Umbraco Cloud by the way?
https://umbraco.com/products/umbraco-cloud/ - this one?
Thanks,
Alex
hi alex,
correctamundo, it's umbraco cloud (i've started refering to it as that rather than 'umbraco as a service' or 'uaas' as it seems to return more results in google!).
the trick we have is that although we can restore a sql ce version of the development database locally when checking the project out from git, we actually need the live database as it contains a lot more data than the development database.
afaik there's not a way when running up a freshly checked out version of the source code to specify which database you want to restore from, i.e. development or live?
am i barking up the wrong tree?!?!
cheers,
jake
Jake, you can restore live database to local.
Then migrate sqlce database to mssql with "SQLite/SQL Compact Toolbox" for example.
Thanks,
Alex
ah ha! so it can be done...
sorry, i must have missed something along the way - where is the option to select the live database from restoring when running up the site locally?
or is there a different way of doing it...
the compact toolbox is very handy, i've used it a lot recently ;)
cheers,
jake
ok, i've got to the bottom of this!
it's a menu item i've never seen in umbraco before...
the trick was to right click the content node and select the 'restore' option:
you then get a 2nd dialogue prompting you for an environment to restore from:
amazing! simple when you know how eh?!
there's also a video available here with more details:
https://umbraco.tv/videos/umbraco-cloud/getting-started-with-umbraco-cloud/restoring-content/
Bumping thread with a solution, for anyone searching for the same issue, if restore doesn't work (other reasons)
"The error is because on the SQL Instance level, you have contained databases disabled (ie contained database authentication is not set to 1) and then the script is trying to set containment to partial."
Command to run on SQL Server: sp_configure 'contained database authentication', 1; GO
RECONFIGURE; GO
is working on a reply...