Skip to content

Commit 5fd46ab

Browse files
committed
update README
1 parent 4220b51 commit 5fd46ab

File tree

1 file changed

+53
-19
lines changed

1 file changed

+53
-19
lines changed

README.md

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,43 @@
1-
I make every 5 minutes a snapshot from my ZFS filesystem (keep it for 1 day).
1+
# Background
2+
3+
I make every 5 minutes a snapshot (keep it for 1 day) and once a day for long term (keep it for one month) from my home partition on a ZFS filesystem.
24
If i messed up a file, i need to search a clean state from the file in the snapshots - not always easy if don't realize it directly.
35

4-
`zfs-snap-diff` is a little standalone tool (one executable with all inside) to help me for such cases.
6+
`zfs-snap-diff` is a little tool to help me for such cases.
7+
8+
9+
# Description
10+
11+
With `zfs-snap-diff` you can explore file differences from different zfs snapshots.
12+
13+
14+
`zfs-snap-diff` has a web frontend, so it can run on your local work machine or on your remote file / backup server (no Xserver necesarry).
15+
16+
To keep it protable and independent, it's made as a single executable with all html / js stuff included.
17+
The backend is implemented in golang, the frontend with [angularjs](https://angularjs.org), [bootstrap](http://getbootstrap.com) and [jsdifflib](https://github.com/cemerick/jsdifflib).
18+
19+
20+
21+
*!! it's in a very early dev state - only tested on FreeBSD !!*
522

6-
!! it's in a very early dev state - only tested on FreeBSD !!
723

824

925
#Usage
1026

27+
28+
### Startup a server instance
29+
30+
./zfs_snap_diff <ZFS_NAME>
31+
32+
### Connect with your web browser
33+
34+
http://localhost:12345
35+
1136
### Search a file
1237

1338
Search a file in the file browser.
1439

15-
![File Browser](doc/zsd-file-browser.png)
40+
![File browser](doc/zsd-file-browser.png)
1641

1742
### Select a file
1843

@@ -33,9 +58,17 @@ When you select a snapshot, and
3358

3459
![File Diff](doc/zsd-snap-selected.png)
3560

36-
----
3761

38-
If you download a file from a snapshot, the generated name are: `<ORG_FILE_NAME>-<SNAPSHOT_NAME>.<FILE_SUFFIX>`.
62+
63+
#Notes
64+
65+
* if you download a file from a snapshot, the generated file name has the snapshot name included:
66+
67+
<ORG_FILE_NAME>-<SNAPSHOT_NAME>.<FILE_SUFFIX>
68+
69+
* for snapshot differences, you need to set the diff permission:
70+
71+
zfs allow -u <USER_NAME> diff <ZFS_NAME>
3972

4073

4174

@@ -46,50 +79,51 @@ If you download a file from a snapshot, the generated name are: `<ORG_FILE_NAME>
4679

4780
* clone the repository
4881

49-
git clone github.com/j-keck/zfs-snap-diff
82+
git clone github.com/j-keck/zfs-snap-diff
5083

5184
* change into the project directory
5285

53-
cd zfs-snap-diff
86+
cd zfs-snap-diff
5487

5588
* init submodule
5689

57-
git submodule init
90+
git submodule init
5891

5992
* update submodule
6093

61-
git submodule update
94+
git submodule update
6295

6396
* generate golang src from static web content (this generates bindata.go)
6497

65-
go-bindata webapp/...
98+
go-bindata webapp/...
6699

67100
* build it
68101

69-
go build -ldflags "-X main.VERSION $(git describe)"
102+
go build -ldflags "-X main.VERSION $(git describe)"
70103

71104

72105

73106
# Run:
74107

75-
`./zfs-snap-diff <ZFS_NAME>`
76-
77-
* starts a web server on port 127.0.0.1:12345
78-
* all html / javascript files included (including bootstrap, jquery, angularjs, jsdifflib)
108+
./zfs-snap-diff <ZFS_NAME>
79109

110+
* starts a web server on port http://127.0.0.1:12345
111+
* check `-h` for currently supported parameters
80112

81113

82114
### for dev:
83115

84-
`ZSD_SERVE_FROM_WEBAPPS=YES ./zfs-snap-diff <ZFS_NAME>`
116+
ZSD_SERVE_FROM_WEBAPPS=YES ./zfs-snap-diff <ZFS_NAME>
85117

86-
* serve static content from webapps dir (for dev)
118+
* serve static content from webapps dir
87119

120+
121+
88122
# Changelog
89123

90124
###0.0.X###
91125
0.0.2 :
92-
* config frontent from server
126+
* partial frontend configuration from server
93127
* fix firefox ui
94128

95129

0 commit comments

Comments
 (0)