Skip to content

Commit be66f80

Browse files
committed
update site
1 parent db08ea4 commit be66f80

File tree

10 files changed

+199
-142
lines changed

10 files changed

+199
-142
lines changed

README.org

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,59 @@
11
* ~zfs-snap-diff~
22

3-
This branch contains the next ~zfs-snap-diff~ version: ~1.0.0~.
4-
It's a complete rewrite:
3+
helps you with your zfs snapshots.
54

6-
- backend is implemented in [[https://golang.org][Go]] (as before)
7-
- frontend in [[http://purescript.org][PureScript]] (with [[https://pursuit.purescript.org/packages/purescript-react-basic][react-basic]])
5+
** Documentation
86

9-
For more information see: [[https://j-keck.github.io/zfs-snap-diff/]]
7+
See the [[https://j-keck.github.io/zfs-snap-diff/][website]] for more details.
108

11-
** Prebuild
9+
** Get it
1210

13-
You can download a prebuild version from: [[https://j-keck.github.io/zfs-snap-diff/docs/install]]
11+
*** Prebuild
1412

15-
** Build from source
13+
You can download a prebuild version from: [[https://j-keck.github.io/zfs-snap-diff/docs/install]]
1614

17-
You need only ~go~ to build this project.
18-
I compile the frontend code to javascript and decode it in ~pkg/webapp/bindata.go~.
15+
*** Build from source
1916

20-
*** Build with ~go~
17+
The backend from ~zfs-snap-diff~ is implemented in [[https://golang.org][Go]], the frontend in [[http://purescript.org][PureScript]].
2118

22-
- clone this repo: ~git clone -b dev https://github.com/j-keck/zfs-snap-diff~
23-
- change to the checkout directory: ~cd zfs-snap-diff~
24-
- build it: ~go build -ldflags="-X main.version=$(git describe)" ./cmd/zfs-snap-diff~
19+
**** Build with ~go~
2520

26-
The optional ~-ldflags="-X main.version=$(git describe)"~ flag updates the ~version~ string in the binary.
21+
I use [[https://github.com/go-bindata/go-bindata][go-bindata]] to decode the frontend code and all dependencies to a
22+
go source file so you need only the go compiler to compile it yourself.
2723

28-
*** Build with ~nix~
24+
The minimum supported go version is =go1.12=.
2925

30-
The ~nix~ build also compiles the frontend to javascript and decode it in ~pkg/webapp/bindata.go~.
26+
- clone this repo: ~git clone https://github.com/j-keck/zfs-snap-diff~
27+
- ~cd zfs-snap-diff~
28+
- build it: ~go build -ldflags="-X main.version=$(git describe)" ./cmd/zfs-snap-diff~
3129

32-
- clone this repo: ~git clone -b dev https://github.com/j-keck/zfs-snap-diff~
33-
- change to the checkout directory: ~cd zfs-snap-diff~
34-
- build it: ~nix-build -A zfs-snap-diff~
30+
The optional ~-ldflags="-X main.version=$(git describe)"~ flag updates the ~version~ string in the binary.
3531

36-
To crosscompile the binary for
3732

38-
- FreeBSD: ~nix-build -A zfs-snap-diff --argstr goos freebsd~
39-
- MacOS: ~nix-build -A zfs-snap-diff --argstr goos darwin~
40-
- Solaris: ~nix-build -A zfs-snap-diff --argstr goos solaris~
33+
**** Build with ~nix~
34+
35+
I use [[https://nixos.org/nix/][nix]] to build my projects. The ~nix~ build also compiles the frontend
36+
to javascript and decode it in ~pkg/webapp/bindata.go~.
37+
38+
- clone this repo: ~git clone https://github.com/j-keck/zfs-snap-diff~
39+
- ~cd zfs-snap-diff~
40+
- build it: ~nix-build -A zfs-snap-diff~
41+
42+
The build artifacts ~zfs-snap-diff~ and ~zsd~ are in ~./result/bin/~.
43+
44+
To crosscompile the binary for
45+
46+
- FreeBSD: ~nix-build -A zfs-snap-diff --argstr goos freebsd~
47+
- MacOS: ~nix-build -A zfs-snap-diff --argstr goos darwin~
48+
- Solaris: ~nix-build -A zfs-snap-diff --argstr goos solaris~
4149

4250

4351
** Run it
4452

45-
~./zfs-snap-diff <POOL>~
53+
#+BEGIN_SRC sh
54+
./zfs-snap-diff [OPTIONS] <ZFS_DATASET_NAME>
55+
#+END_SRC
56+
57+
This starts a embedded webserver and serves the included web-app at http://127.0.0.1:12345.
4658

4759
[[./doc/site/static/images/browse-filesystem.png][file:./doc/site/static/images/browse-filesystem.png]]

cmd/zfs-snap-diff/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type CliConfig struct {
2525
func main() {
2626
zfsSnapDiffBin := os.Args[0]
2727
flag.Usage = func() {
28-
fmt.Fprintf(os.Stderr, "zfs-snap-diff - web application to find older versions of a given file in your zfs snapshots.\n")
28+
fmt.Fprintf(os.Stderr, "zfs-snap-diff - web application to find older file versions zfs snapshot and zfs snapshot management tool.\n")
2929
fmt.Fprintf(os.Stderr, "\nUSAGE:\n %s [OPTIONS] <ZFS_DATASET_NAME>\n\n", zfsSnapDiffBin)
3030
fmt.Fprint(os.Stderr, "OPTIONS:\n")
3131
flag.PrintDefaults()

doc/site/content/_index.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,32 @@ creator = "Emacs 26.3 (Org mode 9.1.9 + ox-hugo)"
66
weight = 10
77
+++
88

9-
{{< hint danger >}}
10-
This describes the currently ****unreleased beta version****.
11-
{{< /hint >}}
9+
`zfs-snap-diff` helps you with your zfs snapshots.
10+
11+
12+
## Find file versions {#find-file-versions}
1213

1314
`zfs-snap-diff` searches different file versions in your zfs snapshots for you.
1415

1516
If you have hundreds or thousands of zfs snapshots, `zfs-snap-diff` searched
1617
the snapshots and shows you only the snapshots where a given file was modified.
1718

18-
To speedup this process, it performs the search incremental when you request an older file version.
19-
2019
You can inspect a diff from the actual file version to the older file version in the
2120
snapshot, revert a single change or restore a whole file.
2221

23-
`zfs-snap-diff` has a web frontend, so it can run on your local work machine or on your
22+
23+
## Management {#management}
24+
25+
You can create and destroy zfs snapshots, use the integrated directory browser to
26+
navigate in your snapshots (directory history) and download a directory as a zip-archive.
27+
28+
29+
## Simply use {#simply-use}
30+
31+
[`zfs-snap-diff`](/docs/zfs-snap-diff) has a web frontend, so it can run on your local work machine or on your
2432
remote file / backup server (no Xserver necesarry). To keep it portable it's made
2533
as a single static compiled executable.
2634

35+
For a quick file version lookup / restore in the terminal, it contains the independent [`zsd`](/docs/zsd) cli tool.
36+
2737
{{< figure src="/images/zfs-snap-diff.gif" alt="Example session from zfs-snap-diff" link="/images/zfs-snap-diff.gif" >}}

doc/site/content/docs/changelog.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ creator = "Emacs 26.3 (Org mode 9.1.9 + ox-hugo)"
55
weight = 50
66
+++
77

8-
## 1.0.0-beta (unreleased) {#1-dot-0-dot-0-beta--unreleased}
8+
## 1.0.0 {#1-dot-0-dot-0}
99

1010
{{< hint info >}}
1111
This version is a complete rewrite.
1212

1313
The backend is implemented in [Go](https://golang.org) (as before) and the frontend in [PureScript](http://purescript.org).
1414
{{< /hint >}}
1515

16+
If you have any questions, trouble or other input, feel free to open an
17+
issue, contact me per mail (see my github profile), or [keybase.io](https://keybase.io/jkeck).
18+
1619
- create and destroy snapshots from the webapp
1720

1821
- download a complete directory as a zip-archive
@@ -29,7 +32,7 @@ The backend is implemented in [Go](https://golang.org) (as before) and the front
2932

3033
- works now also with 'legacy' mountpoints
3134

32-
[all commits from 0.0.10...dev](https://github.com/j-keck/zfs-snap-diff/compare/0.0.10...dev)
35+
[all commits from 0.0.10...1.0.0](https://github.com/j-keck/zfs-snap-diff/compare/0.0.10...1.0.0)
3336

3437

3538
## 0.0.10 {#0-dot-0-dot-10}

doc/site/content/docs/configuration.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if it does not find a configuration, it will create the following default config
2929

3030
```text
3131
use-cache-dir-for-backups = true
32-
days-to-scan = 7
32+
days-to-scan = 2
3333
max-archive-unpacked-size-mb = 200
3434
snapshot-name-template = "zfs-snap-diff-%FT%H:%M"
3535
compare-method = "auto"
@@ -48,10 +48,7 @@ diff-context-size = 5
4848
```
4949

5050

51-
## Keys {#keys}
52-
53-
54-
### `use-cache-dir-for-backups` {#use-cache-dir-for-backups}
51+
## `use-cache-dir-for-backups` {#use-cache-dir-for-backups}
5552

5653
If it's set to `true`, the file backups will be stored in the users cache-directory.
5754

@@ -64,18 +61,23 @@ If it's set to `true`, the file backups will be stored in the users cache-direct
6461
If it's `false`, it will create the backup file under the actual directory in the `./zfs-snap-diff/` folder.
6562

6663

67-
### `days-to-scan` {#days-to-scan}
64+
## `days-to-scan` {#days-to-scan}
65+
66+
To speedup the scan for other file versions, `zfs-snap-diff` performs the scan incremental
67+
when you request an older file version. This parameter determines how many days are scanned
68+
if you request a older versions.
6869

69-
Configures the day range for each scan. If you have a many daily snapshots set this to `1`.
7070

71+
## `max-archive-unpacked-size-mb` {#max-archive-unpacked-size-mb}
7172

72-
### `max-archive-unpacked-size-mb` {#max-archive-unpacked-size-mb}
73+
The maximal (unpacked) archive size is restricted by default.
74+
Set this to `-1` to allow disable this restriction.
7375

74-
Maximal unpacked archive size in megabytes.
75-
Set this to `-1` to disable the size-check.
7676

77+
## `snapshot-name-template` {#snapshot-name-template}
7778

78-
### `snapshot-name-template` {#snapshot-name-template}
79+
Snapshot name template. Used to create snapshots in the web-app.
80+
The template supports the following format sequences:
7981

8082
```text
8183
Format sequences are alike the `date` command
@@ -92,48 +94,48 @@ Format sequences are alike the `date` command
9294
```
9395

9496

95-
### `compare-method` {#compare-method}
97+
## `compare-method` {#compare-method}
9698

97-
Method how to determine two file versions are the same version.
99+
Used compare method to find different file versions.
98100
This is used when scanning the zfs snapshots to determine
99-
a file was changed in a snapshot.
101+
if a file was modified in a snapshot.
100102

101103

102-
#### auto {#auto}
104+
### auto {#auto}
103105

104106
Uses `md5` for text files and `size+mtime` for others
105107

106108

107-
#### size {#size}
109+
### size {#size}
108110

109111
If two files versions have the same filesize,
110112
it's interpreted as the same version.
111113

112114

113-
#### mtime {#mtime}
115+
### mtime {#mtime}
114116

115117
If two files versions have the same mtime,
116118
it's interpreted as the same version.
117119

118120

119-
#### size+mtime {#size-plus-mtime}
121+
### size+mtime {#size-plus-mtime}
120122

121123
If two files versions have the same size AND mtime,
122124
it's interpreted as the same version.
123125

124126

125-
#### content {#content}
127+
### content {#content}
126128

127129
If two files versions have the same content,
128130
it's interpreted as the same version.
129131

130132

131-
#### md5 {#md5}
133+
### md5 {#md5}
132134

133135
If two files versions have the same md5 sum,
134136
it's interpreted as the same version.
135137

136138

137-
### `diff-context-size` {#diff-context-size}
139+
## `diff-context-size` {#diff-context-size}
138140

139141
Diff context size in the webui.

doc/site/content/docs/install.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,45 @@ creator = "Emacs 26.3 (Org mode 9.1.9 + ox-hugo)"
55
weight = 20
66
+++
77

8-
{{< hint danger >}}
9-
This describes the currently ****unreleased beta version****.
10-
{{< /hint >}}
8+
## Binary packages {#binary-packages}
119

10+
{{< hint warning >}}
11+
This is the first release after a complete rewrite. You find older versions on the [GitHub release page](https://github.com/j-keck/zfs-snap-diff/releases).
1212

13-
## Binary packages {#binary-packages}
13+
If you have any questions, trouble or other input, feel free to open an
14+
issue, contact me per mail (see my github profile), or [keybase.io](https://keybase.io/jkeck).
15+
{{< /hint >}}
1416

15-
You can download the latest binary package from here or
16-
from the [githup release page](https://github.com/j-keck/zfs-snap-diff/releases).
17+
{{< hint info >}}
18+
The tar archive contains currently only the executables. In the following releases
19+
i will provide distribution specific packages.
20+
{{< /hint >}}
21+
22+
You can download the latest binary package from here or from the [GitHub release page](https://github.com/j-keck/zfs-snap-diff/releases).
1723

18-
{{<tabs "install">}}{{< tab "Linux" >}}
24+
{{<tabs "install">}}
25+
{{< tab "Linux" >}}
1926
Download the beta version for ****Linux amd64**** here:
2027

21-
[zfs-snap-diff-linux-v1.0.0-beta-16-g1bae2c4.tgz](/zfs-snap-diff-linux-v1.0.0-beta-16-g1bae2c4.tgz)
28+
[zfs-snap-diff-linux-v1.0.0.tgz](https://github.com/j-keck/zfs-snap-diff/releases/download/v1.0.0/zfs-snap-diff-linux-v1.0.0.tgz)
2229
{{< /tab >}}
2330

2431
{{< tab "FreeBSD" >}}
2532
Download the beta version for ****FreeBSD amd64**** here:
2633

27-
[zfs-snap-diff-freebsd-v1.0.0-beta-16-g1bae2c4.tgz](/zfs-snap-diff-freebsd-v1.0.0-beta-16-g1bae2c4.tgz)
34+
[zfs-snap-diff-freebsd-v1.0.0.tgz](https://github.com/j-keck/zfs-snap-diff/releases/download/v1.0.0/zfs-snap-diff-freebsd-v1.0.0.tgz)
2835
{{< /tab >}}
2936

3037
{{< tab "macOS" >}}
3138
Download the beta version for ****macOS amd64**** here:
3239

33-
[zfs-snap-diff-darwin-v1.0.0-beta-16-g1bae2c4.tgz](/zfs-snap-diff-darwin-v1.0.0-beta-16-g1bae2c4.tgz)
40+
[zfs-snap-diff-darwin-v1.0.0.tgz](https://github.com/j-keck/zfs-snap-diff/releases/download/v1.0.0/zfs-snap-diff-darwin-v1.0.0.tgz)
3441
{{< /tab >}}
3542

3643
{{< tab "Solaris" >}}
3744
Download the beta version for ****Solaris amd64**** here:
3845

39-
[zfs-snap-diff-solaris-v1.0.0-beta-16-g1bae2c4.tgz](/zfs-snap-diff-solaris-v1.0.0-beta-16-g1bae2c4.tgz)
46+
[zfs-snap-diff-solaris-v1.0.0.tgz](https://github.com/j-keck/zfs-snap-diff/releases/download/v1.0.0/zfs-snap-diff-solaris-v1.0.0.tgz)
4047
{{< /tab >}}
4148

4249
{{< /tabs >}}
@@ -53,15 +60,18 @@ platform, feel free to contact me!
5360

5461
## Build from source {#build-from-source}
5562

56-
You need only [go](https://go-lang.org) to build this project.
63+
The backend from `zfs-snap-diff` is implemented in [Go](https://golang.org), the frontend in [PureScript](http://purescript.org).
5764

5865

5966
### `go` {#go}
6067

68+
I use [go-bindata](https://github.com/go-bindata/go-bindata) to decode the frontend code and all dependencies to a
69+
go source file so you need only the go compiler to compile it yourself.
70+
6171
The minimum supported go version is `go1.12`.
6272

63-
- clone this repo: `git clone -b dev https://github.com/j-keck/zfs-snap-diff`
64-
- change to the checkout directory: `cd zfs-snap-diff`
73+
- clone this repo: `git clone https://github.com/j-keck/zfs-snap-diff`
74+
- `cd zfs-snap-diff`
6575
- build it: `go build -ldflags="-X main.version=$(git describe)" ./cmd/zfs-snap-diff`
6676

6777
The optional `-ldflags="-X main.version=$(git describe)"` flag updates the `version` string in the binary.

doc/site/content/docs/zfs-snap-diff.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ creator = "Emacs 26.3 (Org mode 9.1.9 + ox-hugo)"
55
weight = 30
66
+++
77

8-
{{< hint danger >}}
9-
This describes the currently ****unreleased beta version****.
10-
{{< /hint >}}
11-
12-
`zfs-snap-diff` - web application to find older versions of a given file in your zfs snapshots.
8+
`zfs-snap-diff` - web application to find older file versions in zfs snapshots and zfs snapshot management tool.
139

1410
With `zfs-snap-diff` you can
1511

@@ -38,7 +34,7 @@ With `zfs-snap-diff` you can
3834

3935
```text
4036
main⟩ zfs-snap-diff -h
41-
zfs-snap-diff - web application to find older versions of a given file in your zfs snapshots.
37+
zfs-snap-diff - web application to find older file versions in zfs snapshots and zfs snapshot management tool.
4238
4339
USAGE:
4440
./zfs-snap-diff [OPTIONS] <ZFS_DATASET_NAME>
@@ -53,7 +49,7 @@ OPTIONS:
5349
-d int
5450
days to scan (default 7)
5551
-diff-context-size int
56-
show N lines before and after each diff (default 5)
52+
show N lines before and after each diff (default 2)
5753
-key string
5854
TLS private key file
5955
-l string
@@ -92,7 +88,7 @@ Project home page: https://j-keck.github.io/zfs-snap-diff
9288
./zfs-snap-diff [OPTIONS] <ZFS_DATASET_NAME>
9389
```
9490

95-
This starts a embedded webserver and serves the included web-app.
91+
This starts a embedded webserver and serves the included web-app at <http://127.0.0.1:12345>.
9692

9793
- open your webbrowser at
9894

0 commit comments

Comments
 (0)