Config.php was erased. Is it backed up with Borg?

TL;DR Is config.php backed up by Borg? If so, where can I find it?

Nextcloud version (eg, 20.0.5): Nextcloud Hub 3 (25.0.3), Nextcloud AIO v4.2.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.54
PHP version (eg, 7.4): 8.0.27

The issue you are facing:

Nextcloud AIO has BorgBackup for backing up to a local destination, but for redundancy I wanted an offsite backup so I was using the Nextcloud Backup app: Backup - Apps - App Store - Nextcloud

I had the backup destination as an S3 compatible object storage bucket hosted by DigitalOcean.

After configuring the backup and running it for several weeks, unbeknown to me the Nextcloud Backup app was filling my local disk drive with backups until my entire 2TB drive was full of backups.

I only realized this had happened when Nextcloud stopped working and I investigated. I have now cleared out the backup so my drive has plenty of empty space, however Nextcloud shows this error:


Configuration was not read or initialized correctly, not overwriting /var/www/html/config/config.php

So I took a look at config.php and it is blank.

My question is, since I was using the Borg Backup that comes with Nextcloud AIO, is there any way to restore a backup of config.php ?

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Enable backups with Nextcloud Backup app.
  2. Backup app completely fills disk drive.
  3. Try to access Nextcloud.

The output of your Nextcloud log in Admin > Logging:


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

Completely blank

The output of your Apache/nginx/system log in /var/log/____:


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


Yes, the borg backup of AIO includes the config.php obviously. Otherwise it would be not a good backup solution :wink:

That is good to hear. Do you know where I can find it, specifically what volume/directory?

You can use GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance. to open the archive on your host and then it should be in the nextcloud_aio_nextcloud volume.

1 Like