1# continuity
2
3[![GoDoc](https://godoc.org/github.com/containerd/continuity?status.svg)](https://godoc.org/github.com/containerd/continuity)
4[![Build Status](https://travis-ci.org/containerd/continuity.svg?branch=master)](https://travis-ci.org/containerd/continuity)
5
6A transport-agnostic, filesystem metadata manifest system
7
8This project is a staging area for experiments in providing transport agnostic
9metadata storage.
10
11Please see https://github.com/opencontainers/specs/issues/11 for more details.
12
13## Manifest Format
14
15A continuity manifest encodes filesystem metadata in Protocol Buffers.
16Please refer to [proto/manifest.proto](proto/manifest.proto).
17
18## Usage
19
20Build:
21
22```console
23$ make
24```
25
26Create a manifest (of this repo itself):
27
28```console
29$ ./bin/continuity build . > /tmp/a.pb
30```
31
32Dump a manifest:
33
34```console
35$ ./bin/continuity ls /tmp/a.pb
36...
37-rw-rw-r--      270 B   /.gitignore
38-rw-rw-r--      88 B    /.mailmap
39-rw-rw-r--      187 B   /.travis.yml
40-rw-rw-r--      359 B   /AUTHORS
41-rw-rw-r--      11 kB   /LICENSE
42-rw-rw-r--      1.5 kB  /Makefile
43...
44-rw-rw-r--      986 B   /testutil_test.go
45drwxrwxr-x      0 B     /version
46-rw-rw-r--      478 B   /version/version.go
47```
48
49Verify a manifest:
50
51```console
52$ ./bin/continuity verify . /tmp/a.pb
53```
54
55Break the directory and restore using the manifest:
56```console
57$ chmod 777 Makefile
58$ ./bin/continuity verify . /tmp/a.pb
592017/06/23 08:00:34 error verifying manifest: resource "/Makefile" has incorrect mode: -rwxrwxrwx != -rw-rw-r--
60$ ./bin/continuity apply . /tmp/a.pb
61$ stat -c %a Makefile
62664
63$ ./bin/continuity verify . /tmp/a.pb
64```
65
66
67## Contribution Guide
68### Building Proto Package
69
70If you change the proto file you will need to rebuild the generated Go with `go generate`.
71
72```console
73$ go generate ./proto
74```
75