Help restoring old database

I reinstalled Nextcloud via snap, changed my instance ID to the old installs ID, but only by admin user’s data was restored. I think the MySQL database isn’t being accessed, as when adding a user that existed, I get a bad request.
I read that updates make a database dump, is there any way I can use that?

[/details]
Nextcloud version: 18.0.4.2
Operating system and version: 18.04
Apache or nginx version: Apache2, 2.4.29
PHP version: 7.2.24

The output of your Nextcloud log in Admin > Logging:

Error	ocs_api	InvalidArgumentException: Username is invalid because files already exist for this user		2020-05-28T11:32:56-0700
Error	ocs_api	InvalidArgumentException: Username is invalid because files already exist for this user		2020-05-28T11:11:56-0700

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'instanceid' => 'ockwop45dy6v',
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' =>
  array (
    0 => '192.168.1.112',
    1 => '***',
  ),
  'datadirectory' => '/mnt/pool/data',
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'overwrite.cli.url' => 'http://192.168.1.112',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '***',
  'installed' => true,
  'maintenance' => false,
);

Either you missed some steps or you need to elaborate on your process. Did you transfer and restore the database?