There are some procedures suggested by Microsoft support team to backup & restore the data of SharePoint Online.
Method 1. Recycle bin and version history.
Method 2. Manually backup sites, lists, and libraries.
Method 3. Create an Office 365 support request.
To know more about the manual method, you can visit the following link:
https://support.microsoft.com/en-us/kb/2783484
When you will go to the above link, you will find that these manual methods are a bit long, time-consuming and there are some limitations also (as given in the article itself).
So, it is suggested that you should opt a third-party tool to get the data of SharePoint Online’s Document Library in an easy way. Go through the following link to know more about the software:
SharePoint Office 365 Document Downloader