Makefile cleanups.
[cumulus.git] / format.txt
1                        Backup Format Description
2                   for an LFS-Inspired Backup Solution
3
4 NOTE: This is simply a proposal at this point in time, and not yet
5 implemented.  Details are subject to change.
6
7 ========================================================================
8
9 Goals: To provide a stable and extensible data storage format for
10 efficient remote filesystem backups.  Among the features desired in the
11 format are:
12   - Support for grouping unchanging file contents together, and reusing
13     it for future backups.
14   - Nonetheless allow old backups to be deleted (at least those parts
15     that are not also used by newer backups).
16   - Support some form of rdiff-style incremental differences within a
17     file.
18 The current plan is to implement compression and encryption separately:
19 not as part of the base format, but simply by passing the backup data
20 through filters such as bzip2 or gpg.
21
22 Data is organized into a collection of _objects_, which are grouped
23 together for storage purposes into _segments_.  Objects may refer to
24 other objects; a snapshot consists of a tree object which in turn refers
25 to other objects containing file data.  A new snapshot may be created
26 which refers to some of the old objects with file data, if those files
27 have not changed.
28
29 ========================================================================
30
31 Object naming:
32   - Each segment is assigned a unique 128-bit identifier (uuid).  Each
33     segment is stored as a separate file whose name is based on its
34     uuid.
35   - Objects within a segment are numbered, using a 32-bit counter.
36
37 Each segment is structured as a TAR file (optionally filtered through a
38 compressor such as gzip/bzip2, or encrypted).  Objects are stored as
39 individual files.
40
41 File attributes: Metadata for each file is stored in a dictionary.
42 Dictionary keys include:
43     type: uint8_t ('p', 's', 'c', 'b', 'l', 'd', '-')
44     mode: uint16_t
45     user: uint32_t
46     group: uint32_t
47     size: int64_t
48     atime: int64_t
49     mtime: int64_t
50     ctime: int64_t