Branch
Hash :
b9512b22
Author :
Date :
2022-07-25T21:24:17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
$ export BORG_PASSCOMMAND="security find-generic-password -a $USER -s borg-passphrase -w"
$ export BORG_RSH="ssh -i ~/.ssh/borg"
$ borg init --encryption=keyfile-blake2 "borg@1.2.3.4:backup"
By default repositories initialized with this version will produce security
errors if written to with an older version (up to and including Borg 1.0.8).
If you want to use these older versions, you can disable the check by running:
borg upgrade --disable-tam ssh://borg@1.2.3.4/./backup
See https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability for details about the security implications.
IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!
Use "borg key export" to export the key, optionally in printable format.
Write down the passphrase. Store both at safe place(s).
---
----------------------------------------------------
[
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "export"],
["assign-left", ["BORG_PASSCOMMAND"]],
["operator", ["="]],
["string", [
"\"security find-generic-password -a ",
["environment", "$USER"],
" -s borg-passphrase -w\""
]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "export"],
["assign-left", ["BORG_RSH"]],
["operator", ["="]],
["string", ["\"ssh -i ~/.ssh/borg\""]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
"borg init ",
["parameter", "--encryption"],
["operator", ["="]],
"keyfile-blake2 ",
["string", ["\"borg@1.2.3.4:backup\""]]
]]
]],
["output", "By default repositories initialized with this version will produce security\r\nerrors if written to with an older version (up to and including Borg 1.0.8).\r\n\r\nIf you want to use these older versions, you can disable the check by running:\r\nborg upgrade --disable-tam ssh://borg@1.2.3.4/./backup\r\n\r\nSee https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability for details about the security implications.\r\n\r\nIMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!\r\nUse \"borg key export\" to export the key, optionally in printable format.\r\nWrite down the passphrase. Store both at safe place(s).\r\n\r\n---"]
]