Sometimes during a backup, we find the following in backup.log:
The process cannot access the file ‘C:\Windows\TEMP\tmp2F65.tmp’ because it is being used by another process.
What are these temporary files used for? Are these generated to actually create the backup and removed afterwards?
Laurens Vercruysse [SLC] [DevOps Advocate] Selected answer as best 10th December 2020
Hi Laurens,
Yes, the Temp folder is indeed used during the creation of the backup, temp folder is defined by the environment variables in the following order
- The TMP environment var
- The TEMP environment var
- The USERPROFILE environment var
- The Windodws dir.
The .TMP files created here are used to create the update.zip which is included in the backup package, these should be deleted once the backup is finished. Given your exception I am not quite sure what was still holding the .tmp-file. This might need some further analysis.
Brent [SLC] Edited answer 10th December 2020
Thank you Brent! We will try to investigate the handles that hold this file at the time the log line appears. Hopefully this reveals the culprit.