# Import From Slack: Error Uploading Data

**URL:** <https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032>\
**Category:** Command Line Interface\
**Created:** [September 11, 2022, 2:15pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032 "2022-09-11T14:15:47Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 2:56pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/42 "2022-09-20T14:56:33Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/5/520459a0d3b932f675ac621ba36c93c66e849d96.png)

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [September 20, 2022, 3:02pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/43 "2022-09-20T15:02:07Z")

</div>

Did you manually create the `import` folder or was it there already?  
If you created it, it probably also belongs to the root account which prevents files in there from being deleted.  
You can verify the installation permissions using the command:

```auto
ls -lh /opt/mattermost

```

if the `data` directory in there and all the other files belong to the `mattermost` user, it is very likely that the import directory does not and you can fix that by running the command:

```auto
chown -R mattermost: /opt/mattermost/data

```

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:04pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/44 "2022-09-20T15:04:12Z")

</div>

from what i recall the import folder was already there

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/1/1712cd83437ce45a6f3ada8e9442548f31d77e72.png)

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:07pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/45 "2022-09-20T15:07:49Z")

</div>

ok that seemed to work the import\_process has now finished with status success. I’m assuming maybe just a reboot now as nothing is showing up?

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [September 20, 2022, 3:08pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/46 "2022-09-20T15:08:22Z")

</div>

OK, great!  
You need to restart the mattermost service for the changes to be effective, try:

`systemctl restart mattermost`

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:10pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/47 "2022-09-20T15:10:04Z")

</div>

hmmm did that still nothing shows up

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:12pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/48 "2022-09-20T15:12:00Z")

</div>

did a full reboot and checked the team “slackimport” and only have the channels town square and off-topic with nothing there

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [September 20, 2022, 3:15pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/49 "2022-09-20T15:15:48Z")

</div>

It was a bit fast for the import, so I’m not sure if it actually did something, given the fact that the archive is 4.5GB in size.

Can you download the beta version of @plusmid 's new `mmctl` build which also supports archive validation from [here](https://community.mattermost.com/files/fiinwbxwppg68eftofwd5fw3hw/public?h=APwtyR_jhvepkzH8b0j-REDcX4cwkLGKyM48d0Xehh8), please? You can do that directly on your Mattermost server using the following commands:

```auto
wget 'https://community.mattermost.com/files/fiinwbxwppg68eftofwd5fw3hw/public?h=APwtyR_jhvepkzH8b0j-REDcX4cwkLGKyM48d0Xehh8' -O mmctl-beta.zip
unzip mmctl-beta.zip
./mmctl import validate /path/to/your/mattermost-bulk-import.zip

```

and post the output then.  
This tool should help us with identifying issues in your zip file (if any) and it will also post a summary of the users and channels to be imported.

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:19pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/50 "2022-09-20T15:19:05Z")

</div>

```auto
unzip mmctl-beta.zip
root@mattermost ~# ./mmctl import validate /opt/mattermost/import/mattermost-bulk-import.zip
Predefined teams: 
Validation complete
Error: error opening the import file "/opt/mattermost/import/mattermost-bulk-import.zip": open /opt/mattermost/import/mattermost-bulk-import.zip: no such file or directory 

```

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [September 20, 2022, 3:20pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/51 "2022-09-20T15:20:16Z")

</div>

I think you mised the `data` subdirectory here.  
It should read `./mmctl import validate /opt/mattermost/data/import/mattermost-bulk-import.zip` if the file is still there. It might have been removed by the importer, though, but I hope you have another copy of it somewhere as mentioned earlier.

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:21pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/52 "2022-09-20T15:21:39Z")

</div>

ugh… it is gone

the only copy i have is the one that was created via windows so i’ll need to start over here and do it all again

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:26pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/53 "2022-09-20T15:26:30Z")

</div>

OK one thing that is a bit different here is now in my /opt/mattermost/data folder i have about 200 new subfolders all named by date in each of these folders is a subfolder “teams” then another subfolder then another named channels and another and another named users

Wondering if moving these folders is the fix or if i should delete them all and start over?

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [September 20, 2022, 3:28pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/54 "2022-09-20T15:28:34Z")

</div>

Hard to tell. Can you please run the import validator first to see if your file is OK before we continue with other approaches here?

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:28pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/55 "2022-09-20T15:28:50Z")

</div>

I dont have the file anymore

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [September 20, 2022, 3:35pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/56 "2022-09-20T15:35:26Z")

</div>

OK, well, if you want to find out if the import worked, you will have to search for the names of your slack channels and check for the usernames to see if they’re there.  
You can do that when logging in to your Mattermost server by hitting the `CTRL-k` shortcut. If you cannot find what you’re looking for then most likely the import did not work out and we need to start over new. In this case I would also suggest to wipe the Mattermost installation and start over new, because there might be some conflicting data in the database and the filesystem now.

I’d suggest to do the following steps:

- Purge your existing Mattermost installation
- Purge the database
- Create a fresh installation, login there, set up your admin account and your team
- `mkdir /opt/mattermost/data/import && chown mattermost: /opt/mattermost/data/import`
- Create the `mattermost-bulk-import.zip` file using the commands you already did directly on the Mattermost server
- Run the `mmctl` import validator on the `mattermost-bulk-import.zip` file and post the output here

If the output of the importer looks sane, then:

- Create a snapshot of your Mattermost server virtual machine
- `UID=$(date +%s); cp mattermost-bulk-import.zip /opt/mattermost/data/import/${UID}_mattermost-bulk-import.zip && chown mattermost: /opt/mattermost/data/import/*.zip`
- `mmctl import list available`
- `mmctl import process ${UID}_mattermost-bulk-import.zip`

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:36pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/57 "2022-09-20T15:36:21Z")

</div>

im recreating that file now and will go from there

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:40pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/58 "2022-09-20T15:40:43Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/5/54e5c06bbc83e5753d502a35501881fa0ecdd296.png)

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [September 20, 2022, 3:42pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/59 "2022-09-20T15:42:52Z")

</div>

This is the wrong mmctl version, this is not the one out of the `mmctl-beta.zip` file.  
Could it be that you alread had a `mmctl` binary in this directory and did not overwrite it when extracting from the zip?

To be safe, let’s create a new directory for it:

```auto
mkdir /root/mmctl-beta
cd /root/mmctl-beta
wget 'https://community.mattermost.com/files/fiinwbxwppg68eftofwd5fw3hw/public?h=APwtyR_jhvepkzH8b0j-REDcX4cwkLGKyM48d0Xehh8' -O mmctl-beta.zip
unzip mmctl-beta.zip
./mmctl import validate /opt/mattermost/data/import/mattermost-bulk-import.zip

```

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:49pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/60 "2022-09-20T15:49:23Z")

</div>

ok - it is full of validation errors  
import validation error in “mattermost-bulk-import.zip”-\>“mattermost\_import.jsonl”:3180 field “post.team”: reference to unknown team “slackimport”

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [September 20, 2022, 3:50pm UTC](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032/61 "2022-09-20T15:50:04Z")

</div>

to be clear my old team in slack was not called “slackimport” but the new team i have setup in mattermost is called “slackimport”

[Previous page](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032.md?page=2)

[Next page](https://forum.mattermost.com/t/import-from-slack-error-uploading-data/14032.md?page=4)
