Backup using AppData in external storage do not finish the backup

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): Nextcloud Hub 3 (25.0.5)
Operating system and version (eg, Ubuntu 20.04): Opensuse 15.5
Apache or nginx version (eg, Apache 2.4.25): Repository : Update repository with updates from SUSE Linux Enterprise 15 Name : apache2 Version : 2.4.51-150400.6.14.1 Arch : x86_64 Vendor : SUSE LLC <https://www.suse.com/>
PHP version (eg, 7.4): 8.0.30

The issue you are facing:

I’m trying to configure backups in a external storage on a Raspberry Pi with a usb disk.
I’m using the disk in the RPi mounted in /HDD4TB, I have created /HDD4TB/NextcloudBackups and inside it two directories:
/HDD4TB/NextcloudBackups/RestoringPoints
/HDD4TB/NextcloudBackups/AppData

I have set them with rights rwx to all users because I have being having problems with the access from the nextcloud server.

The nextcloud server is a a docker container in Opensuse 15.5.

I mount the RPi disk from external storage using sshfs with user+pass, path to /HDD4TB/NextcloudBackups/, shared only to administrator of the nextcloud. It worked OK, I can write files to it.

Then I configured the backup using external storage but not AppData. I had problems with it working (the backup was created but not transferred to the raspberry), it was because some problems with user permissions, as the backup program is run by user wwwrun in Opensuse, the sshfs was mounted with pi user credentials, so I solved it granting access in the RestoringPoints directory to all with rxw. It seems to work, because in the web settings backup it appears wuth a green tick in issue and health and as packed and zipped. Although I have two copies:

-Local copy in /srv/www/htdocs/nextcloud/data/appdata_ocgmaj5tp86q/backup/20240506121003-full-gPSGqiNZDp4v81y is 72GB

-RPi copy in /HDD4TB/NextcloudBackups/RestoringPoints/20240506121003-full-gPSGqiNZDp4v81y is 18GB

Then I activate AppData to test if it works with it, it delete previous backups. I set the path for AppData to AppData directory inside the external storage /HDD4TB/NextcloudBackups/. I set the same rights rwx to all in this directory.

Then I launch the full backup from the web adminstration … indeed it scheduled it to start at 1.00. Next morning I see there is no backup in the web interface and I go to the Rpi and I can see this

pi@raspberrypi:~ $ ls -lh /HDD4TB/NextcloudBackups/AppData
total 16K
drwxr-xr-x 2 pi pi 4,0K may  8 03:50 20240419031003-differential-PA7ocXCQZp6rU7f
drwxr-xr-x 2 pi pi 4,0K may  8 03:50 20240422031503-differential-qcNmk8ZFG5EgWHU
drwxr-xr-x 2 pi pi 4,0K may  8 03:50 20240506121003-full-gPSGqiNZDp4v81y
drwxr-xr-x 2 pi pi 4,0K may  8 00:35 20240507223504-full-87mYj2jJtz1991f
pi@raspberrypi:~ $ ls -lh /HDD4TB/NextcloudBackups/AppData/20240507223504-full-87mYj2jJtz1991f
total 128K
-rw-r--r-- 1 pi pi 127K may  8 00:35 app.zip
pi@raspberrypi:~ $

the backup seems to have been started but it has stopped with only 132K.

In the nextcloud logs I can see some errors, starting at 22.35 (I think I launched the backup at this time) and then some times more… the backups are scheduled from 1.00 to 6.00

The output of your Nextcloud log in Admin > Logging:

