Comprehensive data protection for all workloads
cmdrriker
Enthusiast
Posts: 28
Liked: never
Joined: May 06, 2010 11:59 am
Full Name: Will Smith
Contact:

Move Veeam database only to another sql server

Post by cmdrriker »

I'd like to move an existing Veeam database from a locally installed sql server (sql is currently installed on the same server as Veeam) to a remote dedicated sql server. We are consolidating all of our standalone application sql instances on to one dedicated sql server. I know how to do a database backup and restore in sql, so my question is not how to move an sql database. What I don't see is a configuration option in Veeam to change where it should look for it's database. So, if I want to move the database only, not the Veeam installation itself, how do I change the database location in the Veeam application?


A registry edit is fine with me if there's not an option in the interface to do this. If a registry edit is the only way to do this, then specific information on the keys and values that need to modified would be appreciated.
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Move Veeam database only to another sql server

Post by Vitaliy S. »

Hello Will, just edit SQL connection settings on the backup server with the registry keys below:

Code: Select all

HKLM\Software\VeeaM\Veeam Backup and Replication\SqlServerName
HKLM\Software\VeeaM\Veeam Backup and Replication\SqlInstanceName
HKLM\Software\VeeaM\Veeam Backup and Replication\SqlDatabaseName
Thank you!
lobo519
Veteran
Posts: 315
Liked: 38 times
Joined: Sep 29, 2010 3:37 pm
Contact:

Re: Move Veeam database only to another sql server

Post by lobo519 »

I just tried this and wasn't able to get the Veeam service to start. Is there anything else to it?
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

Instructions above are for v4, and may not work for v5. I will ask dev/QC to find out and test the procedure that would works for v5. Thanks!
Bunce
Veteran
Posts: 259
Liked: 8 times
Joined: Sep 18, 2009 9:56 am
Full Name: Andrew
Location: Adelaide, Australia
Contact:

Re: Move Veeam database only to another sql server

Post by Bunce »

does the service account running veeam have sufficient permissions on the sql server to access the db?
lobo519
Veteran
Posts: 315
Liked: 38 times
Joined: Sep 29, 2010 3:37 pm
Contact:

Re: Move Veeam database only to another sql server

Post by lobo519 »

Yes it does - using an ODBC might make things easier in a future version?
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

Frankly speaking, this operation is too uncommon to justify investing development resources and touching core architecture components... having documented and tested procedure available should do it.
lobo519
Veteran
Posts: 315
Liked: 38 times
Joined: Sep 29, 2010 3:37 pm
Contact:

Re: Move Veeam database only to another sql server

Post by lobo519 »

any luck on getting the procedure?
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

I did email both dev and QC manager asking for help on this, have not heard back yet... and forgot to ping today... as always, your best bet would be to go through support with requests like this. Anything that came to dev/QC through support will never be forgotten or ignored, because support staff will sit on them until the issue is resolved or answer is provided :D
lobo519
Veteran
Posts: 315
Liked: 38 times
Joined: Sep 29, 2010 3:37 pm
Contact:

Re: Move Veeam database only to another sql server

Post by lobo519 »

Just an Update - I heard back from support. They said the only way you can point Veeam to a different SQL Server / DB you have to uninstall and reinstall and pick the new server on reinstall.

I would have expected at least a registry edit to make the change as in previous versions.
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

What is your support case number, I just want to make sure support engineer understood what you wanted to do. Thanks!
lobo519
Veteran
Posts: 315
Liked: 38 times
Joined: Sep 29, 2010 3:37 pm
Contact:

Re: Move Veeam database only to another sql server

Post by lobo519 »

ID#544622

Thanks!!
Bunce
Veteran
Posts: 259
Liked: 8 times
Joined: Sep 18, 2009 9:56 am
Full Name: Andrew
Location: Adelaide, Australia
Contact:

Re: Move Veeam database only to another sql server

Post by Bunce »

That can't be right. One of the commonly posted methods on handling DR for the Veeam Server involves replicating the SQL database manually to the DR site.

This requires redirecting the Veeam server to the new SQL server. We use this as do many others, and is recommended by Veeam staff given there are currently no built in alternaves.

Are you sure you changed those keys correctly? If you've got a spare server, try a fresh install to the new SQL Server and compare the reg keys to what you are currently using.

