Hi,
I installed NextCloud AIO successfully and everything is working fine, including starting the (borg)backup by manually pushing the button “create backup” at the interface or via the “docker exec …” command starting the daily-backup.sh of the master container.
But if I try to use the automatic, daily backup option and configure to start the daily backup at e.g. 04:00 in the night, then simply nothing happens!
How can I analyse what’s going wrong or how is that daily backup typically scheduled?
Hi, can you change that setting to a time in ca. 5min and check if it works? (You dont need to wait for 04:00 each time…) also the mastercontainer logs would be really helpful for debugging after testing that.
strange - this backup (15:15 UTC) worked fine!
The time can be found inside the file daily_backup_time after configuring it via the interface, but I’m pretty sure, that also 04:00 was mentioned there in the past.
Which log file and where to find it will help to analyse the problem?
And what mechanism is used to start the borg Backup? (cron, but in which container/user and can I check via crontab?)
Hmm, still no luck this night at 04:00. But it seems the backup was started - but then unfortunately failed.
The logs of the above command show this:
[Sat Jan 21 16:38:38.973430 2023] [core:notice] [pid 89] AH00094: Command line: 'apache2 -D FOREGROUND'
Deleting duplicate sessions
Daily backup script has started
Starting mastercontainer update...
(The script might get exited due to that. In order to update all the other containers correctly, you need to run this script with the same settings a second time.)
Waiting for watchtower to stop
Creating daily backup...
Starting and updating containers...
Waiting for the Nextcloud container to start
Sending backup notification...
Daily backup script has finished
Total reclaimed space: 0B
++ head -1 /mnt/docker-aio-config/data/daily_backup_time
+ BACKUP_TIME=04:00
+ export BACKUP_TIME
+ export DAILY_BACKUP=1
+ DAILY_BACKUP=1
++ sed -n 2p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' automaticUpdatesAreNotEnabled ']'
+ export AUTOMATIC_UPDATES=1
+ AUTOMATIC_UPDATES=1
+ set +x
Deleting duplicate sessions
and this time borg backup created this error log:
Performing backup...
Starting the backup...
Failed to create/acquire the lock /mnt/borgbackup/borg/lock (timeout).
Deleting the failed backup archive...
Failed to create/acquire the lock /mnt/borgbackup/borg/lock (timeout).
Backup failed!
Inside the backup data directory itself I can find this file:
-rw------- 1 root root 57 22. Jan 05:01 lock.roster
Thanks for your help! borg break-lock removed the lock-file!
Then tried a scheduled backup again on 14:08 UTC and this one succeeded, but mentioned, that the containers got an update (I was carefully watching the status during the backup).
Finally the logs show a successful backup and this time no lock file remains.
Maybe I saw a side effect of what is described here regarding the automatic update?
Entered now again 04:00 UTC for the next backup and will check what the results are tomorrow
The mastercontainer should handle this correctly for you so you should not run into a problem with the backup. It is only important to know if you schedule backups externally using this endpoint.