{"reqId":"9UmaGuo5we3RYkkrhtwZ","level":3,"time":"2024-05-07T22:35:04+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"9UmaGuo5we3RYkkrhtwZ","level":3,"time":"2024-05-07T22:35:04+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"U82kh21CDpmc0uLPmK7C","level":3,"time":"2024-05-08T01:50:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"U82kh21CDpmc0uLPmK7C","level":3,"time":"2024-05-08T01:50:04+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"QoThn7y9fdg2Up1TOOas","level":3,"time":"2024-05-08T01:55:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"QoThn7y9fdg2Up1TOOas","level":3,"time":"2024-05-08T01:55:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"QoThn7y9fdg2Up1TOOas","level":3,"time":"2024-05-08T01:55:04+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"QoThn7y9fdg2Up1TOOas","level":3,"time":"2024-05-08T01:55:04+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"ayXkrtjF5n4OfPpcgmCC","level":3,"time":"2024-05-08T02:00:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"ayXkrtjF5n4OfPpcgmCC","level":3,"time":"2024-05-08T02:00:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"cuXT1vBC405W0QVFUy2Z","level":3,"time":"2024-05-08T02:10:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"cuXT1vBC405W0QVFUy2Z","level":3,"time":"2024-05-08T02:10:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"stcFRelZwSsF1yURxham","level":3,"time":"2024-05-08T02:55:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"stcFRelZwSsF1yURxham","level":3,"time":"2024-05-08T02:55:04+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"sVnT4RbzVDZA9Cmvptr2","level":3,"time":"2024-05-08T04:00:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"sVnT4RbzVDZA9Cmvptr2","level":3,"time":"2024-05-08T04:00:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"fELpy6ZVfqWHalmSiu8y","level":3,"time":"2024-05-08T05:05:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}
{"reqId":"fELpy6ZVfqWHalmSiu8y","level":3,"time":"2024-05-08T05:05:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"25.0.5.1","data":{"app":"core"}}

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

<?php
$CONFIG = array (
  'instanceid' => 'ocgmaj5tp86q',
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxxx',
  ),
  'datadirectory' => '/srv/www/htdocs/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.5.1',
  'overwrite.cli.url' => 'https://xxxxxx',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_administrado1',
  'dbpassword' => 'xxxxxxx',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    0 => 'gpxedit',
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_from_address' => 'postmaster',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'xxxx',
  'mail_smtphost' => 'xxxxx',
  'mail_smtpport' => '465',
  'default_phone_region' => 'ES',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxxxx',
  'mail_smtppassword' => 'xxxxx',
  'trashbin_retention_obligation' => 'auto, 365',
);

After changing the loglevel to 0,a d launcha again the full restoration point, I can see a lot of times in the log this

{"reqId":"mqDmDwJoH0AXgYILOYZm","level":1,"time":"2024-05-08T23:08:06+00:00","remoteAddr":"192.168.2.3","user":"administrador","app":"no app in context","method":"GET","url":"/nextcloud/ocs/v2.php/apps/backup/rp","message":"Unable to generate a URL for the named route \"backup.Remote.listRestoringPoint\" as such route does not exist.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0","version":"25.0.5.1","exception":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"backup.Remote.listRestoringPoint\" as such route does not exist.","Code":0,"Trace":[{"file":"/srv/www/htdocs/nextcloud/lib/private/Route/Router.php","line":361,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/private/Route/CachingRouter.php","line":58,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/private/URLGenerator.php","line":103,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/private/URLGenerator.php","line":115,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/backup/lib/Service/RemoteStreamService.php","line":122,"function":"linkToRouteAbsolute","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/backup/lib/Service/RemoteStreamService.php","line":403,"function":"getAppSignatory","class":"OCA\\Backup\\Service\\RemoteStreamService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/backup/lib/Service/PointService.php","line":916,"function":"verifyPoint","class":"OCA\\Backup\\Service\\RemoteStreamService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/backup/lib/Controller/LocalController.php","line":181,"function":"getRPFromInstances","class":"OCA\\Backup\\Service\\PointService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"getRestoringPoints","class":"OCA\\Backup\\Controller\\LocalController","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/htdocs/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/htdocs/nextcloud/ocs/v2.php","line":23,"args":["/srv/www/htdocs/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/htdocs/nextcloud/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"message":"Unable to generate a URL for the named route \"backup.Remote.listRestoringPoint\" as such route does not exist.","exception":{},"CustomMessage":"Unable to generate a URL for the named route \"backup.Remote.listRestoringPoint\" as such route does not exist."}}