Backing up ReFS volumes with Datto Windows Agent

Topic

This article contains technical information on backing up ReFS volumes with the Datto Windows Agent (DWA).

Environment

  • Datto Windows Agent

Description

ReFS is Microsoft’s next generation filesystem, which includes additional features beyond NTFS, particularly regarding resiliency and scalability. ReFS is most commonly used for large data volumes.

Datto offers limited support for backing up ReFS volumes with Datto Windows Agent. Only ReFS versions 2.x are tested and fully supported. These are the default versions in Windows Server 2016 TP4 and greater.

Technical Constraints

  • Tested only with ReFS versions 2.0 or newer.
  • Observed limitations backing up ReFS 2.x with Integrity Streams disabled.

Integrity Streams

ReFS Integrity Streams are known to interfere with snapshotting capabilities on DWA 2.x, resulting in backup errors. Therefore, if you are experiencing backup errors on ReFS volumes, we recommend checking if File Integrity Streams are enabled, and then disabling them.

To verify whether Integrity Streams are enabled on the E:\ volume, run this command:

Get-FileIntegrity -FileName 'E:\'

To disable this feature on the volume, run the following command:

Set-FileIntegrity -FileName 'E:\' -Enable $False

More information on integrity streams can be obtained from Microsoft (external link).

Restore Limitations

Traditional File Restores are not supported, as ReFS can not be mounted as files via Linux. There are only two options to restore single files.

iSCSI restore is the recommended method for restoring ReFS files. An iSCSI restore allows you to mount the restored volume to your desired target as a True 1-to-1 copy of the volume, and restore all aspects of a file including metadata.

Bare Metal Restore or Rapid Rollback for ReFS volumes is currently unsupported. Any ReFS volumes in the selected snapshot will be excluded from the restore. To perform a restore of an ReFS volume, use the Volume Restore feature.

Verification Limitations

ReFS volumes are not scanned with File System Integrity checking after backups, and because they are never the OS volume, a typical screenshot verification is insufficient to ascertain the integrity of ReFS volumes.

The Script Verification feature can be utilized to implement a PowerShell script that will execute and inspect your volumes during Screenshot Verifications. Datto recommends creating a script that is tailored to the specific use cases of the volume in question, however below is a generic powershell script that can be used to detect whether ANY ReFS volumes are available. This example script also outputs some useful information about DWA from the verification.

$refs = Get-WmiObject Win32_Volume | Where-Object {$_.Filesystem -eq 'ReFS'}
If (-not $refs)
{
Write-Host "No ReFS Volumes found"
exit 1
}
Write-Host "Found ReFS Volumes"

$unhealthy = Get-Volume | Where-Object {$_.Filesystem -eq 'ReFS'}|
Where-Object {$_.OperationalStatus -ne 'OK'} | Where-Object
{$_.HealthStatus -ne 'Healthy'}

If ($unhealthy)
{
Write-Host "Unhealthy ReFS volumes detected"
Write-Host "Names: $($unhealthy.Name)"
exit 1
}
If (Test-Path -path "C:\Program
Files\Datto\Drivers\util\DattoSnapshot.exe") {
$dwa_driver = powershell -command "& {&'C:\Program
Files\Datto\Drivers\util\DattoSnapshot.exe' -gver}" | Out-String

Write-Host "DWA Driver info:"
Write-Host $dwa_driver

} Else {
Write-Host "DWA install not found"
}

Write-Host "Successfully found only healthy ReFS Volumes"
Write-Host "Names: $($refs.Name)"

exit 0

This example script will fail if no ReFS volumes are detected, or if an ReFS volume is detected but not considered “healthy” by Windows. Depending on the system’s use case,you may want to check that particular files or applications are available.

Notes

There are significant differences in the underlying data structures between ReFS 1.2 (Server 2012R2) and later ReFS 2.0+. It is not possible to upgrade in-place from ReFS 1.x to ReFS 2.x, you must copy the data to a new volume with the newer version filesystem. Datto Windows Agent is only tested with ReFS 2.x and greater. It is recommended to upgrade from ReFS 1.x to ReFS 2.x when possible, due to greater reliability, and a larger suite of data recovery tools available from Microsoft.

For example, in the event of a corrupted filesystem, ReFS 2.x on Windows 2019 provides useful recovery tools such as refsutil salvage. Earlier versions of ReFS do not have comparable tools which can impede recovery.

Additional Resources