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** .
@@ -78,7 +79,7 @@ that **large binaries don't change too often**.
78
79
fully ** encrypted backups** that are really ** easily replicated and synced to the cloud** .
79
80
80
81
<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 >
82
+ <script >addEventListener ( " load " , () => window .trends .embed .renderExploreWidget (" 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
83
83
84
84
85
### Use-cases
@@ -99,7 +100,7 @@ To install everything on a Debian/Ubuntu-based system, run:
99
100
# Install dependencies
100
101
sudo apt install gzip git git-lfs openssl gpg
101
102
102
- # Download and make available somewhere in path
103
+ # Download and put somewhere on PATH
103
104
curl -vL ' https://bit.ly/myba-backup' > ~ /.local/bin/myba
104
105
export PATH=" $HOME /.local/bin:$PATH "
105
106
@@ -110,14 +111,14 @@ Note, only one of `openssl` _or_ `gpg` is needed, not both!
110
111
It should be similar, if not nearly equivalent, to install on other platforms.
111
112
Hopefully you will find most dependencies already satisfied.
112
113
113
- Please report back if you find / manage to get this working under anything but the above configuration and especially Windows/WSL!
114
+ Please report back if you find / manage to get this working under everything but the above configuration and especially Windows/WSL!
114
115
115
116
116
117
Usage
117
118
-----
118
119
You run the script with arguments according to the usage printout below.
119
120
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!
121
+ Most subcommands pass obtained arguments and options (` "$ @" ` ) straight to matching ` git ` subcommands!
121
122
``` text
122
123
Usage: myba <subcommand> [options]
123
124
Subcommands:
@@ -173,7 +174,7 @@ myba add Documents Photos Etc .dotfile
173
174
PASSWORD=' secret' myba commit -m " my precious"
174
175
myba remote add origin " /media/usb/backup"
175
176
myba remote add github " git@github.com:user/my-backup.git"
176
- myba push # Push to all configured remotes & free disk space
177
+ VERBOSE=1 myba push # Push to all configured remotes & free up disk space
177
178
178
179
# Somewhere else, much, much later, avoiding catastrophe ...
179
180
@@ -186,21 +187,23 @@ See [_smoke-test.sh_](https://github.com/kernc/myba/blob/master/smoke-test.sh) f
186
187
187
188
Contributing
188
189
------------
189
- The project is [ hosted on github ] ( https://github.com/kernc/myba/ ) .
190
+ The project is [ hosted on GitHub ] ( https://github.com/kernc/myba/ ) .
190
191
191
192
The script is considered _ mostly_ feature-complete, but there remain
192
193
bugs and design flaws to be discovered and ironed out, as well as any
193
194
[ TODOs and FIXMEs] ( https://github.com/search?q=repo%3Akernc%2Fmyba+%28todo+OR+fixme+OR+xxx%29&type=code )
194
195
marked in the source.
195
196
** All source code lines are open to discussion.**
196
- Especially appreciated are clear pointers to targets for simplification.
197
+ Especially appreciated are targets for simplification.
197
198
198
199
199
200
FAQ
200
201
---
202
+ <div property =" about " typeof =" FAQPage " >
201
203
202
- <details markdown =" 1 " >
203
- <summary >Is git a good tool for backups?</summary >
204
+ <details markdown =" 1 " property =" mainEntity " typeof =" Question " >
205
+ <summary property =" name " >Is git a good tool for backups?</summary >
206
+ <div property =" acceptedAnswer " typeof =" Answer " ><div property =" text " >
204
207
205
208
Git/myba's inherently core features allow you to:
206
209
@@ -217,11 +220,12 @@ Git/myba's inherently core features allow you to:
217
220
of people and organizations worldwide,
218
221
with long and rigorous release / support cycles.
219
222
220
- </details >
221
- <details markdown =" 1 " >
222
- <summary >Git doesn't track file owner and access control / permissions ...</summary >
223
+ </div ></div ></details >
224
+ <details markdown =" 1 " property =" mainEntity " typeof =" Question " >
225
+ <summary property =" name " >Git doesn't track file owner and access control / permissions ...?</summary >
226
+ <div property =" acceptedAnswer " typeof =" Answer " ><div property =" text " >
223
227
224
- True . Files commited by any user are restorable by any user with the right password.
228
+ Correct . Files commited by any user are restorable by any user with the right password.
225
229
In order to restore files with specific file permission bits set, ** defer to
226
230
[ umask] ( https://pubs.opengroup.org/onlinepubs/9799919799/utilities/umask.html ) ** ,
227
231
e.g.:
@@ -236,23 +240,27 @@ simply **write a small shell wrapper** that takes care of it.
236
240
** Welcome to contrib** anything short to the respect
237
241
you find widely-applicable and useful.
238
242
239
- </details >
240
- <details markdown =" 1 " >
241
- <summary >Git isn't optimized for continuously-changing databases and binary files ...</summary >
243
+ </div ></div ></details >
244
+ <details markdown =" 1 " property =" mainEntity " typeof =" Question " >
245
+ <summary property =" name " >Is git optimized for continuously-changing databases and binary files?</summary >
246
+ <div property =" acceptedAnswer " typeof =" Answer " ><div property =" text " >
242
247
243
- That is correct . Git saves whole file snapshots and doesn't do any in-file or within-file
248
+ It's not . Git saves whole file snapshots and doesn't do any in-file or within-file
244
249
or across-file deduplication, so it's not well suited to automatic continuous backing up
245
250
of databases that change often.
246
251
247
252
However, while git repositories bloat when commiting large binary and media files,
248
253
** _ myba_ only ever uses sparse-checkout** , keeping overhead disk space use to a minimum.
249
254
250
- </details >
251
- <details markdown =" 1 " >
252
- <summary >How to influence what files / filetypes to ignore from backup?</summary >
255
+ </div ></div ></details >
256
+ <details markdown =" 1 " property =" mainEntity " typeof =" Question " >
257
+ <summary property =" name " >How to configure what files / filetypes to ignore from backup?</summary >
258
+ <div property =" acceptedAnswer " typeof =" Answer " ><div property =" text " >
253
259
254
- You can edit ` $PLAIN_REPO/info/exclude ` , which is prepopulated with default common ignore patterns.
260
+ You can edit ` $PLAIN_REPO/info/exclude ` , which is prepopulated with
261
+ [ default common ignore patterns] ( https://github.com/search?q=repo%3Akernc%2Fmyba+%22default_gitignore%3D%22&type=code ) .
255
262
You can tweak various other git settings (like config, filters, hooks)
256
- by modifying files in ` $PLAIN_REPO ` and ` $PLAIN_REPO/_encrypted/.git ` .
263
+ by modifying respective files in ` $PLAIN_REPO ` and (encrypted repo) ` $PLAIN_REPO/_encrypted/.git ` .
257
264
258
- </details >
265
+ </div ></div ></details >
266
+ </div >
0 commit comments