Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export fails in CLI, Never finishes in GUI #368

Closed
jahknem opened this issue Feb 25, 2023 · 4 comments · Fixed by nextcloud/server#37029
Closed

Export fails in CLI, Never finishes in GUI #368

jahknem opened this issue Feb 25, 2023 · 4 comments · Fixed by nextcloud/server#37029

Comments

@jahknem
Copy link

jahknem commented Feb 25, 2023

Error when exporting any user.
When trying to export on the GUI, the export never finishes, even after days. When using the CLI, it fails on trying to export files.

Below is the output with max verbosity when trying via CLI:

www-data@895183ca82fc:~/html$ php occ user:export j.hildebrandt data/ -vvv
Exporting user information in user.json…
Exporting settings in settings.json…
Exporting versions in versions.json…
Exporting calendars into dav/calendars/…
Exporting contacts into dav/address_books/…
Exporting trashbin into files_trashbin…
Exporting trashbin files…
Exporting account information in settings/account.json…
Exporting profile config in settings/config.json…
Exporting files…
Exporting file versions…

An unhandled exception has been thrown:
TypeError: Symfony\Component\Console\Formatter\OutputFormatter::escapeTrailingBackslash(): Argument #1 ($text) must be of type string, array given, called in /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php on line 47 and defined in /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php:55
Stack trace:
#0 /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php(47): Symfony\Component\Console\Formatter\OutputFormatter::escapeTrailingBackslash(Array)
#1 /var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php(471): Symfony\Component\Console\Formatter\OutputFormatter::escape(Array)
#2 /var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php(72): Symfony\Component\Console\Style\SymfonyStyle->createBlock(Array, '[ERROR] ', 'fg=white;bg=red', ' ', true, true)
#3 /var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php(152): Symfony\Component\Console\Style\SymfonyStyle->block(Array, 'ERROR', 'fg=white;bg=red', ' ', true)
#4 /var/www/html/apps/user_migration/lib/Command/Export.php(215): Symfony\Component\Console\Style\SymfonyStyle->error(Array)
#5 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\UserMigration\Command\Export->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\UserMigration\Command\Export), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/console.php(100): OC\Console\Application->run()
#12 /var/www/html/occ(11): require_once('/var/www/html/c...')
#13 {main}www-data@895183ca82fc:~/html$ 

And below the respective Log entries from nextcloud.log

www-data@895183ca82fc:~/html$ tail data/nextcloud.log | grep migra
{"reqId":"VCLDSeAptVTEy7OmpZ7Z","level":3,"time":"2023-02-25T13:47:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Array to string conversion at /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php#45","userAgent":"--","version":"25.0.3.2","exception":{"Exception":"Error","Message":"Array to string conversion at /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php#45","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Array to string conversion","/var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php",45]},{"file":"/var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php","line":45,"function":"preg_replace","args":["/([^\\\\]?)</","$1\\<",["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":471,"function":"escape","class":"Symfony\\Component\\Console\\Formatter\\OutputFormatter","type":"::","args":[["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":72,"function":"createBlock","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->","And 1 more entries, set log level to debug to see all entries"],"And 5 more entries, set log level to debug to see all entries"],"[ERROR] ","fg=white;bg=red"," ",true,true]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":152,"function":"block","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->","And 1 more entries, set log level to debug to see all entries"],"And 5 more entries, set log level to debug to see all entries"],"ERROR","fg=white;bg=red"," ",true]},{"file":"/var/www/html/apps/user_migration/lib/Command/Export.php","line":215,"function":"error","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->","And 1 more entries, set log level to debug to see all entries"],"And 5 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OCA\\UserMigration\\Command\\Export","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/core/Command/Base.php","line":177,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"kYpfuzPNLn0LNkwT8Vgj","level":3,"time":"2023-02-25T13:54:58+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Array to string conversion at /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php#45","userAgent":"--","version":"25.0.3.2","exception":{"Exception":"Error","Message":"Array to string conversion at /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php#45","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Array to string conversion","/var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php",45]},{"file":"/var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php","line":45,"function":"preg_replace","args":["/([^\\\\]?)</","$1\\<",["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":471,"function":"escape","class":"Symfony\\Component\\Console\\Formatter\\OutputFormatter","type":"::","args":[["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":72,"function":"createBlock","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->","And 1 more entries, set log level to debug to see all entries"],"And 5 more entries, set log level to debug to see all entries"],"[ERROR] ","fg=white;bg=red"," ",true,true]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":152,"function":"block","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->","And 1 more entries, set log level to debug to see all entries"],"And 5 more entries, set log level to debug to see all entries"],"ERROR","fg=white;bg=red"," ",true]},{"file":"/var/www/html/apps/user_migration/lib/Command/Export.php","line":215,"function":"error","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php",216,"export","OCA\\UserMigration\\Migrator\\FilesMigrator","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->","And 1 more entries, set log level to debug to see all entries"],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->","And 1 more entries, set log level to debug to see all entries"],"And 5 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OCA\\UserMigration\\Command\\Export","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/core/Command/Base.php","line":177,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

I'm not sure how to proceed, the error message is greek to me.

@come-nc
Copy link
Collaborator

come-nc commented Feb 27, 2023

Hello @jahknem

Sadly you are hitting a known bug in -vvv when trying to log an error it crashes with another one.
That means the error we have a trace for is not the actual one, making solving the root probem harder.

Could you try applying the following patch and then run the command again:

diff --git a/lib/Command/Export.php b/lib/Command/Export.php
index 55458d65..9777b6b7 100644
--- a/lib/Command/Export.php
+++ b/lib/Command/Export.php
@@ -212,9 +212,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
 			$io->writeln("Export saved in $folder/$exportName.zip");
 		} catch (\Exception $e) {
 			if ($io->isDebug()) {
-				$io->error($e->getTraceAsString());
+				$io->error("$e");
+			} else {
+				$io->error($e->getMessage());
 			}
-			$io->error($e->getMessage());
 			return $e->getCode() !== 0 ? (int)$e->getCode() : 1;
 		}
 
diff --git a/lib/Command/Import.php b/lib/Command/Import.php
index cf35f123..af145031 100644
--- a/lib/Command/Import.php
+++ b/lib/Command/Import.php
@@ -94,9 +94,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
 			$io->writeln("Successfully imported from ${path}");
 		} catch (\Exception $e) {
 			if ($io->isDebug()) {
-				$io->error($e->getTrace());
+				$io->error("$e");
+			} else {
+				$io->error($e->getMessage());
 			}
-			$io->error($e->getMessage());
 			return $e->getCode() !== 0 ? (int)$e->getCode() : 1;
 		}

