Import database in Umbraco Cloud?
# help-with-umbraco
t
We are running Umbraco self hosted. I can export the database as either a .bak file or via Azure Data Studio make a bacpac file. I now would like to import this data to the dev environment SQL server in Umbraco Cloud, as we are moving from self hosted to Umbraco Cloud. I am trying to follow the guide in the documentation: https://docs.umbraco.com/umbraco-cloud/databases/backups#restoring-a-cloud-backup-to-a-sql-server-database However, I can't import a bacpac onto the one and only existing dev database there, SSMS throws an expected error: > The database 'pwmvp2j3pkv' already exists on the target instance of SQL Server. Specify a database name that does not already exist. I can't import it to a new database either, an Umbraco Cloud user can't create SQL databases willy nilly. Is there any other approach that works instead? We will have to do this import process multiple times (for ensuring migration will work, and later for ACTUAL migration) and we can't do it a single time as it stands right now. 😦
w
My worry here is that the docs specifically refer to it being "Restoring a Cloud backup to a SQL Server Database" i.e. I think it expects you to be restoring a backup generated from within Umbraco cloud, I could be wrong though. Have you put in a support request through the cloud portal? They might be able to confirm if the same instructions apply for migrating a normal Umbraco site to a cloud one
Also assuming you've went through the step to enable db containment
t
Putting in a support request as we speak. I tried that db containment query, but it says "against master" which has me confused. I am connecting to the dev database, I tried running it, and it gives me:
Copy code
Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'sp_configure'.
Msg 40510, Level 16, State 1, Line 3
Statement 'CONFIG' is not supported in this version of SQL Server.
Could it be assumed that you must run this toward a local database instance instead?
w
To explicitly run that containment query against master, put this line at the beginning: use master; If you're in ssms it should let you select the current db from the drop-down in the toolbar as well
I think this assumes the db you're restoring has the contained security model though, which will depend on how the db you're backing up from. Like I say not 100% sure on this, it's not something I've been through
t
But in umbraco cloud you only have access to the specific databases for your content, not master db. I don't think you can use the drop down even. I can try in SSMS, but in Azure Data Studio it did not work due to permissions.
w
Aha, in that case I'm stumped. Maybe it is something you need to run on the source environment?
t
the more I look at this the more it seems the migration process depends on syncing from your local environment and it will disregards Users, while we have about 240 of them 😬 seems we're screwed I found this in a youtube content https://cdn.discordapp.com/attachments/1232991590948278302/1233027375839838218/image.png?ex=662b99ba&is=662a483a&hm=5e81450baae865657633cabd819bc55bea567aa6a84cd2117bba4f912377bbe7&
w
Oh dear. I hope cloud support can give you something a bit more useful when they get back, if having to switch to cloud is a done deal..
c
Let us know when support get back to you. Last time I tried it took 6 days. I would hope they'd be over their backlog by now (a year later).
t
I got a reply yesterday already but the questions are in progress, they should get back to me today I hope
We might have to abort our plan to move to umbraco cloud as it stands now, we're not sure it's the right use case to have a large self hosted site (we have tons of media files as well, hundreds of users etc) and move that to cloud. We'll see if support has any ideas first.
51 Views