You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* new flag: '-l' to configure the address where the
webserver listens
* example - to listen on 192.168.1.20:5555:
zfs-snap-diff -l 192.168.1.20 -p 5555
* i keep the '-a' flag for backward compatibility
Copy file name to clipboardExpand all lines: README.md
+40-39Lines changed: 40 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,24 +9,25 @@ _Next features of `zfs-snap-diff`: [feature poll](https://github.com/j-keck/zfs-
9
9
With `zfs-snap-diff` you can explore file differences and restore changes from older file versions in different zfs snapshots.
10
10
You can restore the whole file from a older version, or select single changes to revert in the 'Diff' view.
11
11
12
-
12
+
13
13
`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).
14
14
15
15
To keep it protable and independent, it's made as a single executable with all html / js stuff included.
16
16
The backend is implemented in golang, the frontend with [angularjs](https://angularjs.org), [bootstrap](http://getbootstrap.com) and [highlight.js](https://github.com/isagalaev/highlight.js).
17
17
18
18
19
-
19
+
20
20
##Usage
21
21
_under linux, you need the '-use-sudo' flag if you don't run it as root - see the options below_
22
22
23
23
### Startup a server instance
24
24
25
25
./zfs-snap-diff [OPT_ARGS] <ZFS_NAME>
26
-
26
+
27
27
* starts a web server on port http://127.0.0.1:12345
28
28
* optional arguments:
29
29
* -a: listen on all interfaces (default: listen only on localhost)
30
+
* -l: listen on the given address (default: 127.0.0.1)
30
31
* -p: web server port (default: 12345)
31
32
* -default-file-action: file action when a file is selected (default: view):
32
33
* off: no action
@@ -49,7 +50,7 @@ _under linux, you need the '-use-sudo' flag if you don't run it as root - see th
49
50
* adjust sudo rules (see [doc/etc/sudoers.d/zfs-snap-diff](https://github.com/j-keck/zfs-snap-diff/blob/master/doc/etc/sudoers.d/zfs-snap-diff))
50
51
51
52
52
-
53
+
53
54
54
55
### Connect with your web browser
55
56
@@ -59,29 +60,29 @@ _under linux, you need the '-use-sudo' flag if you don't run it as root - see th
59
60
60
61
## User guide
61
62
62
-
### Browse actual filesystem state
63
+
### Browse actual filesystem state
63
64
64
65
#### Select a dataset
65
66
66
67
Select a dataset which you would explore. If you start `zfs-snap-diff` on a dataset with no childrens, the current dataset are selected.
67
68
68
69

69
70
70
-
71
+
71
72
#### Search a file
72
-
73
+
73
74
Search a file to compare in the file browser.
74
-
75
+
75
76

76
77
77
78
78
-
79
+
79
80
#### Select a file
80
81
81
82
When a file is selected, `zsd-snap-diff` search all snapshots where the selected file was modified (it compares text files per md5, others per size+modTime).
82
-
83
+
83
84

84
-
85
+
85
86
86
87
#### Select a snapshot
87
88
@@ -94,10 +95,10 @@ View the file content from an older file version.
94
95
###### Diff
95
96
Explore file differences and pick single changes to revert.
96
97
97
-
intext diff:
98
+
intext diff:
98
99

99
100
100
-
101
+
101
102
side by side diff:
102
103

103
104
@@ -108,7 +109,7 @@ side by side diff:
108
109
#### Search a snaphot
109
110
110
111
Search a snapshot in the snapshot browser. All snapshots from the selected dataset are displayed in this view.
111
-
112
+
112
113

113
114
114
115
@@ -118,23 +119,23 @@ When a snapshot is selected, the file-browser shows the content from this snapsh
118
119
119
120

120
121
121
-
122
+
122
123
From here you can easy view / restore a deleted file.
123
-
124
+
124
125

125
126
126
127
127
-
128
+
128
129
129
130
130
131
## Installation
131
-
132
+
132
133
### Prebuild
133
134
134
135
Get a package for your platform from: https://github.com/j-keck/zfs-snap-diff/releases/latest
135
136
136
137
*ping me if your platform is missing*
137
-
138
+
138
139
### Manual build
139
140
140
141
* clone the repository
@@ -168,11 +169,11 @@ From here you can easy view / restore a deleted file.
168
169
169
170
zfs allow -u <USER_NAME> diff <ZFS_NAME>
170
171
171
-
172
+
172
173
173
174
## Coding Notes
174
175
175
-
* if you change something under 'webapp/'
176
+
* if you change something under 'webapp/'
176
177
177
178
* start `zfs-snap-diff` per `./build.pl webdev <ZFS_NAME>`
178
179
to serve the static content from the `webapp` folder
@@ -198,59 +199,59 @@ From here you can easy view / restore a deleted file.
198
199
* add size informations to dataset (to match 'zfs list' output)
199
200
* small fixes
200
201
* code cleanup
201
-
202
+
202
203
[all commits from 0.0.7...0.0.8](https://github.com/j-keck/zfs-snap-diff/compare/0.0.7...0.0.8)
203
-
204
+
204
205
0.0.7:
205
206
* support sub zfs filesystems (datasets)
206
207
* optional use sudo when execute zfs commands
207
208
* necessary under linux when running as non root
208
209
* needs sudo rules (see [doc/etc/sudoers.d/zfs-snap-diff](https://github.com/j-keck/zfs-snap-diff/blob/master/doc/etc/sudoers.d/zfs-snap-diff))
209
210
* start `zfs-snap-diff` with '-use-sudo'
210
211
* new view for server messages
211
-
212
+
212
213
[all commits from 0.0.6...0.0.7](https://github.com/j-keck/zfs-snap-diff/compare/0.0.6...0.0.7)
213
-
214
+
214
215
0.0.6:
215
216
* check if file in snapshot has changed filetype depend:
216
217
* text files: md5
217
218
* others: size+modTime
218
219
* diffs created in the backend (per [go-diff](https://github.com/sergi/go-diff))
219
220
* different presentation: intext / side by side
220
221
* possibility to revert single changes
221
-
222
-
[all commits from 0.0.5...0.0.6](https://github.com/j-keck/zfs-snap-diff/compare/0.0.5...0.0.6)
223
-
224
-
222
+
223
+
[all commits from 0.0.5...0.0.6](https://github.com/j-keck/zfs-snap-diff/compare/0.0.5...0.0.6)
224
+
225
+
225
226
0.0.5:
226
227
* file compare method configurable: size+modTime (default) or md5
227
228
* optional limit how many snapshots are scan to search older file version
228
229
* autohide notifications in frontend
229
230
* show message if no snapshots found
230
-
231
-
[all commits from 0.0.4...0.0.5](https://github.com/j-keck/zfs-snap-diff/compare/0.0.4...0.0.5)
232
-
231
+
232
+
[all commits from 0.0.4...0.0.5](https://github.com/j-keck/zfs-snap-diff/compare/0.0.4...0.0.5)
233
+
233
234
0.0.4:
234
235
* view, diff, download or restore file from a snapshot
235
236
* view file with syntax highlight
236
237
* browse old snapshot versions
237
238
* easy switch "versions" per 'Older' / 'Newer' buttons
0 commit comments