# Tablespace is missing for table

**URL:** <https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764>\
**Category:** ℹ️ Support\
**Tags:** nc30, mariadb, php83\
**Created:** [March 1, 2025, 9:18am UTC](https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764 "2025-03-01T09:18:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![longshot](https://help.nextcloud.com/user_avatar/help.nextcloud.com/longshot/32/7572_2.png) [@longshot](https://help.nextcloud.com/u/longshot)\
**Post date:** [March 1, 2025, 9:18am UTC](https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764/1 "2025-03-01T09:18:39Z")

</div>

> **Support intro**
>
> ## Sorry to hear you’re facing problems. 🙁
> 
> _The community help forum ([help.nextcloud.com](http://help.nextcloud.com)) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are **volunteering their time to help you.** _
> 
> **If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where Nextcloud engineers can help ensure your business keeps running smoothly.**
> 
> ## Getting help
> 
> In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.
> 
> **Before clicking submit** : Please check if your query is already addressed via the following resources:
> 
> - [Official documentation](https://docs.nextcloud.com) (searchable and regularly updated)
> - [How to topics and FAQs](https://help.nextcloud.com/c/how-to-faqs/9)
> - [Forum search](https://help.nextcloud.com/search)
> 
> (Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. ❤

## The Basics

- Nextcloud Server version _(e.g., 29.x.x)_:
  - **[Nextcloud Hub 9] (30.0.6)**

- Operating system and version _(e.g., Ubuntu 24.04)_:
  - Ubuntu 24.04

- Web server and version _(e.g, Apache 2.4.25)_:
  - Apache/2.4.58

- Reverse proxy and version \_(e.g. nginx 1.27.2)
  - nginx/1.24.0

- PHP version _(e.g, 8.3)_:
  - PHP 8.3.17

- Is this the first time you’ve seen this error? (Yes / No):
  - Yes

- When did this problem seem to first start?
  - After upgrading Mariadb 10.4 to 10.11

- Installation method _(e.g. AlO, NCP, Bare Metal/Archive, etc.)_
  - LXD container

- Are you using CloudfIare, mod\_security, or similar? _(Yes / No)_
  - No

### Summary of the issue you are facing:

Warning : Tablespace is missing for table ‘nextcloud/oc\_group\_admin’  
Error : Got error 194 “Tablespace is missing for a table” from storage engine InnoDB  
error : Corrupt

Warning : Tablespace is missing for table ‘nextcloud/oc\_accounts\_data’  
Error : Got error 194 “Tablespace is missing for a table” from storage engine InnoDB  
error : Corrupt

### Steps to replicate it (hint: details matter!):

1. backup mariadb databases on 10.4
2. launch new container with mariadb 10.11
3. restore backup

### Log entries

#### Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the _Copy raw_ option from _Administration settings-\>Logging_ screen or from your `nextcloud.log` located in your data directory). Feel free to use a pastebin/gist service if necessary.

```auto
Just 1000s of tablespace missing errors for the 2 tables

```

Can I safely drop the two tables and will Nextcloud recreate them automagically?

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/6_22734026db12803ebb3e059622ac3534.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [March 1, 2025, 12:52pm UTC](https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764/2 "2025-03-01T12:52:48Z")

</div>

Please detail how you backed up and imported the data.

Was it using this approach?

> **[Backup — Nextcloud latest Administration Manual latest documentation](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html#backup-database)**

---

<div class="post-metadata">

**Author:** ![longshot](https://help.nextcloud.com/user_avatar/help.nextcloud.com/longshot/32/7572_2.png) [@longshot](https://help.nextcloud.com/u/longshot)\
**Post date:** [March 1, 2025, 1:48pm UTC](https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764/3 "2025-03-01T13:48:54Z")

</div>

I did the old fashioned backup from 10.4

```auto
mysqldump -u root -p --all-databases > alldb.sql

```

to the new server:

```auto
mysql -u root -p < alldb.sql

```

I have other databases on it that aren’t giving me any problems

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/6_22734026db12803ebb3e059622ac3534.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [March 1, 2025, 4:56pm UTC](https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764/4 "2025-03-01T16:56:38Z")

</div>

I would re-run the backup with `--single-transaction` to eliminate the most obvious possibilities (even if it’s not the source of this problem it’s recommended for good reason).

Assuming you’re on the latest patch release of MariaDB 10.4.x and 10.11.x, this is a fairly straightforward endeavor otherwise.

I would also check the mariadb error/container logs to see if there are further clues of something else going on.

> I have other databases on it that aren’t giving me any problems

It’s not really possible for Nextcloud itself to cause this problem. The error indicates an underlying issue with how the tables are stored on-disk by MariaDB. Generally corruption or permissions.

I would not expect it to be permissions since you did logical backup and restore rather than moved the underlying files around.

---

<div class="post-metadata">

**Author:** ![longshot](https://help.nextcloud.com/user_avatar/help.nextcloud.com/longshot/32/7572_2.png) [@longshot](https://help.nextcloud.com/u/longshot)\
**Post date:** [March 2, 2025, 3:48pm UTC](https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764/5 "2025-03-02T15:48:12Z")

</div>

Sadly the old server is gone so rerunning the backup is quite a bit of work.  
I will have to setup a new server, restore the backup, make another backup and restore it again 🙂

If there’s no other way then I will have to do it, but I’m hoping dropping the 2 tables and recreating them will fix it as well.

Nextcloud seems to be running fine without being able to read them.

I’m pretty sure the next update will be a problem tho’…

---

<div class="post-metadata">

**Author:** ![longshot](https://help.nextcloud.com/user_avatar/help.nextcloud.com/longshot/32/7572_2.png) [@longshot](https://help.nextcloud.com/u/longshot)\
**Post date:** [March 8, 2025, 10:52am UTC](https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764/6 "2025-03-08T10:52:50Z")

</div>

Sooo…

I created a new Nextcloud database on my mariadb server

```auto
CREATE USER 'ncloud'@'192.168.x.x' IDENTIFIED BY 'test';
CREATE DATABASE ncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON ncloud.* TO 'ncloud'@'192.168.x.x';
FLUSH PRIVILEGES;
quit;

```

Downloaded the lastest Nextcloud on my Nextcloud server

> cd /var/www/html/test/  
> wget [https://download.nextcloud.com/server/releases/latest.zip](https://download.nextcloud.com/server/releases/latest.zip)  
> unzip latest.zip

Installed a new Nextcloud

> cd /var/www/html/nextcloud  
> sudo -u www-data php occ maintenance:install --database   
> “mysql” --database-host=“192.168.x.y” --database-name “ncloud” --database-user “ncloud” --database-pass   
> ‘test’ --admin-user “admin” --admin-pass “password”

Set mariadb in repair mode

> nano /etc/mysql/my.cnf

added

> [mysqld]  
> innodb\_force\_recovery = 4

Restarted mariadb

Dropped the 2 offending tables, exported them from the new install and imported them to the old database.

I haven’t seen any errors yet so I’m hoping for the best 🙂

Thanks @jtr for thinking along with me.

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [March 16, 2025, 10:53am UTC](https://help.nextcloud.com/t/tablespace-is-missing-for-table/218764/7 "2025-03-16T10:53:17Z")

</div>

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.
