Nextcloud version (eg, 20.0.5): 16.0.9.
Operating system and version (eg, Ubuntu 20.04): TrueNAS-12.0-RELEASE
PHP: 7.1.33
DB: mysql 5.6.45
The issue you are facing:
I would like copy data from my server but there is any error. I can log, I can copy soma small files, but a lot of files cant.
An exception occurred while executing 'INSERT INTO
oc_file_locks (
key,
lock,
ttl) VALUES(?, ?, ?)' with params ["files\/70e3b39bfe3a240a56239f155f086ff8", 1, 1618696849]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_file_locks' doesn't exist
Is this the first time you’ve seen this error? (Y/N):Y
# occ files:scan --all
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
Starting scan for user 1 out of 2 (admin)
Exception during scan: An exception occurred while executing 'INSERT INTO `oc_file_locks` (`key`, `lock`, `ttl`) VALUES(?, ?, ?)' with params ["files\/e8482945c9011a1fad7f0293d9760c26", -1, 1618697519]:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_file_locks' doesn't exist
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(184): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(158): Doctrine\DBAL\DBALException::wrapException(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'An exception oc...')
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1088): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'INSERT INTO `oc...', Array)
#3 /usr/local/www/nextcloud/lib/private/DB/Connection.php(216): Doctrine\DBAL\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)
#4 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(222): OC\DB\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)
#5 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(214): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /usr/local/www/nextcloud/lib/private/DB/Adapter.php(140): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /usr/local/www/nextcloud/lib/private/DB/Connection.php(261): OC\DB\Adapter->insertIgnoreConflict('file_locks', Array)
#8 /usr/local/www/nextcloud/lib/private/Lock/DBLockingProvider.php(139): OC\DB\Connection->insertIgnoreConflict('file_locks', Array)
#9 /usr/local/www/nextcloud/lib/private/Lock/DBLockingProvider.php(200): OC\Lock\DBLockingProvider->initLockField('files/e8482945c...', -1)
#10 /usr/local/www/nextcloud/lib/private/Files/Storage/Common.php(743): OC\Lock\DBLockingProvider->acquireLock('files/e8482945c...', 2)
#11 /usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(593): OC\Files\Storage\Common->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#12 /usr/local/www/nextcloud/lib/private/Files/Cache/Scanner.php(331): OC\Files\Storage\Wrapper\Wrapper->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#13 /usr/local/www/nextcloud/lib/private/Files/Utils/Scanner.php(245): OC\Files\Cache\Scanner->scan('', true, 3)
#14 /usr/local/www/nextcloud/apps/files/lib/Command/Scan.php(145): OC\Files\Utils\Scanner->scan('/admin', true, NULL)
#15 /usr/local/www/nextcloud/apps/files/lib/Command/Scan.php(201): OCA\Files\Command\Scan->scanFiles('admin', '/admin', Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#16 /usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /usr/local/www/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(901): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /usr/local/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /usr/local/www/nextcloud/console.php(97): OC\Console\Application->run()
#23 /usr/local/www/nextcloud/occ(11): require_once('/usr/local/www/...')