You will still get an error but this time with the actual error encountered.

@jahknem
Copy link
Author

jahknem commented Mar 2, 2023

Hi @come-nc sorry for taking so long to respond, covid has me in its grips.

Interesting, since that patch it works when calling the export function from the command line, even though that should not have done anything.
I can see the process in htop while its running as it is CPU intensive. When starting the export process over the Web UI I cannot see any process in htop, so I don't think it changed anything there.

Attached is the log from nextcloud.log, which seems to show something relevant if I am not mistaken?

{"reqId":"XXky6Da4Ke7P124MQL82","level":3,"time":"2023-03-02T17:01:17+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"More than 1000 expressions in a list are not allowed on Oracle.","userAgent":"--","version":"25.0.3.2","exception":{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"More than 1000 expressions in a list are not allowed on Oracle.","Code":0,"Trace":[{"file":"/var/www/html/lib/private/SystemTag/SystemTagObjectMapper.php","line":90,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/apps/user_migration/lib/Migrator/FilesMigrator.php","line":207,"function":"getTagIdsForObjects","class":"OC\\SystemTag\\SystemTagObjectMapper","type":"->","args":[[433364,433365,1067855,1067856,1067857,"And 4613 more entries, set log level to debug to see all entries"],"files"]},{"file":"/var/www/html/apps/user_migration/lib/Service/UserMigrationService.php","line":216,"function":"export","class":"OCA\\UserMigration\\Migrator\\FilesMigrator","type":"->","args":[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]},{"file":"/var/www/html/apps/user_migration/lib/Command/Export.php","line":206,"function":"export","class":"OCA\\UserMigration\\Service\\UserMigrationService","type":"->","args":[{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"OC\\User\\User"},null,{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OCA\\UserMigration\\Command\\Export","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/core/Command/Base.php","line":177,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","Line":264,"message":"More than 1000 expressions in a list are not allowed on Oracle.","query":"SELECT `systemtagid`, `objectid` FROM `*PREFIX*systemtag_object_mapping` WHERE (`objectid` IN (:objectids)) AND (`objecttype` = :objecttype) ORDER BY `objectid` ASC, `systemtagid` ASC","exception":{},"CustomMessage":"More than 1000 expressions in a list are not allowed on Oracle."}}

@come-nc
Copy link
Collaborator

come-nc commented Mar 3, 2023

There is no reason why you should get a different error in cli on in the web UI, are you certain you are exporting the same user with the same migrators?

The error trace is quite clear, there are more than 1000 files and that creates a too big query in the systemTagMapper. It needs to split it in chunk, but that will have to be fixed on server side.

In the mean time the only work-around I can offer you is to export without files, and migrate files through another way.

@jahknem
Copy link
Author

jahknem commented Mar 3, 2023

Yes I'm sure. It is however difficult for me to see if anything happens on the Webinterface as there is no progress marker or anything similar. Given that the profiles each have multiple 100 GB of files it is difficult to say if anything is happening. It's just that htop shows it not to do anything and the log entry from nextcloud.log

I'm currently uploading the export made by cli to the new server and will see if I can import it.

On that note, the Web UI exports the backup as user.nextcloud_export (tested on the new server) and only accepts a file with that name, even though it is just a zip file which contains the same thing as the export by cli, which has a much more comprehensible name. But that's probably a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants