community/communication/slack-backup
Josh Berkus 69ccd8dccf Merge branch 'slackbackup' of github.com:jberkus/community into slackbackup 2025-06-17 10:35:45 -07:00
..
README.md Merge branch 'slackbackup' of github.com:jberkus/community into slackbackup 2025-06-17 10:35:45 -07:00
channelid1.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
channelid2.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
channelid3.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
channelid4.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
cookielogin.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
createcredential.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
export.png Changes per Nabarun's feedback. 2025-06-17 10:35:15 -07:00
exportdata1.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
exportdata2.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
getcookie.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
login.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00
runwizard.jpeg Add instructions for backing up private channels. 2025-06-16 16:13:08 -07:00

README.md

HOWTO Backup Private Channels and DMs from Slack

To back up private channels, and direct message chains, from Slack we currently recommend slackdump.

It is a relatively easy to use commandline tool to backup your channels and DMs and store the data locally. No fees or 3rd-party online storage is involved, making it suitable for even confidential private channels.

Preparing to Export

Decide which member of your private channel will archive it. This should be someone who is prepared to follow up before the June 20th deadline, and can easily install and use Slackdump. You should also give some thought as to what you will do with the archive files afterwards, although the critical thing is to make sure that someone makes a copy before the deadline.

Installing Slackdump

Slackdump is supporting various platforms. You can find the latest release here. The installation instructions below are taken from the official instructions of the project with a few additions based on our experience.

MacOS

The easiest way to install on a Mac is using Brew:

brew install slackdump

Some Linux distros also support Brew, which can be an easy way to install there as well.

Other OSes

On other Operating Systems, please follow these steps:

  1. Download the latest release for your operating system from the releases page.
  2. Unpack the archive to any directory.
  3. Run the ./slackdump or slackdump.exe executable (see note below).

[!NOTE] On Windows and macOS you may be presented with "Unknown developer" window. The reason for this is that the executable hasn't been signed by the developer certificate.

To work around this:

  • on Windows: click "more information", and press "Run Anyway" button.
  • on macOS 14 Sonoma and prior: open the folder in Finder, hold Option and double click the executable, choose Run.
  • on macOS 15 Sequoia and later: start the slackdump, OS will show the "Unknown developer" window, then go to System Preferences -> Security and Privacy -> General, and press "Open Anyway" button.

Basic Slackdump Navigation

Most of the Slackdump CLI uses this basic navigation:

  • Use TAB to navigate between fields
  • Use up and down arrows to navigate between items on a list
  • Use ENTER to select an option
  • Use ESC to go back to a higher-level menu

Step by Step Walkthrough

Use the wizard to get started:

screenshot of starting the wizard

Choose "Workspace", and then "New" to authenticate for the Kubernetes Slack. You will be prompted to choose a method for logging in.

screenshot of login choices menu

You can select any of the login options that work for you. For some users, the default browser login does not work. If it fails for you, we recommend the Cookie and Workspace Name Option.

screenshot of cookie login choice

To retrieve the Cookie, Login into https://kubernetes.slack.com with your credentials through your regular browser. You can retrieve the cookie using your browser's web developer tools (this works on both Firefox and Chrome). It will start with the string xoxd.

screenshot of looking at the cookie in Chrome web developer tools

Enter "kubernetes" for the workspace name, your session cookie, and select "Yes" for "Confirm creation of workspace" to create credentials.

screenshot of the create credentials from cookie interface

Navigate the menus and select "Export" (not "Dump"). You will be asked for a login.

menu of choices, with Export highlighted

Now you can export your private Channels and DMs. The easiest way is to use ChannelIDs.

To retrieve a ChannelID of a private channel, select the channel and click on the 3 dots to choose "Open channel details". The popup will display the Channel ID at the bottom.

showing "open channel details" on a channel

showing the channelid at the bottom of the dialog

For DMs, you follow a similar method. Click the three dots and select "Open conversation details". Afterwards you can copy a ChannelID.

selecting channel details from a direct message

showing where the channel id is in the dialog

Now you can export the channel contents, selecting each channel via its ID. We recommend the "standard" storage type.

screenshot of the UI showing the options for exporting a channel

Once you have selected all the options, hit ESC to go back, and choose "Run Export". Slackdump will do a lot of pulling data, and eventually create a zip file in the root of your home directory.

example of Slackdump exporting a channel

View the export:

Once the workspace data is dumped, you can run built-in viewer:

slackdump view <zip or directory>

The built-in viewer supports all types of dumps:

  1. Slackdump Archive format
  2. Standard and Mattermost Slack Export
  3. Dump mode files

Alternatively, you can use one of the following tools to view the export results:

  • SlackLogViewer - a fast and powerful Slack Export viewer written in C++, works on Export files (images won't be displayed, unless you used an export token flag).
  • Slackdump2Html - a great Python application that converts Slack Dump to a static browsable HTML. It works on Dump mode files.
  • slack export viewer - Slack Export Viewer is a well known viewer for slack export files. Supports displaying files if saved in the "Standard" file mode.

What Should I Do with the Backup Files?

Kubernetes Private Channels: Contact #sig-contribex about getting a folder for your group in the Kubernetes-owned Google Drive. Let them know who should have access to the folder.

Non-Kubernetes Private Channels: For other projects on our Slack with private channels (there's a few), it will be up to you to figure out an appropriate community-owned location for the export.

Direct Message Threads: In most cases, DMs you back up should stay in your own storage. If there is some reason why a DM thread should belong to the Kubernetes community, then contact ContribEx.