Nextcloudpi backup auto : where is the log and why not delete older backup?


ncp-backup-auto is running on my instance, but turns out that it stop working without any notice.

The thing is that once your backup drive is almost full, or cannot store another backup, the check free space step fails and everything stops.

Why ncp-backup-auto does not delete automatically the older backup to fit a newer one ? I guess there are pros and cons but at least an option would be nice.
Because if I want to store 3 backups and I have room for about 3.9 backups it cannot continue.
The current process is to make a 4th backup and erase the oldest one if you asked to keep 3.
The alternative would be that if you don’t have room for a 4th backup, delete the oldest one (then you have 2 backups left) but the backup can continue, and you have 3 backups again.

Then, what is frustrating, is that if I don’t have the room for the 4th backup, nothing is backed up anymore and I have no notification of it, unless I check the time of the last backup file. But it does not tell me why it fails. So is there any log file where this is saved ? And could it be possible to have notification on the nextcloud panel ?

Thanks !

1 Like


best would be to open an issue on github (if you have an account) or mention the author @nachoparker in your posting so he is aware of your feature request.

or you add an admin-notification to the backup script and create a pull request for ncp.

Well, this is what I thought, but this log has only one line:

$ sudo more /var/log/ncp.log
Fri  4 Dec 06:25:02 CET 2020 - Running /etc/cron.daily/ncp-autoupdate...

I think there is an issue with different tasks overwriting this log:

pi@nextcloudpi:~ $ grep "> /var/log/ncp.log" /etc/cron*/*
/etc/cron.daily/ncp-autoupdate:exec > /var/log/ncp.log 2>&1
/etc/cron.d/ncp-backup-auto:0  3  */3  *  *  root  /usr/local/bin/ncp-backup-auto > /var/log/ncp.log 2>&1

Shouldn’t a >> /var/log/ncp.log 2>&1 be used here ?

1 Like

I am having the same issue (ncp-backup-auto skips backup because of too little free space on harddrive). I agree with jean - a feature like a notification makes sense.

Regarding the empty ncp-log i found following github-issue meanwhile: