bitferry 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +13 -0
- data/README.md +13 -15
- data/lib/bitferry/cli.rb +14 -14
- data/lib/bitferry.rb +392 -389
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3cf2cfbd34a736bdab0ca41d188a732b5e848be7a746ae9d351424e305ac59d
|
4
|
+
data.tar.gz: 42c91f3371a2c61afdc813870550d19341b2b2e0e8096b5ec2b41adb05fd0670
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c4f17e69351732f951a411bfc2f62f5052838abfa81d79655e9f6e5b9ee7826dc98a0b40005437d613155071fb71d028dcdddfb7bdcf8e29bd3e6a0ce022bcc
|
7
|
+
data.tar.gz: 64e48fa1d13e51f28c598ff57022d9d300b901a9db2b98af0b446bcfe540d6dd218e8da8d1b08a4ec7b2700af63b6e1d693d340685d49674f69b4004a30fd6d6
|
data/CHANGES.md
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Bitferry - file synchronization/backup automation
|
1
|
+
# Bitferry - file synchronization/backup automation
|
2
2
|
|
3
3
|
<div align="right"><i>Ein Backup ist kein Backup</i></div><br><br>
|
4
4
|
|
@@ -6,8 +6,9 @@ The [Bitferry](https://github.com/okhlybov/bitferry) is aimed at establishing th
|
|
6
6
|
|
7
7
|
The intended usage ranges from maintaining simple directory copy to another location (disk, mount point) to complex many-to-many (online/offline) data replication/backup solution employing portable media as additional data storage and a means of data propagation between the offsites.
|
8
8
|
|
9
|
-
Bitferry is a
|
9
|
+
The core idea that drives Bitferry is the conversion of full (absolute) endpoint's paths into the volume-relative ones, where the volume is a data file which is put along the endpoint's data and denotes the root of the directory hierarchy. This leads to the important location independence property meaning that Bitferry is then able to restore the tasks' source-destination endpoint connections in spite of the volume location changes, which is a likely scenario in case of portable storage (different UNIX mount points, Windows drives etc.).
|
10
10
|
|
11
|
+
Bitferry is effectively a frontend to the [Rclone](https://rclone.org) and [Restic](https://restic.net) utilities.
|
11
12
|
|
12
13
|
## Features
|
13
14
|
|
@@ -27,7 +28,6 @@ Bitferry is a frontend to the [Rclone](https://rclone.org) and [Restic](https://
|
|
27
28
|
|
28
29
|
* Offline portable storage (USB flash, HDDs, SSDs etc.) relay
|
29
30
|
|
30
|
-
|
31
31
|
## Use cases
|
32
32
|
|
33
33
|
* Maintain an update-only files copy in a separate location on the same site
|
@@ -36,7 +36,6 @@ Bitferry is a frontend to the [Rclone](https://rclone.org) and [Restic](https://
|
|
36
36
|
|
37
37
|
* Maintain an incremental files backup on a portable medium with multiple offsite copies of the repository
|
38
38
|
|
39
|
-
|
40
39
|
## Implementation
|
41
40
|
|
42
41
|
The Bitferry itself is written in [Ruby](https://www.ruby-lang.org) programming language. Being a Ruby code, the Bitferry requires the platform-specific Ruby runtime, version 3.0 or higher.
|
@@ -45,28 +44,27 @@ The source code is hosted on [GitHub](https://github.com/okhlybov/bitferry) and
|
|
45
44
|
|
46
45
|
In addition, the platform-specific [Rclone](https://github.com/rclone/rclone/releases) and [Restic](https://github.com/restic/restic/releases) executables are required to be accessible through the `PATH` directory list or through the respective `RCLONE` and `RESTIC` environment variables.
|
47
46
|
|
48
|
-
|
49
47
|
## Kickstart
|
50
48
|
|
51
|
-
Install Bitferry
|
49
|
+
### Install Bitferry
|
52
50
|
|
53
51
|
```shell
|
54
52
|
gem install bitferry
|
55
53
|
```
|
56
54
|
|
57
|
-
Prepare source Bitferry volume for a mounted local filesystem
|
55
|
+
### Prepare source Bitferry volume for a mounted local filesystem
|
58
56
|
|
59
57
|
```shell
|
60
58
|
bitferry create volume /data
|
61
59
|
```
|
62
60
|
|
63
|
-
Prepare destination Bitferry volume for a mounted portable storage
|
61
|
+
### Prepare destination Bitferry volume for a mounted portable storage
|
64
62
|
|
65
63
|
```shell
|
66
64
|
bitferry create volume /mnt/usb-drive
|
67
65
|
```
|
68
66
|
|
69
|
-
Ensure the volumes are intact
|
67
|
+
### Ensure the volumes are intact
|
70
68
|
|
71
69
|
```shell
|
72
70
|
bitferry show
|
@@ -79,13 +77,13 @@ bitferry show
|
|
79
77
|
e42f2d8c /mnt/usb-drive
|
80
78
|
```
|
81
79
|
|
82
|
-
Create a (Rclone) sync task with data encryption
|
80
|
+
### Create a (Rclone) sync task with data encryption
|
83
81
|
|
84
82
|
```shell
|
85
83
|
bitferry create task sync -e /data /mnt/usb-drive/backup
|
86
84
|
```
|
87
85
|
|
88
|
-
Review the changes
|
86
|
+
### Review the changes
|
89
87
|
|
90
88
|
```shell
|
91
89
|
bitferry
|
@@ -103,7 +101,7 @@ bitferry
|
|
103
101
|
89e1c119 encrypt+synchronize :d2f10024: --> :e42f2d8c:backup
|
104
102
|
```
|
105
103
|
|
106
|
-
Perform a dry run of the specific task
|
104
|
+
### Perform a dry run of the specific task
|
107
105
|
|
108
106
|
```shell
|
109
107
|
bitferry process -vn 89e
|
@@ -128,7 +126,7 @@ Elapsed time: 0.0s
|
|
128
126
|
|
129
127
|
</details>
|
130
128
|
|
131
|
-
Process all intact tasks in sequence
|
129
|
+
### Process all intact tasks in sequence
|
132
130
|
|
133
131
|
```shell
|
134
132
|
bitferry -v x
|
@@ -153,7 +151,7 @@ Elapsed time: 0.0s
|
|
153
151
|
|
154
152
|
</details>
|
155
153
|
|
156
|
-
Observe the result
|
154
|
+
### Observe the result
|
157
155
|
|
158
156
|
```shell
|
159
157
|
ls -l /mnt/usb-drive/backup
|
@@ -170,7 +168,7 @@ ls -l /mnt/usb-drive/backup
|
|
170
168
|
|
171
169
|
</details>
|
172
170
|
|
173
|
-
Examine the detailed usage instructions
|
171
|
+
### Examine the detailed usage instructions
|
174
172
|
|
175
173
|
```shell
|
176
174
|
bitferry c t s -h
|
data/lib/bitferry/cli.rb
CHANGED
@@ -165,14 +165,14 @@ Clamp do
|
|
165
165
|
subcommand ['copy', 'c'], 'Create copy task' do
|
166
166
|
banner %{
|
167
167
|
Create source --> destination file copy task.
|
168
|
-
|
168
|
+
|
169
169
|
The task operates recursively on two specified endpoints.
|
170
170
|
This task unconditionally copies all source files overwriting existing files in destination.
|
171
|
-
|
171
|
+
|
172
172
|
#{Endpoint}
|
173
|
-
|
173
|
+
|
174
174
|
#{Encryption}
|
175
|
-
|
175
|
+
|
176
176
|
This task employs the Rclone worker.
|
177
177
|
}
|
178
178
|
setup_rclone_task(self)
|
@@ -185,12 +185,12 @@ Clamp do
|
|
185
185
|
subcommand ['update', 'u'], 'Create update task' do
|
186
186
|
banner %{
|
187
187
|
Create source --> destination file update (freshen) task.
|
188
|
-
|
188
|
+
|
189
189
|
The task operates recursively on two specified endpoints.
|
190
190
|
This task copies newer source files while skipping unchanged files in destination.
|
191
|
-
|
191
|
+
|
192
192
|
#{Endpoint}
|
193
|
-
|
193
|
+
|
194
194
|
#{Encryption}
|
195
195
|
|
196
196
|
This task employs the Rclone worker.
|
@@ -205,15 +205,15 @@ Clamp do
|
|
205
205
|
subcommand ['synchronize', 'sync', 's'], 'Create one way sync task' do
|
206
206
|
banner %{
|
207
207
|
Create source --> destination one way file synchronization task.
|
208
|
-
|
208
|
+
|
209
209
|
The task operates recursively on two specified endpoints.
|
210
210
|
This task copies newer source files while skipping unchanged files in destination.
|
211
211
|
Also, it deletes destination files which are non-existent in source.
|
212
|
-
|
212
|
+
|
213
213
|
#{Endpoint}
|
214
214
|
|
215
215
|
#{Encryption}
|
216
|
-
|
216
|
+
|
217
217
|
This task employs the Rclone worker.
|
218
218
|
}
|
219
219
|
setup_rclone_task(self)
|
@@ -226,15 +226,15 @@ Clamp do
|
|
226
226
|
subcommand ['equalize', 'bisync', 'e'], 'Create two way sync task' do
|
227
227
|
banner %{
|
228
228
|
Create source <-> destination two way file synchronization task.
|
229
|
-
|
229
|
+
|
230
230
|
The task operates recursively on two specified endpoints.
|
231
231
|
This task retains only the most recent versions of files on both endpoints.
|
232
232
|
Opon execution both endpoints are left identical.
|
233
|
-
|
233
|
+
|
234
234
|
#{Endpoint}
|
235
235
|
|
236
236
|
#{Encryption}
|
237
|
-
|
237
|
+
|
238
238
|
This task employs the Rclone worker.
|
239
239
|
}
|
240
240
|
setup_rclone_task(self)
|
@@ -341,4 +341,4 @@ Clamp do
|
|
341
341
|
end
|
342
342
|
|
343
343
|
|
344
|
-
end
|
344
|
+
end
|