Table of Contents
1. General information
2. The HTML directory
2.1 The HTML directory structure
2.1.2 Public and private channels
2.1.3 Direct messages
2.1.4 Group direct messages
2.2 How to read the exported messages and threads
2.3 How to access the downloaded files
3. The ReadyToImport directory
4. The Raw directory
5. Downloadable example
In this article, I’m going to show you the structure of a backup produced by Backupery for Slack application. The information in this article applies to Backupery for Slack Personal and Backupery for Slack Workspace. I will explain how to read the exported messages and threads, how to access the downloaded files, and how to read the backups in general.
I will base all my examples on my test Slack workspace called test019-workspace. You can download the example export of the workspace here.
Each backup in your backup destination goes into a separate directory:
As you see, each directory is named by the following template: Year_Month_Date-Time-of-backup. For example, if a backup was started on November 10, 2020, at 17:00:01 the name of the backup directory is 2020_November_10-17_00_01.
Usually, Backupery for Slack produces several subdirectories in each backup directory (the exact number of directories may vary and depends on your settings):
- The HTML directory contains the data exported to HTML.
- The ReadyToImport directory contains the exported data that is possible to import to Slack if necessary.
- The Raw directory is a service directory that is used by the application and this directory is not intended for viewing.
A detailed description of each directory is below.
The HTML directory contains the exported data converted to HTML: https://en.wikipedia.org/wiki/HTML
Below is the example of the directory:
This directory usually contains several files:
- users.html contains information about the exported users. Usually, this file has information about all users in a workspace.
- channels.html contains information about the exported public channels.
- groups.html contains information about the exported private channels.
- dms.html contains information about the exported direct messages.
- mpims.html contains information about the exported group direct messages.
- Index.html is an index file that allows you to browse the backup directory. Think of it as a starting point to browse your backup in a web-browser. Just double-click the file and you will see the backup directory in your web browser:
Each subdirectory inside the HTML directory represents a channel (public or private), a direct message conversation, or a group direct message conversation and contains the messages and the downloaded files.
Usually, the name of a public or a private channel matches the name of a directory. For example, the channel named general is downloaded into the general directory:
Direct messages are downloaded into the directories which start with “D”:
The names of these directories actually are IDs of the direct messages. If you need to find the ID of a specific DM with a user you should open dms.html and find the user name or handle in the user column. Then find the corresponding ID in the id column. For example, let’s find the DM conversation with a user whose name is User2:
Group direct messages are downloaded into the directories which start with “mpdm-”:
The names of these directories consist of the “mpdm-” prefix and handles of users who take part in the group joined with the “–” symbols. To find more information about the exported group direct messages you can refer to mpims.html.
First, you should choose the directory you want to read the messages from. In our example, let’s read the messages from the private channel named private3_1:
So let’s open the private3_1 directory and look inside it:
Each HTML file (2018-08-30.html, 2018-09-10.hml, and 2020-07-30.html) contains the messages for a given day. So to read the messages that were sent on August 30th, 2018 just open 2018-08-30.html:
Message replies are represented as generic messages. For example, the following reply
is placed into 2020-02-24.html as a generic message:
Please note, if a reply was sent on a day that differs from the day when the “parent” message was sent, then the reply is placed into the file which contains the messages sent on the day of the reply. For example, consider two replies to the “test001” message that was sent on February 24th, 2020:
- The “hello” reply was sent on the same day, February 24th, 2020.
- The “hello 2” reply was sent later, December 2nd, 2020.
The following screenshot illustrates the scenario:
So the “hello” is placed into 2020-02-24.html where the parent message “test001” lives, but the “hello 2” reply is placed into 2020-12-02.html.
Downloaded files are placed into the related conversation directories. For example, all the files downloaded from the general channel are placed into the general directory. Each file name starts with a timestamp that represents the date when the file was shared in a conversation. For example, consider the following file upload in the general channel:
The downloaded file will be placed in the general directory and will be named 2018-09-10_testfile.zip.
The ReadyToImport directory keeps a zip file that contains the exported data that is possible to import to Slack if necessary using Slack import tools: https://slack.com/intl/en-by/help/articles/204897248-Guide-to-Slack-import-and-export-tools. The zip file format is similar to the Slack-standard export file, so you can read the file using the following article: https://slack.com/intl/en-by/help/articles/220556107-How-to-read-Slack-data-exports.
In general, this file contains all the data exported from Slack including information about users, channels, direct messages, and group direct messages, private & public channels history, direct messages history, and so on. It does not contain the files, however, so the zip file size is relatively small.
The application internally uses a database to store the data downloaded from Slack. In order to function properly, the database needs a directory that will be used to keep the database internal files. The Raw directory is the directory that is used by the database for that purpose. So some files in the directory are infrastructure files that are used by the database, and some files are used to keep the data extracted from Slack, but the general idea is that the files in the Raw directory are used by the database only and they have their own format which the database only understands. After the data has been downloaded from Slack, everything that is inside the database is used to generate the HTML and the ReadyToImport directories. So the Raw directory is a service directory that is internally used by the application and there is no easy way to read these files. It is not intended to view or read the files in the directory.
You can download the export from an example workspace that was used in this article here.
If you have any questions, ideas, or suggestions, please contact us.