[AIO] Borg backup status as host variable


I started using Nextcloud AIO container and it’s great. What I’m missing is an option to schedule weekly backups instead of daily so I went with manual cron execution of backup script.

I need to receive data if my backup was successful so I could send it’s status via email.

I know that date and status information are visible in AIO dashboard and I’m wondering how could those be extracted to local variable on my host.

Thanks for your time :slight_smile:

1 Like

Which backupscript?


I wrote script to change a variable value for DAILY_BACKUP in AIO container.

That starts our backup and it’s working properly but after it’s done I can see “last backup succeeded” in AIO console.

I would like to extract it somehow, maybe it’s also bind to the env.

You can retreive the status of the backup after the backup container is stopped via docker inspect nextcloud-aio-borgbackup and filter for its exit code. If the code is 0 then the backup was successful.

But actually the recommended way (instead of altering some mastercontainer config) would be this: GitHub - nextcloud/all-in-one: The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

I will try with docker inspect.

Unfortunately, as I mentioned before, there isn’t a way to do weekly backups in AIO interface.

A weekly backup option would be nice indeed. Could be an option to choose between daily and weekly. Any idea if this can be done manually, like trigger the Borg container with a cron job or something to run once a week?

I am testing with this and will update if it worked correctly.

Just set up a cron job to run this once a week, following the docs https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-to-stopstartupdate-containers-or-trigger-the-daily-backup-from-a-script-externally

sudo docker exec -it --env DAILY_BACKUP=1 --env START_CONTAINERS=1 nextcloud-aio-mastercontainer /daily-backup.sh