Commit 55e3e1c
nasbackup.sh: add LUKS encryption for backup files via -e flag
Add -e/--encrypt flag that accepts a passphrase file path and encrypts
all qcow2 backup files using LUKS encryption via qemu-img convert.
The passphrase is read from a file (not command-line) to avoid exposure
in process listings. Encryption is applied after backup completes,
for both running and stopped VM backup paths.
Encrypted backups use the standard qcow2+LUKS format supported by
QEMU, so they can be decrypted with qemu-img or mounted directly
by any QEMU/libvirt tooling that supports LUKS.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 61afb4c commit 55e3e1c
1 file changed
+38
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
87 | 115 | | |
88 | 116 | | |
89 | 117 | | |
| |||
114 | 142 | | |
115 | 143 | | |
116 | 144 | | |
| 145 | + | |
| 146 | + | |
117 | 147 | | |
118 | 148 | | |
119 | 149 | | |
| |||
136 | 166 | | |
137 | 167 | | |
138 | 168 | | |
| 169 | + | |
| 170 | + | |
139 | 171 | | |
140 | 172 | | |
141 | 173 | | |
| |||
165 | 197 | | |
166 | 198 | | |
167 | 199 | | |
168 | | - | |
| 200 | + | |
169 | 201 | | |
170 | 202 | | |
171 | 203 | | |
| |||
207 | 239 | | |
208 | 240 | | |
209 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
210 | 247 | | |
211 | 248 | | |
212 | 249 | | |
| |||
0 commit comments