Nextcloud backup_core_only ignored?

:uk:/:us: English version

It looks like the backup_core_only parameter is ignored when I’m creating a NextCloud backup.

xxx@xxxi:~ $  sudo yunohost app setting nextcloud backup_core_only
1

But when I’m creating the backup I get a 38 Go file and the data directory is not excluded.

Backing up data directory...
Backing up logrotate configuration...
Backing up the MySQL database...
Backing up php-fpm configuration...
Backing up nginx web server configuration...
Backing up the main app directory...
Loading installation settings...

How can I fix this ?

:fr: Version française

Il semble que le paramètre backup_core_only est ignoré quand je crée une sauvegarde NextCloud.

xxx@xxxi:~ $  sudo yunohost app setting nextcloud backup_core_only
1

Mais quand je crée la sauvegarde elle pèse 38 Go et les données ne sont pas exclues.

Backing up data directory...
Backing up logrotate configuration...
Backing up the MySQL database...
Backing up php-fpm configuration...
Backing up nginx web server configuration...
Backing up the main app directory...
Loading installation settings...

Comment puis-je corrriger ça ?

Hi Dams

Indeed, backup_core_only isn’t used anymore as an app setting.
Now, this option is replaced by a environment variable, more volatile and so, less subject to side effects.
So, now, to create a backup without the data, precede your backup command by BACKUP_CORE_ONLY=1 to set the option.

sudo BACKUP_CORE_ONLY=1 yunohost backup create [...]
2 Likes

Thanks a lot @Maniack_Crudelis. This works much better. I could create the backup with this environment variable. I have updated my nightly bash.

Questions:

  1. how do I set it for the web admin console ? I would have expect the default value to be 1, like it was before updates.
  2. how may I update the documentation about this (at least the french version still refers to the backup_core_only as an app setting).

I already updated the documentation, both in English and French. Still as a PR though.

What do you mean by default at 1 ? The default value is 0, not 1. Except during upgrade.
For the web admin, you can’t currently set any variable like this one.

I mean this documentation YunoHost • index where it says:

Pour désactiver la sauvegarde de toutes les données de cette application vous pouvez utiliser (dans le cas de Nextcloud) yunohost app setting nextcloud backup_core_only -v '1' . Cette commande ajoute backup_core_only: '1' dans /etc/yunohost/apps/nextcloud/settings.yml .

Forget about the default. I probably have change the setting a long time ago. So long ago that I though it was the default.

Anyway my periodic backup is working again and everything is fine. Thanks again for your help.