backup icon indicating copy to clipboard operation
backup copied to clipboard

Unable to fetch restore points - Cannot create one

Open Kh3nsu opened this issue 3 years ago • 14 comments

Hello,

I currently got an error when trying to create a restore point. I was able to add my external storage (storj app) for my backups. As temporary folder for the Restore points I selected Local Storage. When I try to create a restore point I get this error: https://pastebin.com/2GEQ8GqZ Anyone got an Idea how to fix that? Or is that still the incompatibly of the backup app with NC 24?

Kh3nsu avatar Jul 27 '22 08:07 Kh3nsu

Also if I change the app_data location I get the error again: https://pastebin.com/SgF6AzgA

Kh3nsu avatar Jul 27 '22 19:07 Kh3nsu

Same here with NC 24.0.3 and Backup 1.1.2 external location attached as SMB/CIFS

[no app in context] Fehler: Exception: OCA\Backup\Service\ExternalFolderService::deserialize(): Argument #1 ($data) must be of type array, null given, called in /var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php on line 141 in file '/var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php' line 67 at <>

  1. /var/www/nextcloud/lib/private/AppFramework/App.php line 172 OC\AppFramework\Http\Dispatcher->dispatch()
  2. /var/www/nextcloud/lib/private/Route/Router.php line 298 OC\AppFramework\App::main()
  3. /var/www/nextcloud/ocs/v1.php line 62 OC\Route\Router->match()
  4. /var/www/nextcloud/ocs/v2.php line 23 require_once("/var/www/nextcloud/ocs/v1.php")

GET /ocs/v2.php/apps/backup/rp from xxxxxxxx by ncp at 2022-08-01T06:17:22+00:00

Terminal output:

sudo -u www-data php /var/www/nextcloud/occ backup:point:list

  • retreiving data from local

found RestoringPoint 20220730210033-differential-JJRbQ9RbITPWjEK

  • retreiving data from external:10 An unhandled exception has been thrown: TypeError: OCA\Backup\Service\ExternalFolderService::deserialize(): Argument #1 ($data) must be of type array, null given, called in /var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php on line 141 and defined in /var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php:67 Stack trace: #0 /var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php(141): OCA\Backup\Service\ExternalFolderService->deserialize() #1 /var/www/nextcloud/apps/backup/lib/Service/ExternalFolderService.php(219): OCA\Backup\Service\ExternalFolderService->deserializeJson() #2 /var/www/nextcloud/apps/backup/lib/Service/ExternalFolderService.php(174): OCA\Backup\Service\ExternalFolderService->getRestoringPoint() #3 /var/www/nextcloud/apps/backup/lib/Service/PointService.php(888): OCA\Backup\Service\ExternalFolderService->getRestoringPoints() #4 /var/www/nextcloud/apps/backup/lib/Command/PointList.php(122): OCA\Backup\Service\PointService->getRPFromInstances() #5 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Backup\Command\PointList->execute() #6 /var/www/nextcloud/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run() #7 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run() #8 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand() #9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun() #10 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run() #11 /var/www/nextcloud/console.php(100): OC\Console\Application->run() #12 /var/www/nextcloud/occ(11): require_once('...')

radartomx avatar Aug 01 '22 06:08 radartomx

Hello ist there anything new about this maybe?

Kh3nsu avatar Aug 04 '22 10:08 Kh3nsu

Hello,

Can you access the external folder from the Files App ? Which version of the app is used ? Can you browse in a way or another the content of your backups ? Also, do you have more details in your logs ?

ArtificialOwl avatar Aug 04 '22 11:08 ArtificialOwl

Yes I can access the external folder. Also tried to manually copy files onto it. Worked perfectly fine.

Kh3nsu avatar Aug 04 '22 11:08 Kh3nsu

Hello,

Can you access the external folder from the Files App ? Which version of the app is used ? Can you browse in a way or another the content of your backups ? Also, do you have more details in your logs ?

I can see that the backup app creates the folder I configured and also tries to create the first backup. Nextcloud goes into maintenance all just fine. But as soon as it wants to upload to an external source like storj, also tried a smb share. It fails with the error I mentioned earlier. After that it is not creating any backup anymore. It just created a .restore-point file on the external storage but with 0kb. I don't have any more logs than what I posted. Where should I look?

Kh3nsu avatar Aug 04 '22 11:08 Kh3nsu

Are you trying to upload your backup on Storj for the generation of the backup (First Pass) ? If this is the case, I would not advice that, you should create the backup locally and used Storj to store the backup once fully generated

ArtificialOwl avatar Aug 04 '22 12:08 ArtificialOwl

Screenshot_20220804-144925

Screenshot_20220804-144749 Well I set it up like that. I create the first pass locally and then to storj.

Kh3nsu avatar Aug 04 '22 12:08 Kh3nsu