There may even be a key which differentiates between local and external databases.. I know there's an additional key that needs to be changed if you are conneting to the DB from a different Veeam server
lobo519
Veteran
Posts: 315
Liked: 38 times
Joined: Sep 29, 2010 3:37 pm
Contact:

Re: Move Veeam database only to another sql server

Post by lobo519 »

OK - support confirmed that these keys were the correct ones to change even with Version 5. Where I got caught :( - I filled in the "SQLInstanceName". with this specified I could not start the Veeam Backup service. Leaving it blank did the trick!
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

Glad to hear it all works fine now! Thanks.
stevenrodenburg1
Expert
Posts: 135
Liked: 20 times
Joined: May 31, 2011 9:11 am
Full Name: Steven Rodenburg
Location: Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by stevenrodenburg1 »

It was only a matter of time ;-)

Same question for V6. Same procedure with the registry ?
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

Should be the same. You would be the first to try ;)
stevenrodenburg1
Expert
Posts: 135
Liked: 20 times
Joined: May 31, 2011 9:11 am
Full Name: Steven Rodenburg
Location: Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by stevenrodenburg1 »

Ok. I tried it on V6.

It is indeed the same principle.

1. Shutdown all Veeam Services on the master.
2. Move the database to another machine. I just copied the two DB files (DB+Log) to another SQL server and mounted the DB there.
3. Edit the registry on the master and modify the following keys:

Code: Select all

HKLM\Software\VeeaM\Veeam Backup and Replication\SqlServerName
HKLM\Software\VeeaM\Veeam Backup and Replication\SqlInstanceName
HKLM\Software\VeeaM\Veeam Backup and Replication\SqlDatabaseName
and

Code: Select all

HKLM\Software\VeeaM\Veeam Backup Catalog\SqlServerName
HKLM\Software\VeeaM\Veeam Backup Catalog\SqlInstanceName
HKLM\Software\VeeaM\Veeam Backup Catalog\SqlDatabaseName
Warning: The value of "SqlInstanceName" should be cleared/empty in both cases !!

4. Start Veeam and that's it.

What astonished me is that there is no authentication what so ever. At least not in the registry. No username and hashed password. Nothing. On the new SQL server, the Database is owned by an entirely different account etc. but it worked anyway. I expected an authentication failure.

Personally, i don't have a problem with it as i see no threat in a hacker getting access to the Veeam DB so easily, because what will he see? Nothing of interrest. Just the jobs and their configs.
Anyway, that's my point of view but i can see it being the start of a healthy security-discussion though :wink:
captainflannel
Enthusiast
Posts: 31
Liked: 5 times
Joined: Feb 27, 2012 8:53 pm
Contact:

Change Veeam Backup/Replication SQL Database

Post by captainflannel »

[merged]

We would like to change where our Veeam Backup/Replication database is located. We will be moving from a 'remote' sql server to a local SQL install on the Veeam Backup Server. We all plan to only use SQL Authentication. Is there any easy way to simply change the pointers of the application to point to our new desired location? I've asked support but the first response was to uninstall and re-install, I imagine there must be something easier.

I see the SQL Server instances saved in HKLM\SOFTWARE\VeeaM\Veeam Backup and Replication
I see REG_SZ values for SQLServerName, SQLDatabaseName, SQLInstanceName, is there any documentation on what values can be used to supply SQL username/password for SQL Authentication
captainflannel
Enthusiast
Posts: 31
Liked: 5 times
Joined: Feb 27, 2012 8:53 pm
Contact:

Re: Move Veeam database only to another sql server

Post by captainflannel »

So when we would like to use a specified SQL User, instead of Windows Authentication to the Database, what or how do we provide the username/password?
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

SQL authentication is currently not supported by our product.
captainflannel
Enthusiast
Posts: 31
Liked: 5 times
Joined: Feb 27, 2012 8:53 pm
Contact:

Re: Move Veeam database only to another sql server

Post by captainflannel »

For proper disaster recovery I would suggest this as a feature request. If our AD Servers are virtual, and offline, how can we authenticate to the SQLServer to perform a restore?
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

Yep, this definitely makes sense.
stevenrodenburg1
Expert
Posts: 135
Liked: 20 times
Joined: May 31, 2011 9:11 am
Full Name: Steven Rodenburg
Location: Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by stevenrodenburg1 »

