datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
560 stars 120 forks source link

Edge cases with dattobd #376

Open woodholly opened 1 month ago

woodholly commented 1 month ago

Hello, thank you for this awesome project!

Information from https://github.com/datto/dattobd/blob/main/doc/STRUCTURE.md raises several important questions:

1) If incremental "Writes are tracked in-memory and periodically synced to the index file as needed", what will happen, if system crashes right after write has settled (with sync) to the block device, and before sync to .datto log ? If I understood correctly, .datto log will be in inconsistent state with with dire consequences after reboot. Or block writes and log writes are atomically synced not only in snapshot mode, but in incremental mode too ?

2) What will happen, if COW storage becomes full ?

Swistusmen commented 1 month ago

Hi 1.AFAIK they are automatically synced, or at least saved pretty fast,so that we never had complains about it,nor expected something like this. I also recommend setting up scripts which loads dattobd to the memory automatically after reboot

  1. Next data will not be saved, unfortunately there is no nice way around it, but there are works on that topic
woodholly commented 1 month ago

Hello @Swistusmen If "they are automatically synced" it will be consistent, if "at least saved pretty fast" it will be inconsistent, especially in high disk load. These strategies are mutually exclusive :)