same here: backup is first made locally and then it should be copied to an external smb-share (QNAP NAS). On the external drive a folder is created together with an empty restore-point file.

radartomx avatar Aug 04 '22 12:08 radartomx

I'm having the same issue and I'm getting the same output as @radartomx when doing sudo -u www-data php /var/www/nextcloud/occ backup:point:list

tomszar avatar Aug 04 '22 15:08 tomszar

I've added an external storage via sftp and I have the same issue. Restore point is created, compressed, encrypted and packed, but it doesn't upload. When I try to run the upload command I get the same error. See the output below: ` sudo -u www-data php ./occ backup:point:upload 20220803220504-full-44KQh9bEg2hKxeV

  • uploading 20220803220504-full-44KQh9bEg2hKxeV to external folders
  • checking external folder 18:backup/

restoring point not found

  • Creating Restoring Point on external folder: An unhandled exception has been thrown: TypeError: OCA\Backup\Service\ExternalFolderService::deserialize(): Argument 1 ($data) must be of type array, null given, called in /var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php on line 140 and defined in /var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php:67 Stack trace: #0 /var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php(140): OCA\Backup\Service\ExternalFolderService->deserialize() 1 /var/www/nextcloud/apps/backup/lib/Service/ExternalFolderService.php(532): OCA\Backup\Service\ExternalFolderService->deserializeJson() 2 /var/www/nextcloud/apps/backup/lib/Service/ExternalFolderService.php(452): OCA\Backup\Service\ExternalFolderService->updateMetadataFile() 3 /var/www/nextcloud/apps/backup/lib/Service/ExternalFolderService.php(385): OCA\Backup\Service\ExternalFolderService->createPoint() 4 /var/www/nextcloud/apps/backup/lib/Service/UploadService.php(318): OCA\Backup\Service\ExternalFolderService->confirmPoint() 5 /var/www/nextcloud/apps/backup/lib/Service/UploadService.php(178): OCA\Backup\Service\UploadService->uploadToExternalFolder() 6 /var/www/nextcloud/apps/backup/lib/Command/PointUpload.php(143): OCA\Backup\Service\UploadService->uploadPoint() 7 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Backup\Command\PointUpload->execute() 8 /var/www/nextcloud/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run() 9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run() 10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand() 11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun() 12 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run() 13 /var/www/nextcloud/console.php(100): OC\Console\Application->run() 14 /var/www/nextcloud/occ(11): require_once('...') Here's the output from backup:point:list- retreiving data from local

found RestoringPoint 20220803220504-full-44KQh9bEg2hKxeV

  • retreiving data from external:18 +--------------------------------------+---------------------+----------+----------+--------+---------+-----------------------------+----------+--------------+--+ | Restoring Point | Date | NC | Database | Parent | Comment | Status | Instance | Health | | +--------------------------------------+---------------------+----------+----------+--------+---------+-----------------------------+----------+--------------+--+ | 20220803220504-full-44KQh9bEg2hKxeV | 2022-08-03 22:05:04 | 24.0.3.2 | mysql | | | packed,compressed,encrypted | local | not complete | | +--------------------------------------+---------------------+----------+----------+--------+---------+-----------------------------+----------+--------------+--+ `

DanialSh avatar Aug 05 '22 06:08 DanialSh

I tried the Patch from @ArtificialOwl, I can confirm it fixed the problem

Kh3nsu avatar Aug 07 '22 20:08 Kh3nsu

At least we got past this error. Sadly now after a while uploading I receive a new error: https://pastebin.com/gzF6ccNT Sadly the upload stops. I see under activities that the app is trying to modify stuff but under traffic I see that nothing is uploading anymore and it just stopped. Also in the backup page, it says that it cannot verify integrity of the point on the external storage.

Kh3nsu avatar Aug 08 '22 09:08 Kh3nsu

I tried the Patch from @ArtificialOwl, I can confirm it fixed the problem

I tried the patch from @ArtificialOwl but I get this error now:

` - checking external folder 20:backup/

restoring point not found

  • Creating Restoring Point on external folder: ! cannot create restoring point ! issue while checking external folder: OCP\Files\GenericFileException file_put_contents failed ` On the remote storage side I see a directory with restore point id created and .nobackup and restoring-point.data files, both empty files. I thought this might be a permission issue but from what I can see in the logs and changing the permission on remote storage to 777, I don't think that's the issue.

My remote storage is through sftp

DanialSh avatar Aug 08 '22 20:08 DanialSh

got the same message on Amazon S3. Haven't found a solution yet

[no app in context] Fehler: Exception: OCA\Backup\Service\ExternalFolderService::deserialize(): Argument https://github.com/nextcloud/backup/issues/1 ($data) must be of type array, null given, called in /var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php on line 141 in file '/var/www/nextcloud/apps/backup/lib/Tools/Traits/TDeserialize.php' line 67 at

breakinlabs avatar Aug 22 '22 08:08 breakinlabs