Mass file deletion or ransomware encryption in cloud storage is no longer a rare scenario. In 2026, both Microsoft OneDrive and Google Drive include built-in recovery tools that allow you to restore files, revert entire accounts to an earlier state, and neutralise the impact of malicious encryption without paying attackers. The key is understanding how version history, recycle bins, and account-level restore points actually work. This guide explains, step by step, how to recover your data safely and what limitations you must consider before initiating a rollback.
When files are deleted in OneDrive or Google Drive, they are not immediately erased from the system. Both services move them to a recycle bin (OneDrive Recycle Bin, Google Drive Trash), where they remain for a limited retention period. In 2026, the standard retention window is up to 30 days for personal accounts, while business accounts can extend this depending on administrative policies.
Ransomware attacks usually encrypt local files first. Because cloud clients synchronise automatically, encrypted copies are uploaded and overwrite the original versions in the cloud. However, the previous versions are not destroyed instantly. Both platforms maintain file version history, which allows restoration of earlier, unencrypted copies.
The most critical factor is timing. If storage limits are exceeded or retention policies expire, older versions may be permanently removed. That is why immediate action after detecting unusual file changes significantly increases recovery success.
Version history works at file level. Each time a document is modified and synced, the service stores an earlier copy. In OneDrive for Microsoft 365 subscribers, version history is enabled by default and may store hundreds of versions depending on admin configuration. Google Drive similarly keeps version history for Docs, Sheets, Slides and most uploaded file types.
Restore points operate at account level. OneDrive includes a feature called “Restore your OneDrive,” which allows users to roll back the entire drive to a previous date within the last 30 days. Google Workspace administrators can restore Drive data for a specific user within a defined recovery window using the Admin Console.
In ransomware situations, account-level restoration is often faster than manual file recovery, particularly if hundreds or thousands of files were affected within a short timeframe.
If files were deleted, first open OneDrive in a web browser and access the Recycle Bin. Review the list carefully and select the items you want to restore. Files returned from the Recycle Bin are placed back into their original folders with intact metadata.
For ransomware encryption, locate a compromised file, right-click it and choose “Version history.” Review the timestamps and restore a version from before the attack occurred. This process can be repeated for multiple files, though it may be time-consuming if the damage is widespread.
For large-scale incidents, use the “Restore your OneDrive” feature available in account settings. Select a date prior to the attack. The system will show a timeline of activities, including mass deletions or abnormal modifications. Confirming the restore will revert the entire drive to that state.
In business environments, Microsoft 365 administrators have additional recovery controls through the SharePoint Admin Center. Since OneDrive for Business is built on SharePoint infrastructure, administrators can restore entire site collections if needed.
Retention policies and litigation holds, when configured in advance, provide an additional safeguard. Even if a user permanently deletes files, retained content may still be recoverable through compliance tools.
In 2026, Microsoft Defender for Office 365 also integrates ransomware detection signals. If suspicious mass encryption is identified, alerts are generated, allowing administrators to respond before retention windows expire.

In Google Drive, start with the Trash section. Deleted files remain there for up to 30 days in standard accounts. Workspace administrators may have extended recovery capabilities depending on organisational settings.
For encrypted files, open the affected item, select “File” and then “Version history.” Google Docs-format files provide detailed version timelines with named edits. For uploaded files such as PDFs or Office documents, previous versions can also be restored if versioning was enabled.
If many files were impacted, Google Workspace administrators can restore Drive data for a user through the Admin Console. This action recovers data from a selected date within the allowed recovery window and is often the most efficient solution for company-wide incidents.
Recovery is not unlimited. Standard consumer Google accounts generally allow recovery within 25–30 days. After that period, deleted files may become unrecoverable. Workspace environments may extend this with Vault retention rules, but only if configured before the incident.
Version history does not protect against all threats. If ransomware remains active and continues syncing encrypted files after restoration, clean-up must be performed on local devices first. Disconnect the affected computer from the internet and remove malicious software before restoring cloud data.
As a preventive measure, enable multi-factor authentication, review third-party app access regularly, and consider maintaining an additional offline backup. Cloud versioning is powerful, but layered security provides the strongest resilience against data loss in 2026.