Drive
Data stored on OneDrive
Microsoft has implemented several tols to protect data stored on OneDrive.
For instance, if a user’s data are infected by a virus or encrypted by a malware, Onedrive can restore the user’s space as it was (max 30 days).
Moreover, if a user accidentally delete a file, it can be restored from the trash/recycle bin: https://support.office.com/en-us/article/restore-deleted-files-or-folders-in-onedrive-949ada80-0026-4db3-a953-c99083e6a84f
User can also restore a previous version of a document: https://support.office.com/en-us/article/restore-a-previous-version-of-a-file-in-onedrive-159cad6d-d76e-4981-88ef-de6e96c93893
Data stored on SharePoint Online (SPO):
There is no proper backup in SPO, though Microsoft has developed several tools to protect data stored in SPO.
Moreover, if a user accidentally delete a file, it can be restored from the trash/recycle bin: https://support.office.com/en-us/article/restore-deleted-items-from-the-site-collection-recycle-bin-5fa924ee-16d7-487b-9a0a-021b9062d14b
User can also restore a previous version of a document: https://support.office.com/en-ie/article/restore-a-previous-version-of-an-item-or-file-in-sharepoint-f66dbda0-81f4-4d1e-b08c-793265c58934