Cleanup help message
[metastore/portable.git] / README
blob46878dd424674597c714d2a6576eba07b16f32ae
1 metastore stores or restores metadata (owner, group, permissions, xattrs
2 and optionally mtime) for a filesystem tree.
4 See the manpage (metastore.1) for more details.
6 The file format of the .metastore files is as follows:
8 Data types
9 ----------
11 CSTRING = NULL-terminated binary string
13 BSTRING(N) = binary string of length N
15 INT(N) = N byte integer in big endian byte order
18 File format
19 -----------
20 HEADER
21 N * ENTRY
24 HEADER format
25 -------------
26 BSTRING(10) - Magic header - "MeTaSt00r3"
27 BSTRING(8)  - Version - "\0\0\0\0\0\0\0\0" (currently)
30 ENTRY format
31 ------------
32 CSTRING - Path (absolute or relative)
33 CSTRING - Owner (owner name, not uid)
34 CSTRING - Group (group name, not gid)
36 INT(8)  - Mtime (seconds)
37 INT(8)  - Mtime (nanoseconds)
38 INT(2)  - Mode (st_mode from struct stat st_mode AND 0177777,
39                 i.e. unix permissions and type of file)
41 INT(4)  - num_xattrs
42 FOR (i = 0; i < num_xattrs; i++) {
43     CSTRING           - xattr name
44     INT(4)            - xattrlen
45     BSTRING(xattrlen) - xattr value