How to restore files from a Synology NAS snapshot after accidental deletion or ransomware
Summary
This guide helps you troubleshoot and resolve: How to restore files from a Synology NAS snapshot after accidental deletion or ransomware. Follow the steps below to fix the issue.
Common Causes
Important: Snapshots are not a backup. If your Synology NAS is compromised by ransomware, snapshots stored on the same device can also be encrypted or deleted. Snapshots protect against accidental deletion and local hardware issues, but they are not a substitute for off-site or offline backups. For reliable ransomware recovery, ensure you maintain off-site backups following the 3-2-1 backup strategy.
Accidental deletion or ransomware encryption can be stressful, but if your Synology NAS is configured with snapshots, you can often recover individual files or folders quickly without performing a full system restore. This guide walks you through restoring files from a Synology snapshot using DSM.
Quick Fix Steps
- Log in to DiskStation Manager (DSM).
- Open Snapshot Replica from the DSM main menu.
- Select the shared folder containing the missing files.
- Select the snapshot taken before the deletion or encryption occurred.
- Browse the snapshot, select your files, and click Restore.
- Verify restored files by opening them to confirm they are not encrypted.
Detailed Instructions
Prerequisites
- Snapshot Replica package must be installed on your Synology NAS.
- The shared folder must be formatted with the Btrfs file system, as Synology snapshots require Btrfs.
- Snapshots must have been enabled for the shared folder before the data loss occurred.
- You must have administrator access to DSM.
Step 1: Log in to DSM
Open your web browser and navigate to your Synology NAS IP address or QuickConnect ID. Sign in with an administrator account.
Step 2: Open Snapshot Replica
From the DSM desktop, click the main menu and open Snapshot Replica.
Step 3: Select the affected shared folder
In Snapshot Replica, select the shared folder where the deleted or encrypted files were stored from the list of protected folders.
Step 4: Select the correct snapshot
A list of available snapshots will appear, sorted by date and time. Choose a snapshot created before the files were deleted or encrypted. Click Browse to view the contents of that snapshot.
Step 5: Restore your files
- Inside the snapshot view, navigate to the file or folder you need to recover.
- Select the item(s) you want to restore.
- Click Restore.
- Choose whether to restore to the original location or a different folder.
- Confirm the restore operation.
Step 6: Verify restored files
After restoring, open the recovered files to confirm they are accessible and not encrypted. If files appear corrupted or encrypted, try selecting an earlier snapshot.
Troubleshooting
No snapshots are listed
If no snapshots appear, snapshot scheduling was not enabled for that shared folder prior to the data loss. In this case, recovery via snapshot is not possible. You may need to check external backups or contact Open a Ticket for further assistance.
The Snapshot Replica package is not installed
Go to Package Center, search for Snapshot Replica, and install it. If snapshots were previously configured but the package has been removed, note that reinstalling the package may not recover old snapshots. Contact Open a Ticket for assistance with snapshot recovery in this scenario.
Restore fails or files appear encrypted
If restored files are still encrypted, the snapshot itself may have been affected. Try selecting an earlier snapshot. If all snapshots are encrypted, you will need to rely on off-site or offline backups.
Permission errors during restore
Ensure you are logged in with an administrator account. Standard user accounts may not have permission to restore files to their original location.
Snapshot restore testing
We recommend testing your snapshot restore process periodically to ensure snapshots are working as expected and that you can recover files when needed. Regular testing minimises downtime during an actual data loss event.
For help configuring snapshot schedules or setting up off-site backups to protect against future data loss, Open a Ticket.
Still Having Issues?
💻 Open a Ticket