File tree 6 files changed +32
-2
lines changed
6 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 1
1
# STANDARD(?) UNIX NOTES
2
2
# RELEASE NOTES
3
3
4
+ 2.4
5
+ - Added backup sub-command (creates GnuPG encrypted
6
+ tarball in HOME)
7
+
4
8
2.3
5
9
- Added GNU shred(1) for file deletion where available
6
10
- fixed bug #26 (wrong extension for 'edit' -> .asc)
Original file line number Diff line number Diff line change 3
3
4
4
ROADMAP
5
5
6
+ 2.4 Added backup sub command
7
+
6
8
2.3 Use GNU shred(1) where available
7
9
8
10
2.2 Migrate to ascii encoded GPG files (see RELEASE-NOTES.md)
@@ -48,6 +50,5 @@ FUTURE FEATURES
48
50
- zsh completion
49
51
- FreeBSD .PKG packaging
50
52
- FreeBSD ports configuration
51
- - encrypted backup/restore
52
53
- PIV card support
53
54
- Issue #17 BUG - import truncates filename if spaces in filename
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ $ ykman openpgp set-touch enc cached
51
51
```
52
52
53
53
54
+ ## Sub-command backup
55
+
56
+ Backup your notes and journal entries to a GPG encrypted tar file (in $HOME)
57
+
54
58
## Sub-command add | insert
55
59
56
60
To add a note simply issue the command
Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ the KEYID of the private key you wish to use.
78
78
issues with other keys, then run \fB notes newkey <keyid> \fP . Notes will
79
79
replace the keyid automatically in the config file.
80
80
81
+ Journal entries can be backed up using the backup sub-command of notes(1).
82
+
81
83
.SH SHELL INTEGRATION
82
84
83
85
Standard Unix Notes system supports bash completion for notes(1),
Original file line number Diff line number Diff line change @@ -85,6 +85,14 @@ Displays the config file
85
85
~/.notes/config
86
86
to the terminal. This is a quick way of determining that GPG KeyID is in use.
87
87
88
+ .SY backup
89
+ .YS
90
+
91
+ Backup your notes directory to a GPG encrypted tar file placed in your
92
+ $HOME directory. Backups can be tested using the following command:
93
+
94
+ $ gpg -d ~/unix-notes-backup-20210630_1503.tar.asc | tar tv
95
+
88
96
.SY help
89
97
.YS
90
98
Displays a quick help page displaying available commands.
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ GPG_OPTS=" --quiet --yes --compress-algo=none --no-encrypt-to"
28
28
GPG=" gpg"
29
29
EDITOR=" ${EDITOR:- nano} "
30
30
PAGER=" ${PAGER:- more} "
31
-
31
+ TIMESTAMP=" ` date \" +%Y%m%d_%H%M\" ` "
32
+ BACKUPFILE=" ${HOME} /unix-notes-backup-${TIMESTAMP} .tar.asc"
32
33
# Use shred if available
33
34
SHRED=" ` which shred` "
34
35
if [ $? = 0 ]; then
@@ -370,6 +371,7 @@ GPG encrypted notes system for BSD and Linux systems
370
371
371
372
notes init initialise notes system
372
373
notes config display config file
374
+ notes backup backup $NOTESDIR to GPG encrypted tar file
373
375
notes newkey email change GPG key
374
376
notes help show help
375
377
notes version show version
@@ -435,6 +437,14 @@ cmd_config () {
435
437
echo The Journal uses the directory $JOURNALDIR
436
438
}
437
439
440
+ cmd_backup () {
441
+
442
+ get_recipient
443
+
444
+ echo running tar backup to $BACKUPFILE
445
+ tar cv ${NOTESDIR} | gpg -ear ${KEY} ${GPGOPTS} > ${BACKUPFILE}
446
+ }
447
+
438
448
cmd_tree () {
439
449
tree -I Journal ${NOTESDIR}
440
450
}
@@ -630,6 +640,7 @@ COMMAND="$1"
630
640
case " $1 " in
631
641
init) shift ; cmd_init " $@ " ;;
632
642
config) shift ; cmd_config " $@ " ;;
643
+ backup) shift ; cmd_backup ;;
633
644
tree) shift ; cmd_tree ;;
634
645
licence|license) shift ; cmd_licence " $@ " ;;
635
646
default) shift ; cmd_default " $@ " ;;
You can’t perform that action at this time.
0 commit comments