|
| 1 | +# HOWTO Backup Private Channels and DMs from Slack |
| 2 | + |
| 3 | +To back up private channels, and direct message chains, from Slack we currently recommend [slackdump](https://github.com/rusq/slackdump). |
| 4 | + |
| 5 | +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. |
| 6 | + |
| 7 | +## Preparing to Export |
| 8 | + |
| 9 | +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](#what-should-i-do-with-the-backup-files) afterwards, although the critical thing is to make sure that someone makes a copy before the deadline. |
| 10 | + |
| 11 | +## Installing Slackdump |
| 12 | + |
| 13 | +Slackdump is supporting various platforms. You can find the latest release [here](https://github.com/rusq/slackdump/releases/tag/v3.1.4). The installation instructions below are taken from [the official instructions of the project](https://github.com/rusq/slackdump/?tab=readme-ov-file#installation-and-quickstart) with a few additions based on our experience. |
| 14 | + |
| 15 | +### MacOS |
| 16 | + |
| 17 | +The easiest way to install on a Mac is using Brew: |
| 18 | + |
| 19 | +``` |
| 20 | +brew install slackdump |
| 21 | +``` |
| 22 | + |
| 23 | +Some Linux distros also support Brew, which can be an easy way to install there as well. |
| 24 | + |
| 25 | +### Other OSes |
| 26 | + |
| 27 | +On other Operating Systems, please follow these steps: |
| 28 | + |
| 29 | +1. Download the latest release for your operating system from the [releases] page. |
| 30 | +1. Unpack the archive to any directory. |
| 31 | +1. Run the `./slackdump` or `slackdump.exe` executable (see note below). |
| 32 | + |
| 33 | +[releases]: https://github.com/rusq/slackdump/releases/ |
| 34 | + |
| 35 | +> [!NOTE] |
| 36 | +> On Windows and macOS you may be presented with "Unknown developer" window. |
| 37 | +> The reason for this is that the executable hasn't been signed by |
| 38 | +> the developer certificate. |
| 39 | +
|
| 40 | + To work around this: |
| 41 | + |
| 42 | + - **on Windows**: click "more information", and press "Run |
| 43 | + Anyway" button. |
| 44 | + - **on macOS** 14 Sonoma and prior: open the folder in Finder, hold Option |
| 45 | + and double click the executable, choose Run. |
| 46 | + - **on macOS** 15 Sequoia and later: start the slackdump, OS will show the |
| 47 | + "Unknown developer" window, then go to System Preferences -> Security and |
| 48 | + Privacy -> General, and press "Open Anyway" button. |
| 49 | + |
| 50 | +## Basic Slackdump Navigation |
| 51 | + |
| 52 | +Most of the Slackdump CLI uses this basic navigation: |
| 53 | + |
| 54 | +* Use TAB to navigate between fields |
| 55 | +* Use up and down arrows to navigate between items on a list |
| 56 | +* Use ENTER to select an option |
| 57 | +* Use ESC to go back to a higher-level menu |
| 58 | + |
| 59 | +## Step by Step Walkthrough |
| 60 | + |
| 61 | +Use the wizard to get started: |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +Choose "Workspace", and then "New" to authenticate for the Kubernetes Slack. You will be prompted to choose a method for logging in. |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +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. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +To retrieve the Cookie, Login into [https://kubernetes.slack.com](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`. |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +Enter "kubernetes" for the workspace name, your session cookie, and select "Yes" for "Confirm creation of workspace" to create credentials. |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +Navigate the menus and select "Export" (not "Dump"). You will be asked for a login. |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | +Now you can export your private Channels and DMs. The easiest way is to use ChannelIDs. |
| 86 | + |
| 87 | +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. |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +For DMs, you follow a similar method. Click the three dots and select "Open conversation details". Afterwards you can copy a ChannelID. |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | +Now you can export the channel contents, selecting each channel via its ID. We recommend the "standard" storage type. |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +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. |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | +## View the export: |
| 108 | + |
| 109 | +Once the workspace data is dumped, you can run built-in viewer: |
| 110 | + |
| 111 | +```shell |
| 112 | +slackdump view <zip or directory> |
| 113 | +``` |
| 114 | + |
| 115 | +The built-in viewer supports all types of dumps: |
| 116 | + |
| 117 | +1. Slackdump Archive format |
| 118 | +1. Standard and Mattermost Slack Export |
| 119 | +1. Dump mode files |
| 120 | + |
| 121 | +Alternatively, you can use one of the following tools to view the |
| 122 | +export results: |
| 123 | + |
| 124 | +- [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). |
| 125 | +- [Slackdump2Html] - a great Python application that converts Slack Dump to a |
| 126 | + static browsable HTML. It works on Dump mode files. |
| 127 | +- [slack export viewer][slack-export-viewer] - Slack Export Viewer is a well known viewer for |
| 128 | + slack export files. Supports displaying files if saved in the "Standard" file mode. |
| 129 | + |
| 130 | +[SlackLogViewer]: https://github.com/thayakawa-gh/SlackLogViewer/releases |
| 131 | +[Slackdump2Html]: https://github.com/kununu/slackdump2html |
| 132 | +[slack-export-viewer]: https://github.com/hfaran/slack-export-viewer |
| 133 | + |
| 134 | +## What Should I Do with the Backup Files? |
| 135 | + |
| 136 | +**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. |
| 137 | + |
| 138 | +**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. |
| 139 | + |
| 140 | +**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. |
0 commit comments