backup icon indicating copy to clipboard operation
backup copied to clipboard

Various Differentials Marked as "Orphans"

Open jxmx opened this issue 3 years ago • 14 comments

I've had next-cloud backup running for about a month without doing anything to it. I now have a fair number of differential backups that are marked "orphans". As far as I can tell, the full that is the root of each differential is present and intact. Also, every backup is marked as unverified as reported in #114. Here's what I'm seeing: image

image

Doing a 'backup:point:scan' doesn't resolve any issues. I am using "external" storage to a second physical volume on the server. However interestingly if I do a 'backup:external:list' I get an error:

image

The "External:10" location is the local filesystem /data/nextcloud-backups. The all_data is configured to /data/nextcloud-backups/app_data and restore points is /data/nextcloud-backups/restore-points.

jxmx avatar Jan 12 '22 19:01 jxmx

did you delete some of the backups from the local storage ?

backup:point:scan - only looks for the restore points and adds it to the list backup:point:detail - is the correct one - it should check the validity

mastermns avatar Jan 12 '22 19:01 mastermns

No files have been manually deleted or modified.

I just ran a few backup:point:detail runs and some of them cleaned themselves up. However there are still two that are marked as orphans even though their parent is present and valid:

image

jxmx avatar Jan 12 '22 19:01 jxmx

The problem is most likely that the "real" parent (the one on local) is not there anymore. So the main question is where are the local full backups

mastermns avatar Jan 12 '22 19:01 mastermns

I'm not sure how to answer that question. The backups are configured, as I understand it, to use an "External Storage" target which is basically a volume outside of the main NextCloud data repository. Other than set that up for for app_data and restore-points, I've not configured anything.

jxmx avatar Jan 12 '22 19:01 jxmx

Can you share a screenshot of your configuration ?

mastermns avatar Jan 12 '22 20:01 mastermns

1 2 3

jxmx avatar Jan 12 '22 20:01 jxmx

It looks right from the configuration. To me it seems like the retention policy does not work correctly.

mastermns avatar Jan 12 '22 20:01 mastermns

Is "local" supposed to be the files in /data/nextcloud-backups/app_data and "external:10" what's in /data/nextcloud-backups/restore-points?

jxmx avatar Jan 12 '22 20:01 jxmx

yes correct

mastermns avatar Jan 12 '22 20:01 mastermns

Well, the on-disk contents of those locations are very different. The "local" copies of some of the backups were present but had been lost from the database. I cleaned up the backup list with backup:point:delete and then removed files from the "local" location so everything matches. But something is definitely getting lost. I'll continue to monitor.

jxmx avatar Jan 12 '22 20:01 jxmx

As mentioned in #166, I reset everything about this app back to default, cleaned out the filesystems, and started over. I'm still seeing where a differential is marked as an orphan:

image

It's not clear why the full "local" version is gone because it still exists on disk. If I do a occ backup:point:scan, it interestingly adds a completely unlisted differential (that is also unpacked?) but don't tag the full that's still there:

image

Note that I have not hand-manipulated anything on disk.

jxmx avatar Jan 21 '22 20:01 jxmx

`# ls -l /data/nextcloud/appdata_oc5iubnfxmw8/backup/

total 0

drwxr-xr-x 1 www-data www-data 18 Jan 15 20:10 20220112210315-full-VYze62qEs2pUolW

drwxr-xr-x 1 www-data www-data 154 Jan 15 16:55 20220115215502-differential-t8LIUJGOQS8WOoo

drwxr-xr-x 1 www-data www-data 154 Jan 18 20:15 20220119011502-differential-9DwykRQ6dgSJtH5 `

jxmx avatar Jan 21 '22 20:01 jxmx

After doing a lot of testing, the root cause of this is definitely #177.

jxmx avatar Feb 05 '22 13:02 jxmx

See pull request #183

jxmx avatar Feb 05 '22 21:02 jxmx