Solved

Moving VeeamBackup.mdf (and ldf) to a different location


Userlevel 3

My Backup Server’s C: Drive is getting tight and I want to relocate Veeams’s MS SQL Database files from their default location on C:\Program Files\… to a larger Data drive. Now, whilst I can find articles about relocating the whole Veeam config to a different SQL Server, I can find nothing on moving the database mdf/ldf within the same Server.  

 

Is it simply a case of

  • stopping the Veeam services,
  • detaching the databases in SQL Server Management Studio, 
  • moving or copying the files to the new location,
  • attaching the database from their new location?

Has anyone had any experience of this? How successful was it? Are there any pitfalls to avoid?

icon

Best answer by dloseke 13 September 2023, 18:43

View original

13 comments

Userlevel 3

...oh, and restarting the Veeam services, obviously.

Userlevel 7
Badge +17

Hi @TurkTownBlue - what you should do for the Veeam supported way is:

  • Open Veeam Cosnole on the VBR server
  • Disable all your jobs
  • Go to menu > Configuration Database and click ‘Backup Now’ to take a current backup of your configs
  • Take note of the config backup location and copy it to the other server
  • Install Veeam on the new server
  • In the Console on the new server, open the menu > Configuration Database and select to Import > Migrate
Userlevel 7
Badge +17

Veeam doesn’t really have any info on solely moving the SQL DB and Log files. The DB config backup/restore is their only supported way….that I’m aware of.

Userlevel 7
Badge +6

The veeam connection is via the SQL instance. As long as the DB is attached in the new location then Veeam should be fine. You are making no other changes to the SQL instance.

Userlevel 3

OK, thanks guys. 

 

I figure if I only COPY the mdf/ldfs to the new location a re-attach, then even if it doesn’t like it I can always detach them and re-attach the originals.

 

I’m fairly happy with the DB Admin side - that’s my main role - Backup is a second hat that I wear.

 

The Veeam config is backup up daily and checked so, fingers crossed...

Userlevel 7
Badge +20

You can migrate the DB to another server or location.  Just follow this article - Migrating Configuration Database to Another SQL Server - User Guide for VMware vSphere (veeam.com)

Userlevel 7
Badge +20

If you install SQL on a larger drive just move the database over to there, attach it and then run the configuration utility for Veeam to redirect it.  😁

Userlevel 7
Badge +17

Ok, sounds good. Let us know how it goes. 

Userlevel 7
Badge +6

The veeam connection is via the SQL instance. As long as the DB is attached in the new location then Veeam should be fine. You are making no other changes to the SQL instance.

This.  If you stop your Veeam services and then stop your SQL database, detach and copy to your new location, and then attach in SQL and bring up the database using the same database name/instance, I don’t see any reason that Veeam won’t be able to reconnect to it when you restart the services.  If the database was for some reason to change names, server names, etc, you should be able to use the database configuration utility to connect to the database, similar to how you would need to do if the server name changed (I’ve renamed a few Veeam servers in the past and had to repoint Veeam to the same database with a different server name after the server was renamed).

Userlevel 3

Thanks everyone. I’ll give it a try now that I’m back at work (tomorrow) and will post the results!

Userlevel 7
Badge +20

Thanks everyone. I’ll give it a try now that I’m back at work (tomorrow) and will post the results!

Sounds good and hopefully you are able to get things working.  Keep us posted.

Userlevel 3

Apologies for the delay everyone, family medical crisis prevented my even thinking about this until today.

As it transpired, it was pretty much as MarkBoothman and  dloseke suggested - with one or two complications:

  1. Stop your running jobs on the Backup Server
  2. Disable all the jobs noting which, if any, were already disabled
  3. Stop the Veeam Services (use powershell, it’s easier)
  4. Detach your Veeam databases in SSMS. If you Offline them first you will be unable to detach them.
  5. Relocate the database mdf and ldf files to the new, roomier, location (this proved hugely problematic owing to permissions on the original files...which necessitated a sledgehammer approach involving enabling inheritance from the parent folder of the original mdfs)
  6. Attach the new copies of the mdf/ldfs in SSMS
  7. Restart the Veeam services (or just restart the Backup Server)
  8. Re-enable the jobs you disabled at 2
  9. Get a large beverage of you choice and try to relax
Userlevel 7
Badge +17

No worries at all. Appreciate the update & sharing what specifically worked for you. The last step sounds like the best one 😂

Comment