2013-03-26 20:32:28 +00:00
|
|
|
RBD Incremental Backup
|
|
|
|
======================
|
|
|
|
|
|
|
|
This is a simple streaming file format for representing a diff between
|
|
|
|
two snapshots (or a snapshot and the head) of an RBD image.
|
|
|
|
|
|
|
|
Header
|
2013-03-29 04:19:32 +00:00
|
|
|
~~~~~~
|
2013-03-26 20:32:28 +00:00
|
|
|
|
2014-04-24 07:42:35 +00:00
|
|
|
"rbd diff v1\\n"
|
2013-03-26 20:32:28 +00:00
|
|
|
|
2013-03-29 04:19:32 +00:00
|
|
|
Metadata records
|
|
|
|
~~~~~~~~~~~~~~~~
|
2013-03-26 20:32:28 +00:00
|
|
|
|
2013-03-29 04:19:32 +00:00
|
|
|
Every record has a one byte "tag" that identifies the record type,
|
|
|
|
followed by some other data.
|
|
|
|
|
|
|
|
Metadata records come in the first part of the image. Order is not
|
|
|
|
important, as long as all the metadata records come before the data
|
|
|
|
records.
|
2013-03-26 20:32:28 +00:00
|
|
|
|
|
|
|
From snap
|
|
|
|
---------
|
|
|
|
|
2013-06-05 00:23:52 +00:00
|
|
|
- u8: 'f'
|
|
|
|
- le32: snap name length
|
|
|
|
- snap name
|
2013-03-26 20:32:28 +00:00
|
|
|
|
|
|
|
To snap
|
|
|
|
-------
|
|
|
|
|
2013-06-05 00:23:52 +00:00
|
|
|
- u8: 't'
|
|
|
|
- le32: snap name length
|
|
|
|
- snap name
|
2013-03-26 20:32:28 +00:00
|
|
|
|
|
|
|
Size
|
|
|
|
----
|
|
|
|
|
2013-06-05 00:23:52 +00:00
|
|
|
- u8: 's'
|
|
|
|
- u64: (ending) image size
|
2013-03-26 20:32:28 +00:00
|
|
|
|
2013-03-29 04:19:32 +00:00
|
|
|
Data Records
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
|
|
|
These records come in the second part of the sequence.
|
|
|
|
|
2013-03-26 20:32:28 +00:00
|
|
|
Updated data
|
|
|
|
------------
|
|
|
|
|
2013-06-05 00:23:52 +00:00
|
|
|
- u8: 'w'
|
|
|
|
- le64: offset
|
|
|
|
- le64: length
|
|
|
|
- length bytes of actual data
|
2013-03-26 20:32:28 +00:00
|
|
|
|
|
|
|
Zero data
|
|
|
|
---------
|
|
|
|
|
2013-06-05 00:23:52 +00:00
|
|
|
- u8: 'z'
|
|
|
|
- le64: offset
|
|
|
|
- le64: length
|
2013-03-26 20:32:28 +00:00
|
|
|
|
2013-03-29 04:19:32 +00:00
|
|
|
|
|
|
|
Final Record
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
2013-03-28 21:19:59 +00:00
|
|
|
End
|
|
|
|
---
|
|
|
|
|
2013-06-05 00:23:52 +00:00
|
|
|
- u8: 'e'
|