captainflannel wrote:For proper disaster recovery I would suggest this as a feature request. If our AD Servers are virtual, and offline, how can we authenticate to the SQLServer to perform a restore?
To avoid such problems, and other potential chicken-egg problems. I do things differently: Infrastructure databases, veeam servers etc. are not domain-members at all in my designs. I make them fully independent from DNS and Active Directory so they can always find one another and they always work. I can always restore quickly and without trouble.
Until now, i never found reasons to have the databases of Veeam, VMware (vCenter, Composer, View-Event, Updatemanager) and some other infrastructure products on database-servers who are domain-members. No need at all.
Those kind of db-servers are **pure** infrastructure db-servers and i kill anyone who starts putting "application/production" databases on them (as they often require Windows integrated authentication).
Gostev
Chief Product Officer
Posts: 31457
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Move Veeam database only to another sql server

Post by Gostev »

Good point, Steven!
captainflannel
Enthusiast
Posts: 31
Liked: 5 times
Joined: Feb 27, 2012 8:53 pm
Contact:

Re: Move Veeam database only to another sql server

Post by captainflannel »

Just to update with our progress. We have setup a Local Windows Account with the necessary Admin and Security requirements to Run VEEAM and SQL. Attached the SQL Databases to our dedicated physical VEEAM Server, and mapped the local windows account to DBO Role of the databases. Uninstalled VEEAM B&R and Enterprise Manager, Catalog Server. Reinstalled VEEAM B&R and pointed to the localhost SQL Instance and supplied the local windows username/password, same process for Enterprise Manager. So I will have to actually confirm, but I believe we are now completely ready for an AD/DNS failure, and can either run Instant Recovery/Replica Failover with our VEEAM box. This was our main concern, sorry to go off topic but my original thread was merged.
(I think just to be extra cautious I'll add all of the VEEAM servers and vsphere/esxi hosts to the VEEAM Server host file :) ! Would be nice if this could be a feature for such a Disaster Recovery Product)
ChrisL
Enthusiast
Posts: 47
Liked: 6 times
Joined: Mar 21, 2011 12:04 pm
Full Name: Chris Leader
Contact:

Re: Move Veeam database only to another sql server

Post by ChrisL »

If I may just hijack this thread (it's on-topic!)

I'm trying to relocate our SQL database to our enterprise SQL server running SQL2008. I've detached from the local SQL server, moved the files to the new server (well, copied, just in case) and attached them to the SQL instance on the remote server.

I've changed the various SQL location entries in the registry to point to the new server/instance but now the Veeam services will not start. If I roll everything back in the registry and point everything back to local then the services start as normal so the failing services must be related to the SQL database.

Might it be relevant that the local SQL is 2005 and the remote SQL is 2008..? As I understand it this shouldn't matter, but at the moment that's all I can assume, or maybe it's an authetication issue with the service credentials. I've tried the registry entries with the SqlInstanceName entries empty or populated but no joy either way.
ChrisL
Enthusiast
Posts: 47
Liked: 6 times
Joined: Mar 21, 2011 12:04 pm
Full Name: Chris Leader
Contact:

Re: Move Veeam database only to another sql server

Post by ChrisL »

Little update:

Seems it may have been related to the authentication of the Services. Previously the service was logging on as DOMAIN\Veeam, this is now DOMAIN\Administrator and the services have started correctly
cffit
Veteran
Posts: 338
Liked: 35 times
Joined: Jan 20, 2012 2:36 pm
Full Name: Christensen Farms
Contact:

Re: Move Veeam database only to another sql server

Post by cffit »

I'm in the same boat as this last comment. I moved from SQL 2005 Express to SQL 2008 R2 Express on the same server. I tried the registry edits, but then the Backup and Replication service wouldn't start. I tried uninstalling and reinstalling B&R 6, and still the services hang at the end. I checked the 2005 database and I can't find any mention of the service account that B&R was running as all along, as if it was never set as a user on the database, so I don't know if in 2008 R2 you have to manually assign some permissions. I don't 'want to just set my domain admin account as the service account either.
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Move Veeam database only to another sql server

Post by Vitaliy S. »

Christensen, your Veeam B&R service account should have access to the database otherwise it won't be able to start. Please grant the required permissions, if it doesn't help, please open a support ticket with our technical team. Thanks!
Post Reply

Who is online

Users browsing this forum: dbeerts and 126 guests