1
1
<img src =" icon.svg " width =" 64 " alt /> Myba — git-based backup utility with encryption
2
2
=====
3
3
4
- [ ![ Build Status] ( https://img.shields.io/github/actions/workflow/status/kernc/myba/ci.yml?branch=master&style=for-the-badge )] ( https://github.com/kernc/myba/actions )
5
- [ ![ Source lines of code] ( https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/kernc/myba/badge?filter=myba.sh$&style=for-the-badge&logo=github&color=skyblue&label=SLOC )] ( https://github.com/kernc/myba )
6
- [ ![ Script size] ( https://img.shields.io/github/size/kernc/myba/myba.sh?style=for-the-badge&logo=github&color=skyblue )] ( https://github.com/kernc/myba )
4
+ [ ![ Build status] ( https://img.shields.io/github/actions/workflow/status/kernc/myba/ci.yml?branch=master&style=for-the-badge )] ( https://github.com/kernc/myba/actions )
5
+ [ ![ Language: shell / Bash] ( https://img.shields.io/badge/lang-Shell-skyblue?style=for-the-badge )] ( https://github.com/kernc/myba )
6
+ [ ![ Source lines of code] ( https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/kernc/myba/badge?filter=myba.sh$&style=for-the-badge&color=skyblue&label=SLOC )] ( https://github.com/kernc/myba )
7
+ [ ![ Script size] ( https://img.shields.io/github/size/kernc/myba/myba.sh?style=for-the-badge&color=skyblue )] ( https://github.com/kernc/myba )
7
8
[ ![ Issues] ( https://img.shields.io/github/issues/kernc/myba?style=for-the-badge )] ( # )
8
- [ ![ GitHub Sponsors] ( https://img.shields.io/github/sponsors/kernc?color=pink&style=for-the-badge )] ( https://github.com/sponsors/kernc )
9
+ [ ![ Sponsors] ( https://img.shields.io/github/sponsors/kernc?color=pink&style=for-the-badge )] ( https://github.com/sponsors/kernc )
9
10
10
11
[ TOC]
11
12
12
- ** Myba ** (pronounced: mỹba ) ** is an
13
+ ** _ Myba _ ** (pronounced: [ _ mỹba _ ] ( https://www.google.com/search?q=myba ) ) ** is an
13
14
open-source, secure, distributed, version-controlled, encrypted
14
15
file backup software based on ` git ` ** ,
15
16
for ** Linux, MacOS, BSDs** , and possibly even ** Windows/WSL** .
@@ -77,8 +78,9 @@ that **large binaries don't change too often**.
77
78
** Myba** is ** Git + Shell** , preconfigured and wrapped as thinly as needed to provide
78
79
fully ** encrypted backups** that are really ** easily replicated and synced to the cloud** .
79
80
80
- <script src =" https://ssl.gstatic.com/trends_nrtr/3826_RC01/embed_loader.js " ></script >
81
- <script >var now= (new Date ()).toISOString ().split (' T' )[0 ]; window .trends .embed .renderExploreWidget (" TIMESERIES" , {" comparisonItem" : [{" keyword" : " /m/02mhh1" ," geo" : " " ," time" : " 2004-01-01 " + now},{" keyword" : " /m/05vqwg" ," geo" : " " ," time" : " 2004-01-01 " + now},{" keyword" : " /m/0ryppmg" ," geo" : " " ," time" : " 2004-01-01 " + now}]," category" : 0 ," property" : " " }, {" exploreQuery" : " q=%2Fm%2F02mhh1,%2Fm%2F05vqwg,%2Fm%2F0ryppmg&date=all#TIMESERIES" ," guestPath" : " https://trends.google.com:443/trends/embed/" })</script >
81
+ <script async src =" https://ssl.gstatic.com/trends_nrtr/3826_RC01/embed_loader.js " ></script >
82
+ <div id =" trends " ></div >
83
+ <script >addEventListener (" load" , () => window .trends .embed .renderExploreWidgetTo (document .getElementById (" trends" ), " TIMESERIES" , {" comparisonItem" : [{" keyword" : " /m/02mhh1" ," geo" : " " ," time" : " all" },{" keyword" : " /m/05vqwg" ," geo" : " " ," time" : " all" },{" keyword" : " /m/0ryppmg" ," geo" : " " ," time" : " all" },{" keyword" : " myba" ," geo" : " " ," time" : " all" }]," category" : 0 ," property" : " " }, {" exploreQuery" : " date=all&q=%2Fm%2F02mhh1,%2Fm%2F05vqwg,%2Fm%2F0ryppmg,myba#TIMESERIES" ," guestPath" : " https://trends.google.com:443/trends/embed/" }));</script >
82
84
83
85
84
86
### Use-cases
@@ -99,7 +101,7 @@ To install everything on a Debian/Ubuntu-based system, run:
99
101
# Install dependencies
100
102
sudo apt install gzip git git-lfs openssl gpg
101
103
102
- # Download and make available somewhere in path
104
+ # Download and put somewhere on PATH
103
105
curl -vL ' https://bit.ly/myba-backup' > ~ /.local/bin/myba
104
106
export PATH=" $HOME /.local/bin:$PATH "
105
107
@@ -110,14 +112,14 @@ Note, only one of `openssl` _or_ `gpg` is needed, not both!
110
112
It should be similar, if not nearly equivalent, to install on other platforms.
111
113
Hopefully you will find most dependencies already satisfied.
112
114
113
- Please report back if you find / manage to get this working under anything but the above configuration and especially Windows/WSL!
115
+ Please report back if you find / manage to get this working under everything but the above configuration and especially Windows/WSL!
114
116
115
117
116
118
Usage
117
119
-----
118
120
You run the script with arguments according to the usage printout below.
119
121
Myba heavily relies on ` git ` and thus ** its command-line usage largely follows that of git convention** .
120
- Most subcommands pass obtained arguments and options (` "@" ` ) straight to matching ` git ` subcommands!
122
+ Most subcommands pass obtained arguments and options (` "$ @" ` ) straight to matching ` git ` subcommands!
121
123
``` text
122
124
Usage: myba <subcommand> [options]
123
125
Subcommands:
@@ -173,7 +175,7 @@ myba add Documents Photos Etc .dotfile
173
175
PASSWORD=' secret' myba commit -m " my precious"
174
176
myba remote add origin " /media/usb/backup"
175
177
myba remote add github " git@github.com:user/my-backup.git"
176
- myba push # Push to all configured remotes & free disk space
178
+ VERBOSE=1 myba push # Push to all configured remotes & free up disk space
177
179
178
180
# Somewhere else, much, much later, avoiding catastrophe ...
179
181
@@ -186,21 +188,23 @@ See [_smoke-test.sh_](https://github.com/kernc/myba/blob/master/smoke-test.sh) f
186
188
187
189
Contributing
188
190
------------
189
- The project is [ hosted on github ] ( https://github.com/kernc/myba/ ) .
191
+ The project is [ hosted on GitHub ] ( https://github.com/kernc/myba/ ) .
190
192
191
193
The script is considered _ mostly_ feature-complete, but there remain
192
194
bugs and design flaws to be discovered and ironed out, as well as any
193
195
[ TODOs and FIXMEs] ( https://github.com/search?q=repo%3Akernc%2Fmyba+%28todo+OR+fixme+OR+xxx%29&type=code )
194
196
marked in the source.
195
197
** All source code lines are open to discussion.**
196
- Especially appreciated are clear pointers to targets for simplification.
198
+ Especially appreciated are targets for simplification.
197
199
198
200
199
201
FAQ
200
202
---
203
+ <div property =" about " typeof =" FAQPage " >
201
204
202
- <details markdown =" 1 " >
203
- <summary >Is git a good tool for backups?</summary >
205
+ <details markdown =" 1 " property =" mainEntity " typeof =" Question " >
206
+ <summary property =" name " >Is git a good tool for backups?</summary >
207
+ <div property =" acceptedAnswer " typeof =" Answer " ><div property =" text " >
204
208
205
209
Git/myba's inherently core features allow you to:
206
210
@@ -217,11 +221,12 @@ Git/myba's inherently core features allow you to:
217
221
of people and organizations worldwide,
218
222
with long and rigorous release / support cycles.
219
223
220
- </details >
221
- <details markdown =" 1 " >
222
- <summary >Git doesn't track file owner and access control / permissions ...</summary >
224
+ </div ></div ></details >
225
+ <details markdown =" 1 " property =" mainEntity " typeof =" Question " >
226
+ <summary property =" name " >Git doesn't track file owner and access control / permissions ...?</summary >
227
+ <div property =" acceptedAnswer " typeof =" Answer " ><div property =" text " >
223
228
224
- True . Files commited by any user are restorable by any user with the right password.
229
+ Correct . Files commited by any user are restorable by any user with the right password.
225
230
In order to restore files with specific file permission bits set, ** defer to
226
231
[ umask] ( https://pubs.opengroup.org/onlinepubs/9799919799/utilities/umask.html ) ** ,
227
232
e.g.:
@@ -236,23 +241,27 @@ simply **write a small shell wrapper** that takes care of it.
236
241
** Welcome to contrib** anything short to the respect
237
242
you find widely-applicable and useful.
238
243
239
- </details >
240
- <details markdown =" 1 " >
241
- <summary >Git isn't optimized for continuously-changing databases and binary files ...</summary >
244
+ </div ></div ></details >
245
+ <details markdown =" 1 " property =" mainEntity " typeof =" Question " >
246
+ <summary property =" name " >Is git optimized for continuously-changing databases and binary files?</summary >
247
+ <div property =" acceptedAnswer " typeof =" Answer " ><div property =" text " >
242
248
243
- That is correct . Git saves whole file snapshots and doesn't do any in-file or within-file
249
+ It's not . Git saves whole file snapshots and doesn't do any in-file or within-file
244
250
or across-file deduplication, so it's not well suited to automatic continuous backing up
245
251
of databases that change often.
246
252
247
253
However, while git repositories bloat when commiting large binary and media files,
248
254
** _ myba_ only ever uses sparse-checkout** , keeping overhead disk space use to a minimum.
249
255
250
- </details >
251
- <details markdown =" 1 " >
252
- <summary >How to influence what files / filetypes to ignore from backup?</summary >
256
+ </div ></div ></details >
257
+ <details markdown =" 1 " property =" mainEntity " typeof =" Question " >
258
+ <summary property =" name " >How to configure what files / filetypes to ignore from backup?</summary >
259
+ <div property =" acceptedAnswer " typeof =" Answer " ><div property =" text " >
253
260
254
- You can edit ` $PLAIN_REPO/info/exclude ` , which is prepopulated with default common ignore patterns.
261
+ You can edit ` $PLAIN_REPO/info/exclude ` , which is prepopulated with
262
+ [ default common ignore patterns] ( https://github.com/search?q=repo%3Akernc%2Fmyba+%22default_gitignore%3D%22&type=code ) .
255
263
You can tweak various other git settings (like config, filters, hooks)
256
- by modifying files in ` $PLAIN_REPO ` and ` $PLAIN_REPO/_encrypted/.git ` .
264
+ by modifying respective files in ` $PLAIN_REPO ` and (encrypted repo) ` $PLAIN_REPO/_encrypted/.git ` .
257
265
258
- </details >
266
+ </div ></div ></details >
267
+ </div >
0 commit comments