Skip to main content
Solved

Backing up and restoring folder structure only


Yuggyuy
Byte
Forum|alt.badge.img+6

Hi all.

I am following best practice for SQL server VM backups by snapping the OS and SQL program file drives only, filtering out the drives that hold the databases.

So if we lose the VM, we restore the VM from snap backup, add drives and then use the SQL agent to restore the databases.

The issue we have is that to do the restore requires folders to be manually created on the newly added drives, and on some of our SQL servers with multi instances there can be a great many of these.

There doesn’t seem to be an option for the SQL restore to create the folders it needs so I had the idea of using the file agent to backup the drives, but filtering out all files, so it effectively just backs up the folders.

We could then use the file agent to restore the folder structure and the sql agent to put the databases in the folders.

I can’t quite work out though, how to filter out all files, but keep the folders.

Can anyone help?

Thanks.

Best answer by Hyder

What if you just did a wildcard filter for the file extensions within the folders like *.dmp I think then only the folders will be protected and no objects underneath the folder structure.

View original
Did this answer your question?
If you have a question or comment, please create a topic

3 replies

Hyder
Vaulter
Forum|alt.badge.img+8
  • Vaulter
  • 86 replies
  • Answer
  • March 4, 2022

What if you just did a wildcard filter for the file extensions within the folders like *.dmp I think then only the folders will be protected and no objects underneath the folder structure.


Yuggyuy
Byte
Forum|alt.badge.img+6
  • Author
  • Byte
  • 27 replies
  • March 4, 2022

Hello.

Yes, that’s actually a really good idea, I hadn’t thought of trying to make it backup a generic file, rather than filtering out.

Cheers I will try it.


Yuggyuy
Byte
Forum|alt.badge.img+6
  • Author
  • Byte
  • 27 replies
  • March 4, 2022

So yes, I added *.* to the filters, but an exception of *.org (random suffix), and it has just capture the folder structure.

 

Cool​​


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings