Recover data after a ransomware attack with ONTAP ARP
Autonomous Ransomware Protection (ARP) creates snapshots to protect against ransomware threats on NAS volumes. You can use ARP snapshots or another snapshot of your volume to restore data.
|
|
If you are running ONTAP 9.16.1 or later, see Recover data after a ransomware attack with ARP/AI. |
Depending on the potential attack situation, you'll restore data in one of these ways:
-
Restore from the most recent ARP snapshot: Use the most recent ARP snapshot available when you have confidence in its integrity.
-
Restore from an earlier snapshot: Release the lock on the most recent ARP snapshot and then restore from an earlier snapshot.
-
Restore when no attack is reported: First restore from the most recent ARP snapshot, then complete a subsequent restoration from the snapshot you choose.
ARP creates snapshots with the prepended name Anti_ransomware_backup. For example, Anti_ransomware_backup.2022-12-20_1248.
-
If you are responding to an abnormal activity warning, you must categorize it as a potential ransomware attack before proceeding with data restoration.
-
Choose a restore method and review recovery constraints before you complete a restore procedure.
Choose a recovery method
Depending on the extent of data corruption and your operational requirements, choose one or a combination of these recovery methods.
-
Volume snapshot restore: Rolls back the entire volume to a selected snapshot (ARP or scheduled). This is the fastest method but removes all snapshots created after the restore point.
For ONTAP 9.15.1 and earlier: ARP snapshots are deleted immediately when you run clear-suspect. You must complete volume snapshot restore before clearing. See Understand snapshot behavior when clearing a suspected event. -
FlexClone from a clean snapshot: Creates a clone volume from the selected snapshot, preserving the original volume and all its snapshots for forensic analysis or additional recovery. It is recommended to split the clone from the parent volume to isolate the infected parent from the clean clone.
Learn more about creating a FlexClone volume from a snapshot and splitting a FlexClone from its parent.
-
Single-file SnapRestore: Restores individual files from snapshots. Each file can be sourced from a different snapshot. This is practical when the number of affected files is relatively small.
Learn more about restoring a single file from a snapshot.
-
Data copy from the
.snapshotdirectory: Copies data from the snapshot mount point to a new volume using standard file copy operations. This method preserves the original volume and snapshots for analysis. -
Hybrid approach: The volume is first rolled back to the closest clean snapshot using SnapRestore, then any remaining corrupted files are restored individually from another snapshot or external backup.
Recovery constraints and considerations
-
In ONTAP 9.15.1 and earlier, ARP snapshots are deleted immediately when you run
clear-suspect. This applies regardless of whether you mark the activity as a false positive or a real attack. If you plan to usevolume snapshot restore, you must complete the restore before clearing suspected events. -
Releasing the ARP snapshot lock is only required when you use
volume snapshot restoreto restore from an earlier snapshot. It is not required for FlexClone, single-file SnapRestore, data copy operations, or similar methods. -
If you restore an ARP-protected volume from a snapshot while it participates in a SnapMirror asynchronous relationship, manually update all mirror copies after the restore. Otherwise, mirror copies can become unusable and might need to be deleted and recreated.
-
ARP (9.10.1 to 9.15.1) does not support SnapMirror synchronous or SnapMirror active sync. These are ARP/AI-only features (ONTAP 9.19.1 and later).
Restore after a system attack
For volume snapshot restores, choose one of these flows depending on the snapshot source and situation:
Restore from the most recent ARP snapshot
Choose this flow when you can confidently restore from the most recent ARP snapshot, which is the most up-to-date snapshot available for recovery.
-
Select Storage > Volumes, then select the volume and Snapshot Copies.
-
Select
next to the most recent ARP snapshot (Anti_ransomware_backup) you want to restore, then select Restore. -
After the restore completes, return to the respond flow to clear suspected files.
-
List the snapshots in a volume:
volume snapshot show -vserver <svm> -volume <volume> -
Restore the contents of a volume from a snapshot:
volume snapshot restore -vserver <svm> -volume <volume> -snapshot <snapshot> -
After the restore completes, return to the respond flow to clear suspected files.
Restore from an earlier snapshot
Choose this flow when you want to restore from an earlier snapshot. Release the lock on the most recent ARP snapshot before restoring from the earlier snapshot.
|
|
In ONTAP 9.15.1 and earlier, clearing the suspected event deletes ARP snapshots immediately. In this flow, you are intentionally restoring from an earlier snapshot (not the ARP snapshot), so clearing first is required to release the lock. If you need data from the ARP snapshot, use the Restore from the most recent ARP snapshot flow instead. |
-
Release the lock on the most recent ARP snapshot:
-
Select Storage > Volumes.
-
Select Security then View Suspected File Types.
-
Mark the files as "Potential ransomware attack".
-
Select Update and Clear Suspected File Types.
-
-
Select Storage > Volumes, then select the volume and Snapshot Copies.
-
Select
next to the earlier snapshot you want to restore, then select Restore.
-
Mark the attack as potential ransomware (
-false-positive false) and clear suspect files to release the lock:This immediately deletes ARP snapshots in ONTAP 9.15.1 and earlier. Only run this command when you intend to restore from an earlier (non-ARP) snapshot and do not need the ARP snapshot. security anti-ransomware volume attack clear-suspect -vserver <svm_name> -volume <vol_name> [<extension identifiers>] -false-positive false -
List the snapshots in a volume:
volume snapshot show -vserver <svm> -volume <volume>The following example shows the snapshot in
vol1:clus1::> volume snapshot show -vserver vs1 -volume vol1 Vserver Volume Snapshot State Size Total% Used% ------- ------ ---------- ----------- ------ ----- ------ ----- vs1 vol1 hourly.2013-01-25_0005 valid 224KB 0% 0% daily.2013-01-25_0010 valid 92KB 0% 0% hourly.2013-01-25_0105 valid 228KB 0% 0% hourly.2013-01-25_0205 valid 236KB 0% 0% hourly.2013-01-25_0305 valid 244KB 0% 0% hourly.2013-01-25_0405 valid 244KB 0% 0% hourly.2013-01-25_0505 valid 244KB 0% 0% 7 entries were displayed. -
Restore the contents of a volume from a snapshot:
volume snapshot restore -vserver <svm> -volume <volume> -snapshot <snapshot>The following example restores the contents of
vol1:cluster1::> volume snapshot restore -vserver vs0 -volume vol1 -snapshot daily.2013-01-25_0010
Restore when no attack is identified
When no attack is identified, first restore from the most recent ARP snapshot and then restore from an earlier snapshot.
-
Select Storage > Volumes, then select the volume and Snapshot Copies.
-
Select
then choose the most recent Anti_ransomware_backupsnapshot. -
Select Restore.
-
Return to the Snapshot Copies menu, then choose the earlier snapshot you want to use.
-
Select Restore.
-
Restore from the most recent ARP snapshot first:
-
List the snapshots in a volume:
volume snapshot show -vserver <svm> -volume <volume> -
Restore the contents of a volume from a snapshot:
volume snapshot restore -vserver <svm> -volume <volume> -snapshot <snapshot>
-
-
Select the earlier snapshot you want to use and repeat the restore.
Learn more about volume snapshot in the ONTAP command reference.