Azure Backup: Changing the Scratch Location

The Azure Backup Agent uses a scratch or cache location to prepare backup data before exporting it to Azure. The recommendation is for this location to be at least 5% of the data backed up to the cloud in size, preferably more. When installing Microsoft Azure Backup calculating the required space is quite simple, however, as backups begin to increase making sure the scratch space is maintained can bring with it problems. i.e. drive space can run out.

In this scenario the scratch location needs relocating. The method documented around moving the scratch location calls for uninstalled and reinstalled the Azure Backup Agent. This can be a pain and requires the passphrase created during the original install, which has of course been saved somewhere safe.

After spending much time researching I came across a couple of articles online outlining a possible alternative. I have since tested the process in my development environment and it does appear to work successfully.

By default, Microsoft Azure Backup creates its scratch folder on the local drive at the following path:

%ProgramFiles%\Microsoft Azure Recovery Services Agent\Scratch\

Changing the default location

1. Open an elevated Command Prompt, then stop the Microsoft Azure Recovery Services Agent service.

net stop obengine

MABAS001
2. Once the service has stopped, copy the scratch folder and data stored within it to its new desired location.

MABAS002
3. Update the following registry entries with the new scratch folder path.

  • [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Azure Backup\Config\ScratchLocation]

MABAS003
NOTE: Only update this registry key if it already exists otherwise ignore.

  • [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Azure Backup\Config\CloudBackupProvider\ScratchLocation]

MABAS004
4. Jump back to the elevated Command Prompt, then restart the Microsoft Azure Recovery Services Agent service.

net start obengine

MABAS005
Hopefully this post will be of help to people.

As always, if anyone finds anything within the post to be wrong, please don’t hesitate to let me know so I can adjust accordingly. 🙂

3 thoughts on “Azure Backup: Changing the Scratch Location

  1. Thanks! Worked like a charm. It seems that at times the scratch folder grows way bigger than just 5%, had to attach another disk

  2. Hi
    I need to move the scratch-folder since there is no more space on the c-disk and wonder if a USB-disk would be ok to use? Is it too slow perhaps?

    • Hi, I have used a USB drive in the past without any issues but the volume of data the server was dealing with was quite light.

Leave a Reply

Your email address will not be published. Required fields are marked *