Where are files in Microsoft Teams stored, and how do you back them up?

With the rapid update of Microsoft Teams in the new work from home environment, collaboration has never been easier. Understandably, many system administrators wonder where Teams stores their files, as these should be backed up as part of a good cyber resilience plan. This article sheds light on this issue!

Contents

  1. TL;DR summary
  2. Teams and Channels – where files are stored
  3. Chat sessions – where files are stored
  4. How to back up files from Microsoft Teams

TL;DR summary

  1. It depends whether the files are shared in a chat session, or in a Teams Channel
  2. Files in Teams and their Channels are stored in a dedicated SharePoint site and directory.
    • Each Team has its own SharePoint site, and the default Document Library is used.
    • A top level folder is created for each Channel
    • Each attachment to posts / messages are stored in the root folder of the Channel’s directory
    • Subfolders and files map 1:1 between Teams and SharePoint
  3. Files in Chat sessions are stored in OneDrive for Business.
    • Each user of Teams has a subfolder called Microsoft Teams Chat Files, where all Chat files are stored
    • Files sent in Chat are stored in the sender’s OneDrive for Business
    • All files are placed in the same folder – it is not sorted by recipient.
  4. To back up these files, simply back up the underlying SharePoint site and your users’ OneDrive for Business accounts.

Let’s look into different parts of teams to gain a deeper understanding of how things work “under the hood”.

Teams and Channels – where files are stored

When you create a new Team in Teams, a dedicated SharePoint site is also created behind the scenes. For example, we created a Team called “Project Recovery Team” from within the Teams interface:

This automatically created a SharePoint site with the same name. By default, your users won’t normally access the SharePoint site, but you can find it in the SharePoint Admin console, under the Active sites list.

You can click through to the SharePoint site by clicking on the URL listed, and then again on the popup window. Then you’ll see the underlying SharePoint site. There’s nothing special about the site, but under the default Document Library (which is simply called “Documents”), you’ll see a directory for each channel.

When users drop files into the Posts section of the channel, these files are automatically uploaded to the underlying SharePoint site, and placed into the Channel’s folder.

Here’s the view in Microsoft Teams:

You can view these files in the Files tab in Teams.

By default, all attachments uploaded to the Posts view in Teams will be uploaded to the root directory for the appropriate channel.

Over time, this will lead to hundreds and thousands of files in the root directory, making it more difficult to locate files and manage them.

So under the Files tab, it’s possible to manually create folders – much like you would when organizing data on a regular file system. The screenshot below shows what would happen after creating a subfolder called “Manually created folder”.

If you examine the underlying SharePoint document library, you’ll see that there’s a 1:1 match between the view in Teams and the files and folders in SharePoint.

It is possible to manually add files through the SharePoint interface, and the file will also show up in Teams.

However, given that Teams is the primary interface for users, we do not recommend modifying the underlying file store in everyday practice.

Chat sessions – where files are stored

Files in chat sessions are stored in the sender’s OneDrive for Business account. OneDrive for Business is itself backed by SharePoint as an underlying file store, but presented to the user as “OneDrive for Business”.

A special directory called “Microsoft Teams Chat Files” is automatically created by Teams, as shown here:

Now, let’s say you’re in a chat session, and you drop a picture into the conversation. That picture is automatically uploaded as a file, and displayed in the chat session, as shown below.

If you switch view to the Files tab, you’ll see that file listed. Here, we named the file “Sent from Hermit to Wilson” so you can see the sender (Hermit) and the recipient (Wilson) easily.

If you browse to Hermit’s OneDrive for Business account, then you’ll see all files are saved into the special “Microsoft Teams Chat Files” folder.

Because this folder is managed by Microsoft Teams, we do not recommend using that folder outside of Teams. The exception, of course, is when you’re backing up these files.

So how does the recipient get access to these shared files? It’s done through the standard OneDrive for Business sharing, except because it was shared through Teams, granting the appropriate access is done automatically.

In our experience, there are limitations in the Teams interface. It’s not possible to create any subfolders in the Files window, so therefore, if you send many attachments to many recipients, you can expect this folder to continually grow – sometimes rapidly. 

How to back up files from Microsoft Teams

It’s easy to get reliable backups of files shared in Microsoft Teams by using BackupAssist 365 to back up the underlying file stores.

To get started, download the free 30 day trial of BackupAssist 365.

It’s free forever to back up SharePoint sites – so that includes files in Teams Channels. 

And to back up files in user chats, there’s a modest per-user subscription license available.

Backing up files in Teams Channels

Step Example screenshot
Create a new backup task, and select “SharePoint” as your type of backup.
Go through the steps to set things up. You can choose which SharePoint site to back up – choose the site that corresponds to the Team that you want to back up.
You can now select what to back up. We recommend selecting the root folder, so that everything will be backed up and no files will be missed.
Save and run the backup task. You’ll see progress in the Active Backups screen. After it completes, you can also view the backup report.
In the backup directory, you’ll see your files.

If you selected Encryption, then the file names and contents will be securely encrypted and obscured from user view.

If you selected Versioning, then you’ll notice additional Unicode characters appended to the file name, which include metadata containing version information.

Backing up files in user chat sessions

Step Example screenshot
Create a new backup task and select “OneDrive for Business” as your type of backup.
Go through the steps to set things up. You can choose which users to back up – in the example here, we are backing up a single user as an example. We do recommend backing up all users, so no files will get missed.
You can choose what files to back up. If you are only interested in backing up files in Microsoft Teams Chat, then enter in ‘/Microsoft Teams Chat files’ as a backup selection, and remove the default entry of ‘/’. If you want to back up every user’s entire OneDrive for Business, then leave the default settings.
Save and run the backup task. You’ll see progress in the Active Backups screen. After it completes, you can also view the backup report.
In the backup directory, you’ll see your files.

If you selected Encryption, then the file names and contents will be securely encrypted and obscured from user view.

If you selected Versioning, then you’ll notice additional Unicode characters appended to the file name, which include metadata containing version information.

Best practice recommendations

  1. Create a special backup user to log into Office 365 to do the backups – this is documented in our BackupAssist 365 Guides page.
  2. If security is important, turn on Encryption.
  3. To capture backup history, turn on Versioning. This will enable you to back up past versions of files.
  4. Of course, we recommend doing test restores to make sure you can restore your data on a periodic basis.

Share on email
Share on print
Share on facebook
Share on google
Share on twitter
Share on linkedin

Download

BackupAssist 365

Start your free 30-day trial today