Database restoration - How to copy users, Deck, etc.?

I have a MariaDB Docker container out of which I want to copy the most important databases to a new container. I’ve looked into this article but haven’t gotten the copied databases to work. I also don’t know which databases to copy.

Any help would be much appreciated. I’d be happy to take this up with a more experienced Nextcloud / Docker / unRAID user in a call or via a messenger.


I’ve been getting SQL errors for a while. I always managed to get them to disappear, for example, by deactivating the preview generator app that was known to cause issues after a recent update.

Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2006] MySQL server has gone away 

Today, my server suddenly displayed an internal server error. After a while I figured out it was an issue with the database. Entering the Docker container it doesn’t even let me log into MySQL with the credentials I set originally.
I’ve restored from a backup but I fear the database will corrupt again, thus my wish to create a clean database and only transfer over the most important things.


Details

Nextcloud version: 23.0.3.2 (using this container)
Operating system and version: Docker in unRAID 6.9.2

The last Nextcloud log written to disk as currently Nextcloud does not generate a log:
https://drive.google.com/file/d/1gVykweMVmChbbxJ5aVSOmjeBHx-JZL8y/view?usp=sharing

The Nextcloud Docker log gives no indication of an issue:

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] 50-install: executing...
[cont-init.d] 50-install: exited 0.
[cont-init.d] 60-memcache: executing...
[cont-init.d] 60-memcache: exited 0.
[cont-init.d] 70-aliases: executing...
[cont-init.d] 70-aliases: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.

Current config.php (removed all non-important settings originally when trouble-shooting):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => 'XXX',
  ),
  'dbtype' => 'mysql',
  'dbname' => 'nextcloud',
  'dbhost' => 'XXX',
  'dbport' => '3399',
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'version' => '23.0.3.2',
  'overwrite.cli.url' => 'XXX',
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'installed' => true,

  "logfile" => "/data/nextcloud.log",
);

NGINX error log is empty. PHP error log is empty.

MariaDB log:
https://drive.google.com/file/d/1Z22TM6QN6jT0hcu7HwjX3N_k1uwrjZu6/view?usp=sharing

Please fill out the support template. Go to new post in support category and add that completed template to your post. Without details it is impossible to assist you.

Also add a pastebin of your logs and all errors you are receiving. Technical details are the only way to help you (and us volunteers).

1 Like

Added that detail. It was past midnight last night after four hours of trying to find the culprit myself.

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