A Windows Service can keep a local or Azure-based file share in sync with your SharePoint Document libraries, such as used in Office 365, SharePoint Online, OneDrive for Business, Office Groups, or Microsoft Teams. Only changes are transferred one-way, scheduled, depending on settings. PowerShell can be used for provisioning and automation. You can use the backup tools of your choice to keep document versions, or even use the Windows File History for this. To restore, simply drag the documents back to the library, or change the direction of sync.
What you need
You can make use of the Layer2 Cloud Connector to keep a local or cloud-based backup of your data and documents in the Microsoft Cloud.