Backup app cannot add data folder

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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): 24.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 with Docker
PHP version (eg, 7.4): 8.0

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N):
Couldn’t backup for a couple of months, now I have the time I wanna dive deeper into the issue. I got new info on it since today.

Steps to replicate it:

  1. Install backup app
  2. Try to set app data folder
  3. Cannot click on the button :frowning:

Within shell:

  1. Login as www-data
  2. Do the following command within the NC folder: php occ backup:external:appdata. Even with a specific external storage number it throws the same error.

The output of your Nextcloud log in Admin > Logging:

In ExternalFolderService.php line 354:

backup:external:appdata [--unset]

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

$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
  'instanceid' => 'RECACTED',
  'passwordsalt' => 'RECACTED',
  'secret' => 'RECACTED',
  'trusted_domains' =>
  array (
    0 => 'RECACTED',
    1 => 'RECACTED',
    2 => 'RECACTED',
    3 => 'RECACTED',
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'RECACTED',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-mariadb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'RECACTED',
  'installed' => true,
  'default_phone_region' => 'RECACTED',
  'onlyoffice' =>
  array (
    'DocumentServerInternalUrl' => 'RECACTED',
    'StorageUrl' => 'RECACTED',
    'DocumentServerUrl' => '/ds-vpath/',
  'allow_local_remote_servers' => 'false',
  'maintenance' => false,
  'loglevel' => 2,
  'app_install_overwrite' =>
  array (
    0 => 'metadata',
    1 => 'files_external_gdrive',
    2 => 'bruteforcesettings',
    3 => 'drawio',
    4 => 'extract',
    5 => 'ncdownloader',
    6 => 'uploaddetails',
  'trashbin_retention_obligation' => '30, 60',
  'versions_retention_obligation' => '120, 240',
  '' => 'stable',
  'mail_from_address' => 'RECACTED',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'RECACTED',
  'mail_smtpsecure' => 'tls',
  'mail_smtphost' => 'RECACTED',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '587',
  'mail_smtpname' => 'RECACTED',
  'mail_smtppassword' => 'RECACTED',
  'theme' => '',

I do not use the app. But i found this for you. It differs from your issue.

But maybe you test the same commands and post the logs:

php occ backup:point:scan -vvv
php occ backup:point:create -vvv

I use backup and restore.

Maybe you can use docker functions. Here an example (sorry german, but you can read the commands for backup/restore).

Why do you use Ubuntu 21 !!! That is not a good idea. Please use Ubuntu 20.04 LTS or Ubuntu 22.04 LTS. You should always wait for the next LTS release and rather do without newer software like PHP. The beta versions of Ubuntu 20.10, 21.04, 21.10 have no place on servers.

$ php occ backup:point:scan -vvv

In ExternalFolderService.php line 354:

Exception trace:
  at /var/www/html/custom_apps/backup/lib/Service/ExternalFolderService.php:354
 OCA\Backup\Service\ExternalFolderService->initRootFolder() at /var/www/html/custom_apps/backup/lib/Service/PointService.php:714
 OCA\Backup\Service\PointService->getExternalAppData() at /var/www/html/custom_apps/backup/lib/Service/PointService.php:775
 OCA\Backup\Service\PointService->initBackupFS() at /var/www/html/custom_apps/backup/lib/Service/PointService.php:642
 OCA\Backup\Service\PointService->scanFoldersFromAppData() at /var/www/html/custom_apps/backup/lib/Command/PointScan.php:129
 OCA\Backup\Command\PointScan->execute() at /var/www/html/3rdparty/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/html/core/Command/Base.php:168
 OC\Core\Command\Base->run() at /var/www/html/3rdparty/symfony/console/Application.php:1009
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/3rdparty/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /var/www/html/3rdparty/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /var/www/html/lib/private/Console/Application.php:211
 OC\Console\Application->run() at /var/www/html/console.php:100
 require_once() at /var/www/html/occ:11

backup:point:scan [--owner OWNER] [--file FILE]

I really wanna use the app because it gives me the opportunity to do partial backups, I think that saves space storage wise. And it has the option to put the backup on an external server.

Sorry, typo, I use 20.04!