Fossil SCM
Factored the iteration count out of the encrypted backup solution in backup.md, so it isn't repeated between the backup and restore cases.
Commit
fc300d5a9aaeb54745fc466492948611d63439bf4e4d67a84d138a6f89438a1c
Parent
0872ecbef7060aa…
1 file changed
+3
-2
+3
-2
| --- www/backup.md | ||
| +++ www/backup.md | ||
| @@ -201,14 +201,15 @@ | ||
| 201 | 201 | of noise to anyone without the key: |
| 202 | 202 | |
| 203 | 203 | ---- |
| 204 | 204 | |
| 205 | 205 | ```shell |
| 206 | +iter=52830 | |
| 206 | 207 | pass="h8TixP6Mt6edJ3d6COaexiiFlvAM54auF2AjT7ZYYn" |
| 207 | 208 | gd="$HOME/Google Drive/Fossil Backups/$bf.xz.enc" |
| 208 | 209 | fossil sql -R ~/museum/backups/"$bf" .dump | xz -9 | |
| 209 | - openssl enc -e -aes-256-cbc -pbkdf2 -iter 52830 -pass pass:"$pass" -out "$gd" | |
| 210 | + openssl enc -e -aes-256-cbc -pbkdf2 -iter $iter -pass pass:"$pass" -out "$gd" | |
| 210 | 211 | ``` |
| 211 | 212 | |
| 212 | 213 | ---- |
| 213 | 214 | |
| 214 | 215 | If you’re adding this to the first script above, remove the |
| @@ -247,11 +248,11 @@ | ||
| 247 | 248 | it, but it’s worth showing it because there are some subtleties to take |
| 248 | 249 | care of. If all variables defined in earlier scripts are available, then |
| 249 | 250 | restoration is: |
| 250 | 251 | |
| 251 | 252 | ``` |
| 252 | -openssl enc -d -aes-256-cbc -pbkdf2 -iter 52830 -pass pass:"$pass" -in "$gd" | | |
| 253 | +openssl enc -d -aes-256-cbc -pbkdf2 -iter $iter -pass pass:"$pass" -in "$gd" | | |
| 253 | 254 | xz -d | fossil sql --no-repository ~/museum/restored-repo.fossil |
| 254 | 255 | ``` |
| 255 | 256 | |
| 256 | 257 | We changed the `-e` to `-d` on the `openssl` command to get decryption, |
| 257 | 258 | and we changed the `-out` to `-in` so it reads from the encrypted backup |
| 258 | 259 |
| --- www/backup.md | |
| +++ www/backup.md | |
| @@ -201,14 +201,15 @@ | |
| 201 | of noise to anyone without the key: |
| 202 | |
| 203 | ---- |
| 204 | |
| 205 | ```shell |
| 206 | pass="h8TixP6Mt6edJ3d6COaexiiFlvAM54auF2AjT7ZYYn" |
| 207 | gd="$HOME/Google Drive/Fossil Backups/$bf.xz.enc" |
| 208 | fossil sql -R ~/museum/backups/"$bf" .dump | xz -9 | |
| 209 | openssl enc -e -aes-256-cbc -pbkdf2 -iter 52830 -pass pass:"$pass" -out "$gd" |
| 210 | ``` |
| 211 | |
| 212 | ---- |
| 213 | |
| 214 | If you’re adding this to the first script above, remove the |
| @@ -247,11 +248,11 @@ | |
| 247 | it, but it’s worth showing it because there are some subtleties to take |
| 248 | care of. If all variables defined in earlier scripts are available, then |
| 249 | restoration is: |
| 250 | |
| 251 | ``` |
| 252 | openssl enc -d -aes-256-cbc -pbkdf2 -iter 52830 -pass pass:"$pass" -in "$gd" | |
| 253 | xz -d | fossil sql --no-repository ~/museum/restored-repo.fossil |
| 254 | ``` |
| 255 | |
| 256 | We changed the `-e` to `-d` on the `openssl` command to get decryption, |
| 257 | and we changed the `-out` to `-in` so it reads from the encrypted backup |
| 258 |
| --- www/backup.md | |
| +++ www/backup.md | |
| @@ -201,14 +201,15 @@ | |
| 201 | of noise to anyone without the key: |
| 202 | |
| 203 | ---- |
| 204 | |
| 205 | ```shell |
| 206 | iter=52830 |
| 207 | pass="h8TixP6Mt6edJ3d6COaexiiFlvAM54auF2AjT7ZYYn" |
| 208 | gd="$HOME/Google Drive/Fossil Backups/$bf.xz.enc" |
| 209 | fossil sql -R ~/museum/backups/"$bf" .dump | xz -9 | |
| 210 | openssl enc -e -aes-256-cbc -pbkdf2 -iter $iter -pass pass:"$pass" -out "$gd" |
| 211 | ``` |
| 212 | |
| 213 | ---- |
| 214 | |
| 215 | If you’re adding this to the first script above, remove the |
| @@ -247,11 +248,11 @@ | |
| 248 | it, but it’s worth showing it because there are some subtleties to take |
| 249 | care of. If all variables defined in earlier scripts are available, then |
| 250 | restoration is: |
| 251 | |
| 252 | ``` |
| 253 | openssl enc -d -aes-256-cbc -pbkdf2 -iter $iter -pass pass:"$pass" -in "$gd" | |
| 254 | xz -d | fossil sql --no-repository ~/museum/restored-repo.fossil |
| 255 | ``` |
| 256 | |
| 257 | We changed the `-e` to `-d` on the `openssl` command to get decryption, |
| 258 | and we changed the `-out` to `-in` so it reads from the encrypted backup |
| 259 |