Restore backups from updater and disable backups

I found that the Nextcloud updater uses a lot of space by creating backups at data/updater-xxx/backups/.

There is no documentation how to restore these backups. There is no database. Is it even possible to restore them or are these backups just wasting a lot of space.

How can one disable these seemingly useless backups or reduce their number?

Good question!
Although my question is sorta different. My question is; is it necessary to retain them past a good upgrade? I’ve noticed in ‘data/updater-oc817ns0y7e4/backups/’ there are several retained backup folders of the previous versions. Same with ‘data/updater-oc817ns0y7e4/downloads/’.
Can I delete these backed up folders?

@fkbreitl @RodmanB
There are documentation for Backup and Restore. And yes you must backup (dump) the database and i think there is no database dump in /updater-xxx/backups. But i don’t know if you could create a dump with the database credentials in config.php at all. Maybe the directory is more for a rollback during the update. I think that makes more sense. I think updater-xxx/backups is only anupdater-backup and then it makes sense. The user data, for example, is not backed up. Contained are rather the apps.

Also if you make a backup you do not need to backup or use this directory. And if you need a backup you can not use it, too.

And what do we learn from it. Always make a backup yourself before updating.

Can you elaborate on this confusing statement?

A backup is a backup. So are the $nextcloud-data-dir/updater-ocXXXXXXXXXX/backups. Of course those do not contain user data or the database - but all the rest, so core/server itself and all apps.

I don’t really know my way around either. But the files created there by Nextcloud are rather intended for a rollback in the event of a faulty upgrade. It has less to do with a real backup. You have a real backup, for example, if the entire hard disk breaks, in which case these files would possibly be included.

It’s an application backup which served well for restoring after a faulty update. Did not contain user data or database.

Maybe not everybody can read out the parameter in the source code. You do not need to edit the source code. Use.

sudo -u www-data php /path/to/nextcloud/updater/updater.phar --no-backup
1 Like

Any solution if you don’t have root access on a shared host and don’t want to edit code which gets overwritten with the next update?