Snapshots for versioning - radumarias/rfs GitHub Wiki
This is to allow access to previous versions of the files. Maybe we can use Git-LFS or something similar. We should also replicate the snapshots and use error correction codes to check integrity over time and restore them.
We could also use something like Btrfs or implement similar logic as it has these nice features
- Because of Btrfs’s CoW design, creating a snapshot (a read-only view of a subvolume at a given point in time) is virtually instantaneous and initially consumes almost no additional space. Only when data changes do the old blocks remain associated with the snapshot, and the new data blocks are written fresh, making snapshots space-efficient and allowing for quick rollbacks or backups.
- Checksums and Data Integrity: Every data and metadata block in Btrfs is checksummed using a strong hash (usually CRC32C by default, with support for others at the block level). When data is read, the checksum is verified against the stored value in the checksum tree. If a block’s integrity is compromised (e.g., due to bit rot), Btrfs can detect the error. If redundant copies exist (such as in RAID configurations), Btrfs attempts to use a good copy to self-heal the data.