nextcloud / nextcloud/backup

Exception while start a restoration point

Open
#623 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug
Dominant language
PHP
Stars
272
Forks
37
PR merge metrics
No merged PRs in 30d

Description

It never starts creating the restore point and I'm not sure why.

This is log:

fb1686e506a5:/var/www/html$ ./occ backup:point:create
> maintenance mode: on
> initialization of the AppData
> maintenance mode: off
An unhandled exception has been thrown:
Error: Call to a member function getUID() on null in /var/www/html/lib/private/FilesMetadata/FilesMetadataManager.php:125
Stack trace:
#0 /var/www/html/lib/private/FilesMetadata/Listener/MetadataUpdate.php(59): OC\FilesMetadata\FilesMetadataManager->refreshMetadata(Object(OC\Files\Node\File))
#1 /var/www/html/lib/private/EventDispatcher/ServiceEventListener.php(86): OC\FilesMetadata\Listener\MetadataUpdate->handle(Object(OCP\Files\Events\Node\NodeWrittenEvent))
#2 /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php(230): OC\EventDispatcher\ServiceEventListener->__invoke(Object(OCP\Files\Events\Node\NodeWrittenEvent), 'OCP\\Files\\Event...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#3 /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'OCP\\Files\\Event...', Object(OCP\Files\Events\Node\NodeWrittenEvent))
#4 /var/www/html/lib/private/EventDispatcher/EventDispatcher.php(94): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(OCP\Files\Events\Node\NodeWrittenEvent), 'OCP\\Files\\Event...')
#5 /var/www/html/lib/private/EventDispatcher/EventDispatcher.php(106): OC\EventDispatcher\EventDispatcher->dispatch('OCP\\Files\\Event...', Object(OCP\Files\Events\Node\NodeWrittenEvent))
#6 /var/www/html/lib/private/Files/Node/HookConnector.php(109): OC\EventDispatcher\EventDispatcher->dispatchTyped(Object(OCP\Files\Events\Node\NodeWrittenEvent))
#7 /var/www/html/lib/private/legacy/OC_Hook.php(105): OC\Files\Node\HookConnector->postWrite(Array)
#8 /var/www/html/lib/private/Files/View.php(1275): OC_Hook::emit('OC_Filesystem', 'post_write', Array)
#9 /var/www/html/lib/private/Files/View.php(1202): OC\Files\View->runHooks(Array, '/nxt/temporal/....', true)
#10 /var/www/html/lib/private/Files/View.php(680): OC\Files\View->basicOperation('file_put_conten...', '/admin/files/nx...', Array, '')
#11 /var/www/html/lib/private/Files/Node/Folder.php(188): OC\Files\View->file_put_contents('/admin/files/nx...', '')
#12 /var/www/html/lib/private/Files/SimpleFS/SimpleFolder.php(89): OC\Files\Node\Folder->newFile('.nobackup', '')
#13 /var/www/html/custom_apps/backup/lib/Service/PointService.php(796): OC\Files\SimpleFS\SimpleFolder->newFile('.nobackup', '')
#14 /var/www/html/custom_apps/backup/lib/Service/PointService.php(386): OCA\Backup\Service\PointService->initBackupFS()
#15 /var/www/html/custom_apps/backup/lib/Service/PointService.php(252): OCA\Backup\Service\PointService->initRestoringPoint(true)
#16 /var/www/html/custom_apps/backup/lib/Command/PointCreate.php(120): OCA\Backup\Service\PointService->create(true, '', '')
#17 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\Backup\Command\PointCreate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /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))
#19 /var/www/html/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Backup\Command\PointCreate), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/lib/private/Console/Application.php(206): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/console.php(100): OC\Console\Application->run()
#24 /var/www/html/occ(11): require_once('/var/www/html/c...')

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with ./occ backup:point:create, then trace the call chain from custom_apps/backup/lib/Service/PointService.php lines 252, 386, and 796 into lib/private/FilesMetadata/FilesMetadataManager.php:125. Check how the metadata listener handles the file written during backup initialization. Done means the command completes without the null-method exception and creates the restoration point.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.