README: Properly fix typo.
[metastore.git] / README
blob427f18749d0ee87482bbd50bc2aa6dd6ad75d971
1 metastore
2 =========
4 metastore is a tool to store the metadata of files/directories/links in
5 a file tree to a separate file and to later compare and apply the stored
6 metadata to said file tree.
8 It was written as a supplement to git which does not store all metadata,
9 making it unsuitable for e.g. storing /etc in a repository.
11 metastore can also be helpful if you want to create a tarball of a file
12 tree and make sure that "everything" (e.g. xattrs, mtime, owner, group)
13 is stored along with the files.
16 This metastore is unofficial continuation of the original metastore
17 application created by David Härdeman (who no longer maintains it).
20 Stored metadata
21 ---------------
23 metastore stores following metadata in its files:
25 - owner,
26 - group,
27 - permissions,
28 - xattrs,
29 - mtime - optionally.
32 Usage
33 -----
35 See the manual page (metastore.1) for details on usage.
38 File format
39 -----------
41 Following sections explain internals of metastore file (.metadata).
44 ### Data types
46     CSTRING     = NUL-terminated binary string
47     BSTRING(N)  = binary string of length N
48     INT(N)      = N byte integer in big endian byte order
51 ### File layout
53     HEADER
54     N * ENTRY
57 ### HEADER format
59     BSTRING(10) - Magic header - "MeTaSt00r3"
60     BSTRING(8)  - Version - "\0\0\0\0\0\0\0\0" (currently)
63 ### ENTRY format
65     CSTRING     - Path  (absolute or relative)
66     CSTRING     - Owner (owner name, not uid)
67     CSTRING     - Group (group name, not gid)
69     INT(8)      - Mtime (seconds)
70     INT(8)      - Mtime (nanoseconds)
71     INT(2)      - Mode  (st_mode from struct stat st_mode AND 0177777,
72                          i.e. unix permissions and type of file)
74     INT(4)      - num_xattrs
75     FOR (i = 0; i < num_xattrs; i++) {
76         CSTRING            - xattr name
77         INT(4)             - xattrlen
78         BSTRING(xattrlen)  - xattr value
79     }
82 License
83 -------
85 The project is licensed under the terms of the GNU GPL v2 only license.
86 See LICENSE.GPLv2 file for the full license text.
89 Bug reports
90 -----------
92 Please use the issue tracker provided by GitHub to send bug reports
93 or feature requests.
95 https://github.com/przemoc/metastore/issues