Restoring deleted folder from backup

Nextcloud version (eg, 20.0.5): 23.0.0
Operating system and version (eg, Ubuntu 20.04): Linux 4.9.0-15-amd64 x86_64
Apache or nginx version (eg, Apache 2.4.25): ?
PHP version (eg, 7.4): 7.4.25

The issue you are facing:

I have deleted a folder and need to restore it from backup (trash bin has been emptied). But I don’t know how to do this. In the backup file I can’t find the corresponding folder. Can anybody help?

The output of your Nextcloud log in Admin > Logging:

{"reqId":"*","level":2,"time":"2022-01-09T01:42:14+00:00","remoteAddr":"*","user":"--","app":"OC\\Log\\Rotate","method":"GET","url":"/cron.php","message":"Log file \"/*//nextcloud/data/nextcloud.log\" was over 104857600 bytes, moved to \"/*//nextcloud/data/nextcloud.log.1\"","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.137 Safari/537.36","version":"23.0.0.10"}
{"reqId":"*","level":3,"time":"2022-01-09T01:42:14+00:00","remoteAddr":"*","user":"*","app":"files_antivirus","method":"PUT","url":"/index.php/apps/text/session/create","message":"The antivirus executable could not be found at /usr/bin/clamscan","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.137 Safari/537.36","version":"23.0.0.10","exception":{"Exception":"RuntimeException","Message":"The antivirus executable could not be found at /usr/bin/clamscan","Code":0,"Trace":[{"function":"__construct","class":"OCA\\Files_Antivirus\\Scanner\\LocalClam","type":"->","args":[{"__class__":"OCA\\Files_Antivirus\\AppConfig"},{"__class__":"OC\\Log"},{"__class__":"OCA\\Files_Antivirus\\StatusFactory"}]},{"file":"/*/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"newInstanceArgs","class":"ReflectionClass","type":"->","args":[[{"__class__":"OCA\\Files_Antivirus\\AppConfig"},{"__class__":"OC\\Log"},{"__class__":"OCA\\Files_Antivirus\\StatusFactory"}]]},{"file":"/*/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"__class__":"ReflectionClass","name":"OCA\\Files_Antivirus\\Scanner\\LocalClam"}]},{"file":"/*/nextcloud/apps/files_antivirus/lib/Scanner/ScannerFactory.php","line":45,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Files_Antivirus\\Scanner\\LocalClam"]},{"file":"/*/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","line":107,"function":"getScanner","class":"OCA\\Files_Antivirus\\Scanner\\ScannerFactory","type":"->","args":[]},{"file":"/*/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","line":85,"function":"wrapSteam","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569",null]},{"file":"/*/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":301,"function":"fopen","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php","line":317,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/lib/private/Files/View.php","line":682,"function":"fopen","class":"OCA\\RansomwareProtection\\StorageWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/lib/private/Files/Node/Folder.php","line":198,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/appdata_oce78vs3s4fg/text/documents/27569",null]},{"file":"/*/nextcloud/lib/private/Files/SimpleFS/NewSimpleFile.php","line":133,"function":"newFile","class":"OC\\Files\\Node\\Folder","type":"->","args":["27569",null]},{"file":"/*/nextcloud/apps/text/lib/Service/DocumentService.php","line":164,"function":"putContent","class":"OC\\Files\\SimpleFS\\NewSimpleFile","type":"->","args":[null]},{"file":"/*/nextcloud/apps/text/lib/Service/ApiService.php","line":96,"function":"createDocument","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/*/nextcloud/apps/text/lib/Controller/SessionController.php","line":50,"function":"create","class":"OCA\\Text\\Service\\ApiService","type":"->","args":[27569,null,null,null,false]},{"file":"/*/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":[27569,null,false]},{"file":"/*/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"create"]},{"file":"/*/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"create"]},{"file":"/*/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","create",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"text.Session.create"}]},{"file":"/*/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/create"]},{"file":"/*/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/*/nextcloud/apps/files_antivirus/lib/Scanner/LocalClam.php","Line":43,"CustomMessage":"--"}}
{"reqId":"*","level":3,"time":"2022-01-09T01:43:01+00:00","remoteAddr":"*","user":"*","app":"files_antivirus","method":"PUT","url":"/index.php/apps/text/session/create","message":"The antivirus executable could not be found at /usr/bin/clamscan","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.137 Safari/537.36","version":"23.0.0.10","exception":{"Exception":"RuntimeException","Message":"The antivirus executable could not be found at /usr/bin/clamscan","Code":0,"Trace":[{"function":"__construct","class":"OCA\\Files_Antivirus\\Scanner\\LocalClam","type":"->","args":[{"__class__":"OCA\\Files_Antivirus\\AppConfig"},{"__class__":"OC\\Log"},{"__class__":"OCA\\Files_Antivirus\\StatusFactory"}]},{"file":"/*/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"newInstanceArgs","class":"ReflectionClass","type":"->","args":[[{"__class__":"OCA\\Files_Antivirus\\AppConfig"},{"__class__":"OC\\Log"},{"__class__":"OCA\\Files_Antivirus\\StatusFactory"}]]},{"file":"/*/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"__class__":"ReflectionClass","name":"OCA\\Files_Antivirus\\Scanner\\LocalClam"}]},{"file":"/*/nextcloud/apps/files_antivirus/lib/Scanner/ScannerFactory.php","line":45,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Files_Antivirus\\Scanner\\LocalClam"]},{"file":"/*/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","line":107,"function":"getScanner","class":"OCA\\Files_Antivirus\\Scanner\\ScannerFactory","type":"->","args":[]},{"file":"/*/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","line":85,"function":"wrapSteam","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569",null]},{"file":"/*/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":301,"function":"fopen","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php","line":317,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/lib/private/Files/View.php","line":682,"function":"fopen","class":"OCA\\RansomwareProtection\\StorageWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/lib/private/Files/Node/Folder.php","line":198,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/appdata_oce78vs3s4fg/text/documents/27569",null]},{"file":"/*/nextcloud/lib/private/Files/SimpleFS/NewSimpleFile.php","line":133,"function":"newFile","class":"OC\\Files\\Node\\Folder","type":"->","args":["27569",null]},{"file":"/*/nextcloud/apps/text/lib/Service/DocumentService.php","line":164,"function":"putContent","class":"OC\\Files\\SimpleFS\\NewSimpleFile","type":"->","args":[null]},{"file":"/*/nextcloud/apps/text/lib/Service/ApiService.php","line":96,"function":"createDocument","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/*/nextcloud/apps/text/lib/Controller/SessionController.php","line":50,"function":"create","class":"OCA\\Text\\Service\\ApiService","type":"->","args":[27569,null,null,null,false]},{"file":"/*/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":[27569,null,false]},{"file":"/*/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"create"]},{"file":"/*/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"create"]},{"file":"/*/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","create",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"text.Session.create"}]},{"file":"/*/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/create"]},{"file":"/*/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/*/nextcloud/apps/files_antivirus/lib/Scanner/LocalClam.php","Line":43,"CustomMessage":"--"}}
{"reqId":"*","level":3,"time":"2022-01-10T10:25:57+00:00","remoteAddr":"*","user":"*","app":"files_antivirus","method":"PUT","url":"/index.php/apps/text/session/create","message":"The antivirus executable could not be found at /usr/bin/clamscan","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.137 Safari/537.36","version":"23.0.0.10","exception":{"Exception":"RuntimeException","Message":"The antivirus executable could not be found at /usr/bin/clamscan","Code":0,"Trace":[{"function":"__construct","class":"OCA\\Files_Antivirus\\Scanner\\LocalClam","type":"->","args":[{"__class__":"OCA\\Files_Antivirus\\AppConfig"},{"__class__":"OC\\Log"},{"__class__":"OCA\\Files_Antivirus\\StatusFactory"}]},{"file":"/*/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"newInstanceArgs","class":"ReflectionClass","type":"->","args":[[{"__class__":"OCA\\Files_Antivirus\\AppConfig"},{"__class__":"OC\\Log"},{"__class__":"OCA\\Files_Antivirus\\StatusFactory"}]]},{"file":"/*/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"__class__":"ReflectionClass","name":"OCA\\Files_Antivirus\\Scanner\\LocalClam"}]},{"file":"/*/nextcloud/apps/files_antivirus/lib/Scanner/ScannerFactory.php","line":45,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Files_Antivirus\\Scanner\\LocalClam"]},{"file":"/*/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","line":107,"function":"getScanner","class":"OCA\\Files_Antivirus\\Scanner\\ScannerFactory","type":"->","args":[]},{"file":"/*/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","line":85,"function":"wrapSteam","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569",null]},{"file":"/*/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":301,"function":"fopen","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php","line":317,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/lib/private/Files/View.php","line":682,"function":"fopen","class":"OCA\\RansomwareProtection\\StorageWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/27569","w"]},{"file":"/*/nextcloud/lib/private/Files/Node/Folder.php","line":198,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/appdata_oce78vs3s4fg/text/documents/27569",null]},{"file":"/*/nextcloud/lib/private/Files/SimpleFS/NewSimpleFile.php","line":133,"function":"newFile","class":"OC\\Files\\Node\\Folder","type":"->","args":["27569",null]},{"file":"/*/nextcloud/apps/text/lib/Service/DocumentService.php","line":164,"function":"putContent","class":"OC\\Files\\SimpleFS\\NewSimpleFile","type":"->","args":[null]},{"file":"/*/nextcloud/apps/text/lib/Service/ApiService.php","line":96,"function":"createDocument","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/*/nextcloud/apps/text/lib/Controller/SessionController.php","line":50,"function":"create","class":"OCA\\Text\\Service\\ApiService","type":"->","args":[27569,null,null,null,false]},{"file":"/*/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":[27569,null,false]},{"file":"/*/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"create"]},{"file":"/*/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"create"]},{"file":"/*/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","create",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"text.Session.create"}]},{"file":"/*/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/create"]},{"file":"/*/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/*/nextcloud/apps/files_antivirus/lib/Scanner/LocalClam.php","Line":43,"CustomMessage":"--"}}
{"reqId":"*","level":3,"time":"2022-01-10T10:26:31+00:00","remoteAddr":"*","user":"*","app":"files_antivirus","method":"PUT","url":"/index.php/apps/text/session/create","message":"The antivirus executable could not be found at /usr/bin/clamscan","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.137 Safari/537.36","version":"23.0.0.10","exception":{"Exception":"RuntimeException","Message":"The antivirus executable could not be found at /usr/bin/clamscan","Code":0,"Trace":[{"function":"__construct","class":"OCA\\Files_Antivirus\\Scanner\\LocalClam","type":"->","args":[{"__class__":"OCA\\Files_Antivirus\\AppConfig"},{"__class__":"OC\\Log"},{"__class__":"OCA\\Files_Antivirus\\StatusFactory"}]},{"file":"/*/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"newInstanceArgs","class":"ReflectionClass","type":"->","args":[[{"__class__":"OCA\\Files_Antivirus\\AppConfig"},{"__class__":"OC\\Log"},{"__class__":"OCA\\Files_Antivirus\\StatusFactory"}]]},{"file":"/*/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"__class__":"ReflectionClass","name":"OCA\\Files_Antivirus\\Scanner\\LocalClam"}]},{"file":"/*/nextcloud/apps/files_antivirus/lib/Scanner/ScannerFactory.php","line":45,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Files_Antivirus\\Scanner\\LocalClam"]},{"file":"/*/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","line":107,"function":"getScanner","class":"OCA\\Files_Antivirus\\Scanner\\ScannerFactory","type":"->","args":[]},{"file":"/*/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","line":85,"function":"wrapSteam","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/30260",null]},{"file":"/*/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":301,"function":"fopen","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/30260","w"]},{"file":"/*/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php","line":317,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/30260","w"]},{"file":"/*/nextcloud/lib/private/Files/View.php","line":682,"function":"fopen","class":"OCA\\RansomwareProtection\\StorageWrapper","type":"->","args":["appdata_oce78vs3s4fg/text/documents/30260","w"]},{"file":"/*/nextcloud/lib/private/Files/Node/Folder.php","line":198,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/appdata_oce78vs3s4fg/text/documents/30260",null]},{"file":"/*/nextcloud/lib/private/Files/SimpleFS/NewSimpleFile.php","line":133,"function":"newFile","class":"OC\\Files\\Node\\Folder","type":"->","args":["30260",null]},{"file":"/*/nextcloud/apps/text/lib/Service/DocumentService.php","line":164,"function":"putContent","class":"OC\\Files\\SimpleFS\\NewSimpleFile","type":"->","args":[null]},{"file":"/*/nextcloud/apps/text/lib/Service/ApiService.php","line":96,"function":"createDocument","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/*/nextcloud/apps/text/lib/Controller/SessionController.php","line":50,"function":"create","class":"OCA\\Text\\Service\\ApiService","type":"->","args":[30260,null,null,null,false]},{"file":"/*/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":[30260,null,false]},{"file":"/*/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"create"]},{"file":"/*/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"create"]},{"file":"/*/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","create",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"text.Session.create"}]},{"file":"/*/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/create"]},{"file":"/*/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/*/nextcloud/apps/files_antivirus/lib/Scanner/LocalClam.php","Line":43,"CustomMessage":"--"}}

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

<?php
$CONFIG = array (
  'instanceid' => '*',
  'passwordsalt' => '*',
  'secret' => '*',
  'trusted_domains' => 
  array (
    0 => '*.*',
    1 => '*',
  ),
  'datadirectory' => '/*/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '23.0.0.10',
  'overwrite.cli.url' => 'https://www.*',
  'dbname' => '*',
  'dbhost' => '*',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '*',
  'dbpassword' => '*',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_from_address' => '*',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '*',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '*',
  'mail_smtphost' => '*',
  'mail_smtpname' => '*',
  'mail_smtppassword' => '*',
  'mail_smtpsecure' => 'ssl',
  'updater.secret' => '*',
);

Normally you make a backup of all files and your database ( e.g. MariaDB). I think in this case the backup of your MariaDB you do not really need.

In your backup of files you have e.g. this structure

/path/to/nextcloud
  -> /data
     --> /username
    ---> /files
  -----> /folder

You can copy files from the folder (backup) to the nextcloud folder (server). But Nextcloud can only see them after update the MariaDB.

sudo -u www-data php occ files:scan username
sudo -u www-data php occ files:scan --all

documentation

Read also backup and restore. Test full backup and full restore on a test server.

Thank you for your reply.
That is my problem, the data-folder is missing in every backup I have got.

Perhaps your data folder is at another place. Please look in your config/config.php

  'datadirectory' => '/path/to/data',