Skip to content

Commit 2e85530

Browse files
committed
update README
1 parent 5eabfcd commit 2e85530

File tree

1 file changed

+39
-32
lines changed

1 file changed

+39
-32
lines changed

README.md

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1+
# `zfs-snap-diff`: compare / restore files from zfs snapshots
12
Next features of `zfs-snap-diff`: [feature poll](https://github.com/j-keck/zfs-snap-diff/issues?q=is%3Aissue+is%3Aopen+label%3Afeature-poll). Please comment / vote.
23

3-
# Background
4-
5-
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.
6-
If i messed up a file, i need to search a clean state from the file in the snapshots - not always easy if i don't realize it directly.
7-
8-
`zfs-snap-diff` is a little tool to help me for such cases.
9-
10-
11-
# Description
4+
## Description
125

136
With `zfs-snap-diff` you can explore file differences and restore changes from older file versions in different zfs snapshots.
147
You can restore the whole file from a older version, or select single changes to revert in the 'Diff' view.
@@ -21,10 +14,10 @@ The backend is implemented in golang, the frontend with [angularjs](https://angu
2114

2215

2316

24-
#Usage
17+
##Usage
18+
_under linux, you need the '-use-sudo' flag if you don't run it as root - see the options below_
2519

26-
27-
## Startup a server instance
20+
### Startup a server instance
2821

2922
./zfs-snap-diff [OPT_ARGS] <ZFS_NAME>
3023

@@ -55,45 +48,47 @@ The backend is implemented in golang, the frontend with [angularjs](https://angu
5548

5649

5750

58-
## Connect with your web browser
51+
### Connect with your web browser
5952

6053
http://localhost:12345
6154

6255

63-
64-
## Browse actual filesystem state
6556

66-
### Select a dataset
57+
## User guide
58+
59+
### Browse actual filesystem state
60+
61+
#### Select a dataset
6762

6863
Select a dataset which you would explore. If you start `zfs-snap-diff` on a dataset with no childrens, the current dataset are selected.
6964

7065
![Datasets](doc/zsd-ba-datasets.png)
7166

7267

73-
### Search a file
68+
#### Search a file
7469

7570
Search a file to compare in the file browser.
7671

7772
![File browser](doc/zsd-ba-file-browser.png)
7873

7974

8075

81-
### Select a file
76+
#### Select a file
8277

8378
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).
8479

8580
![File selected](doc/zsd-ba-snapshots.png)
8681

8782

88-
### Select a snapshot
83+
#### Select a snapshot
8984

9085
When you select a snapshot, you can view, diff, download or restore the file from the selected snapshot.
9186

92-
##### View
87+
###### View
9388
View the file content from an older file version.
9489
![File View](doc/zsd-ba-view-file.png)
9590

96-
##### Diff
91+
###### Diff
9792
Explore file differences and pick single changes to revert.
9893

9994
intext diff:
@@ -105,16 +100,16 @@ side by side diff:
105100

106101

107102

108-
## Browse snapshot state
103+
### Browse snapshot state
109104

110-
### Search a snaphot
105+
#### Search a snaphot
111106

112107
Search a snapshot in the snapshot browser. All snapshots from the selected dataset are displayed in this view.
113108

114109
![Snapshot Browser](doc/zsd-bs-snapshots.png)
115110

116111

117-
### Select a snapshot
112+
#### Select a snapshot
118113

119114
When a snapshot is selected, the file-browser shows the content from this snapshot.
120115

@@ -129,15 +124,15 @@ From here you can easy view / restore a deleted file.
129124

130125

131126

132-
# Installation
127+
## Installation
133128

134-
## Prebuild
129+
### Prebuild
135130

136131
Get a package for your platform from: https://github.com/j-keck/zfs-snap-diff/releases/latest
137132

138133
*ping me if your platform is missing*
139134

140-
## Manual build
135+
### Manual build
141136

142137
* clone the repository
143138

@@ -151,24 +146,28 @@ From here you can easy view / restore a deleted file.
151146

152147
./build.pl build
153148

154-
155-
#Notes
149+
* run it
150+
151+
./zfs-snap-diff <ZFS_NAME>
152+
153+
154+
##Notes
156155

157156
* if you download a file from a snapshot, the generated file name has the snapshot name included:
158157

159158
<ORG_FILE_NAME>-<SNAPSHOT_NAME>.<FILE_SUFFIX>
160159

161160
* if you restore / patch a file, the orginal file will be saved under:
162161

163-
./zsd/<ORG_FLILE_NAME>_<TIMESTAMP>
162+
<ORG_FILE_PATH>/.zsd/<ORG_FLILE_NAME>_<TIMESTAMP>
164163

165164
* for snapshot differences (Browse snapshot diff), you need to set the diff permission:
166165

167166
zfs allow -u <USER_NAME> diff <ZFS_NAME>
168167

169168

170169

171-
# Coding Notes
170+
## Coding Notes
172171

173172
* if you change something under 'webapp/'
174173

@@ -179,10 +178,18 @@ From here you can easy view / restore a deleted file.
179178
* ./build.pl build
180179

181180

182-
# Changelog
181+
## Changelog
183182

184183
###0.0.X###
185184

185+
0.0.9:
186+
* show file size and modify timestamp in the file-browser
187+
* list directories at first in the file-browser
188+
* sortable columns in the file-browser
189+
* only regular files / directories are clickable
190+
191+
[all commits from 0.0.8...0.0.9](https://github.com/j-keck/zfs-snap-diff/compare/0.0.8...0.0.9)
192+
186193
0.0.8:
187194
* dataset selectable in 'browse-actual' view
188195
* add size informations to dataset (to match 'zfs list' output)

0 commit comments

Comments
 (0)