NCP Backup SQL Dump

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (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 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:

(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).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.9
  • Operating system and version (e.g., Ubuntu 24.04):
    • armbian
  • Web server and version (e.g, Apache 2.4.25):
    • apache
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • after 31.0.8 upgrade
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • ncp
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

Backup of my NCP Instance not possible because mysqldump: Couldn’t execute ‘show create table `oc_cfg_shares`’: Incorrect information in file: ‘./nextcloud/oc_cfg_shares.frm’ (1033)

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

  1. open NCP Web

  2. Select NC-BACKUP

  3. Start backup without Data

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.

PASTE HERE

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

[ nc-backup ] (Thu Oct 2 15:22:49 UTC 2025)
Installing template 'ncp-metrics.cfg.sh'...
check free space...
Maintenance mode enabled
backup database...
mysqldump: Couldn't execute 'show create table `oc_cfg_shares`': Incorrect information in file: './nextcloud/oc_cfg_shares.frm' (1033)
Abort...
Maintenance mode disabled
Maintenance mode already disabled

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):


Nextcloud configuration
passwordsalt	**************
secret	*************
trusted_domains	
0	192.16*******
14	nextcloudpi
3	www.e******
20	*******
22	nextcloudpi.xm*****************
11	[2a0*****************************
1	192.16******
datadirectory	/media/ssd/ncdata/data
dbtype	mysql
version	31.0.9.1
overwrite.cli.url	https://www.e******
dbname	nextcloud
dbhost	localhost
dbport	
dbtableprefix	oc_
mysql.utf8mb4	1
dbuser	ncadmin
dbpassword	*******
installed	1
instanceid	******
memcache.local	\OC\Memcache\Redis
memcache.locking	\OC\Memcache\Redis
redis	
host	/var/run/redis/redis.sock
port	0
timeout	0
password	M********
tempdirectory	/media/ssd/ncdata/data/tmp
mail_smtpmode	sendmail
mail_smtpauthtype	LOGIN
mail_from_address	admin
mail_domain	****
preview_max_x	2048
preview_max_y	2048
jpeg_quality	60
overwriteprotocol	https
maintenance	
maintenance_window_start	1
logfile	/media/ssd/ncdata/data/nextcloud.log
trusted_proxies	
11	127.0.0.1
12	::1
15	85.19******
loglevel	2
log_type	file
htaccess.RewriteBase	/
mail_sendmailmode	smtp
mail_smtpsecure	ssl
mail_smtpauth	1
mail_smtphost	****
mail_smtpport	5**
mail_smtpname	****
mail_smtppassword	*****
simpleSignUpLink.shown	
default_phone_region	DE
theme	
enable_previews	1
enabledPreviewProviders	
0	OC\Preview\PNG
1	OC\Preview\JPEG
2	OC\Preview\GIF
3	OC\Preview\BMP
4	OC\Preview\XBitmap
5	OC\Preview\MP3
6	OC\Preview\TXT
7	OC\Preview\MarkDown
8	OC\Preview\OpenDocument
9	OC\Preview\Krita
10	OC\Preview\HEIC
data-fingerprint	**************

There seems to be an issue with a specific table

1 Like

It is NextcloudPi Default: MariaDB

Thank you so much for your support and writing everything so detailed.
I followed your instruction but got stuck at repairing:

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 64564
Server version: 10.11.14-MariaDB-0+deb12u2 Debian 12

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [nextcloud]> REPAIR TABLE oc_systemtag_object_mapping;
±--------------------------------------±-------±---------±--------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
±--------------------------------------±-------±---------±--------------------------------------------------------+
| nextcloud.oc_systemtag_object_mapping | repair | note | The storage engine for the table doesn’t support repair |
±--------------------------------------±-------±---------±--------------------------------------------------------+
1 row in set (0.000 sec)

The storage engine for the table doesn’t support repair → How is that possibe?

I have checked also SHOW TABLE STATUS LIKE ‘oc_systemtag_object_mapping’;
and it shows InnoDB as Engine.

This Problem will stop me from upgrading my Nextcloud Instance (31.0.9 to 31.0.10) and i have no idea whats the root cause.

You can try this:
sudo -u www-data php /var/www/nextcloud/occ maintenance:repair

I don’t know, but try a google search:

mysql dump (1033)

I prefer using the cli instead the webui, ncp-config or direct command.

@cebe

Output:

Summary sudo -u www-data php /var/www/nextcloud/occ maintenance:repair
  • Repair MySQL collation
    • All tables already have the correct collation → nothing to do
  • Clean tags and favorites
    • 0 tags of deleted users have been removed.
    • 0 tags for delete files have been removed.
    • 0 tag entries for deleted tags have been removed.
    • 0 tags with no entries have been removed.
  • Repair invalid shares
  • Move .step file of updater to backup location
  • Add move avatar background job
    • Repair step already executed
  • Add preview cleanup background jobs
  • Migrate oauth2_clients table to nextcloud schema
    • Update the oauth2_access_tokens table schema.
    • Update the oauth2_clients table schema.
    • Delete clients (and their related access tokens) with the redirect_uri starting with oc:// or ending with *
  • Repair language codes
  • Add log rotate job
  • Clear frontend caches
    • Image cache cleared
    • JS cache cleared
  • Clear every generated avatar
  • Add preview background cleanup job
  • Queue a one-time job to cleanup old backups of the updater
  • Cleanup invalid photocache files for carddav
  • Add background job to cleanup login flow v2 tokens
  • Remove potentially over exposing share links
    • No need to remove link shares.
  • Clear access cache of projects
  • Reset generated avatar flag
  • Keep legacy encryption enabled
  • Check encryption key format
  • Remove old dashboard app config data
  • Add job to cleanup the bruteforce entries
  • Queue a one-time job to check for user uploaded certificates
  • Repair DAV shares
  • Add background job to set the lookup server share state for users
  • Add token cleanup job
  • Clean up abandoned apps
  • Add possibly missing system config
  • Add AI tasks cleanup jobs
  • Queue a job to generate metadata
  • migrate lazy config values
  • Cache logo dimension to fix size in emails on Outlook
    • Theming is not used to provide a logo
  • Remove legacy “.ocdata” file
  • Add cleanup-deleted-users background job
  • Validate account properties and store phone numbers in a known format for search
    • Queued background to validate account properties.
  • AppAPI Daemons configuration GPU params update
    • Daemons configuration GPU params updated: 0
  • Fix component of birthday calendars
    • 3 birthday calendars updated.
  • Regenerating birthday calendars to use new icons and fix old birthday events without year
    • Repair step already executed
  • Fix broken values of calendar objects
    0 [->--------------------------]
  • Registering building of calendar search index as background job
    • Repair step already executed
  • Register building of social profile search index as background job
    • Repair step already executed
  • Registering background jobs to update cache for webcal calendars
    • Added 0 background jobs to update webcal calendars
  • Registering building of calendar reminder index as background job
    • Repair step already executed
  • Register a background job to update rooms and resources
  • Queue jobs to clean up orphan event and contact data
  • Remove activity entries of private events
    • Removed 0 activity entries
  • Clean up old calendar subscriptions from deleted users that were not cleaned-up
    3/3 [============================] 100%
    • 0 calendar subscriptions without an user have been cleaned up
  • Fix the share type of guest shares when migrating from ownCloud
  • Copy the share password into the dedicated column
  • Set existing shares as accepted
  • Clean up meta table
  • Show a hint about the new editor to existing users
  • Set binary permissions
  • Update OAuth token expiration times
  • init metadata
  • Force-reset all Text document sessions
  • Initialize migration of background images from dashboard to theming app
  • Add background job to check for backup codes
  • Populating added database structures for workflows

Backup Problem still exists:

[ nc-backup ] (Thu Oct 30 09:12:08 UTC 2025)
Installing template ‘ncp-metrics.cfg.sh’

check free space

Maintenance mode enabled
backup database

mysqldump: Couldn’t execute ‘show create table oc_cfg_shares’: Incorrect information in file: ‘./nextcloud/oc_cfg_shares.frm’ (1033)
Abort

Maintenance mode disabled
Maintenance mode already disabled

@geoW i tried google and backup via cli, same result

What is the php version you are running?

php -v
PHP 8.3.27 (cli) (built: Oct 27 2025 20:44:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.27, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.27, Copyright (c), by Zend Technologies
pi@ncpi4:~$ 

php version 8.3

PHP 8.3.12 (cli) (built: Sep 27 2024 04:03:53) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.12, Copyright (c) Zend Technologies
with Zend OPcache v8.3.12, Copyright (c), by Zend Technologies

You may consider to upgrade php, but instead of doing armbian-upgrade i propose to do a check with apt update && apt list --upgradable.

In sense of what?
Of course you should know what happens if you use comands given here.
This comand fetches updated repository lists and shows what could be updated, then you may decide to do the upgrade, I thought your php version looks dated and could be updated.