Comprehensive data protection for all workloads
Post Reply
DanielJ
Service Provider
Posts: 239
Liked: 44 times
Joined: Jun 10, 2019 12:19 pm
Full Name: Daniel Johansson
Contact:

SQL export seems to always write to %TEMP% first

Post by DanielJ » 1 person likes this post

I am trying to export a database backup (I have tried both "Export backup" and "Export files"). I have specified the target folder as \\targetserver\sharename\foldername. VBR checks for free space in that location and it seems fine so far. The staging SQL server is local on the VBR server. A while after starting the restore, I get "Failed to export databases: A nonrecoverable I/O error occurred on file "C:\Users\username\AppData\Local\Temp\...\dbname.bak" 112(There is not enough space on the disk.).". I expected that the file would be written directly to the location I pointed out, but it seems it gets written to %TEMP% first. Somehow I have missed this so far, but I guess there has been enough free space on C: on all VBR servers I have had to do this on. This VBR server is not sized to house temporary copies of large databases, there is no local disk I can repoint %TEMP% to. Is there any workaround? I suppose that if the usage of %TEMP% comes from VBR, I could install the console on the repository. Or if it comes from the MSSQL staging server, I could install that too on the repository. Is there some other solution?
PetrM
Veeam Software
Posts: 3625
Liked: 608 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by PetrM »

Hi Daniel,

Please let me clarify either a workaround exists or not, I'll update the topic as soon as I have more information.

Thanks!
PetrM
Veeam Software
Posts: 3625
Liked: 608 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by PetrM »

Hi Daniel,

@DanielJ
Data is exported to the %TEMP% on the staging server, then it's sent to the target. The workaround is to take a staging server that has enough free space. I guess that it's worth updating our documentation to reflect the necessity to have enough space on the staging server and maybe update the text of the error message so that it is more clear. Thanks for the feedback!

Thanks!
DanielJ
Service Provider
Posts: 239
Liked: 44 times
Joined: Jun 10, 2019 12:19 pm
Full Name: Daniel Johansson
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by DanielJ » 1 person likes this post

Thank you for the clarification. I would recommend that VBR not only checks on the target for free space before beginning restore, but also on the staging server. That would be better than having it begin the restore and then fail with a Windows error about not enough space.
PetrM
Veeam Software
Posts: 3625
Liked: 608 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by PetrM »

Hi Daniel,

To be honest, I overlooked this detail, by some reason I thought you see an error before export is started and the message itself is not clear. Then, what you propose is even better.

Thanks!
jessey316
Enthusiast
Posts: 27
Liked: 3 times
Joined: Jul 08, 2020 1:35 pm
Full Name: Jessey Clarke
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by jessey316 »

Hi PetrM,

I recently ran into the same issue. I assume there is no way to specify where this %temp% location is?
PetrM
Veeam Software
Posts: 3625
Liked: 608 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by PetrM »

Hi Jessey,

Actually, you may try to create a new config file using this path: %programdata%\Veeam\Backup\SQLExplorer\config.xml. This config file must have the following content:

Code: Select all

<Veeam>
   <SQLExplorer>
      <Export TempFolderPath="C:\tmp"/>
   </SQLExplorer>
</Veeam>
where TempFolderPath defines the location for temp files.

Thanks!
Nas
Influencer
Posts: 16
Liked: 3 times
Joined: Oct 02, 2023 3:34 am
Full Name: Nas
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by Nas »

Hi @Petr,

I'm facing similar issue with .bak being store on Staging SQL Server D:\Tmp\Veeam during Veeam SQL Explorer export session.
I have created %programdata%\Veeam\Backup\SQLExplorer\config.xml and point to my VBR server E:\Tmp but it still being store to Staging SQL Server D:\Tmp\Veeam.

Is there other particular steps that is required after creating the config.xml?

Thanks.
PetrM
Veeam Software
Posts: 3625
Liked: 608 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by PetrM »

Hello and Welcome to Veeam R&D Forums!

Could you please clarify what you mean by "point to my VBR server E:\Tmp"? Please keep in mind that the location for export temp files must be on the staging server.

Thanks!
Nas
Influencer
Posts: 16
Liked: 3 times
Joined: Oct 02, 2023 3:34 am
Full Name: Nas
Contact:

Re: SQL export seems to always write to %TEMP% first

Post by Nas » 1 person likes this post

Hi and thanks for reply.

Initially I assume we can point the TempFolderPath to any server in Veeam backup infrastructure, now I understand that it can only be pointed to SQL staging server drives.

The config.xml method is working successfully for me now.
Thank you.
Post Reply

Who is online

Users browsing this forum: No registered users and 124 guests