RESTIC-KEY-ADD(1)

πŸ“¦
version 0.19.1 Β· 3 versions
, in arch rolling, epel 10, epel 9, fedora 43, fedora 44, nixpkgs unstable, ubuntu stonking

πŸ’– restic-key-add(1) πŸ’–

okay bestie, welcome to the restic backup(1) manual page β€” yes that's the manual name, don't ask, it's giving brand identity crisis but we move πŸ’… β€” and today we're doing restic key add.


✨ NAME ✨

restic-key-add β€” add a new key (password) to the repository; returns the new key ID πŸŽ€


🌸 SYNOPSIS 🌸

restic key add [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

The "key add" command creates a new key and validates the key. Returns the new key ID. That's it, that's the whole thing β€” new key, checked, ID handed back to you. slay. ✨


πŸ’€ EXIT STATUS πŸ’€

bestie, read this part, it's literally the vibe check on whether things worked:

  • Exit status is 0 if the command was successful. 🫢
  • Exit status is 1 if there was any error. 😭
  • Exit status is 10 if the repository does not exist. πŸ’€
  • Exit status is 11 if the repository is already locked. πŸ”’
  • Exit status is 12 if the password is incorrect. πŸ™ˆ

πŸ‘‘ OPTIONS πŸ‘‘

  • -h, --help[=false] β€” help for add
  • --host="" β€” the hostname for new key
  • --new-insecure-no-password[=false] β€” add an empty password for the repository (insecure)
  • --new-password-file="" β€” file from which to read the new password
  • --user="" β€” the username for new key
⚠️ yes bestie, --new-insecure-no-password literally says insecure in the name. it's not being cute, it's a warning. an empty password means anyone can walk in. periodt.

πŸ’œ OPTIONS INHERITED FROM PARENT COMMANDS πŸ’œ

these are the ones your parent command passed down, like hand-me-downs but actually useful:

  • --cacert=[] β€” file to load root certificates from (default: use system certificates or $RESTIC_CACERT)
  • --cache-dir="" β€” set the cache directory. (default: use system default cache directory)
  • --cleanup-cache[=false] β€” auto remove old cache directories
  • --compression=auto β€” compression mode (only available for repository format version 2), one of (auto|off|fastest|better|max) (default: $RESTIC_COMPRESSION)
  • --http-user-agent="" β€” set a http user agent for outgoing http requests
  • --insecure-no-password[=false] β€” use an empty password for the repository, must be passed to every restic command (insecure)
  • --insecure-tls[=false] β€” skip TLS certificate verification when connecting to the repository (insecure)
  • --json[=false] β€” set output mode to JSON for commands that support it
  • --key-hint="" β€” key ID of key to try decrypting first (default: $RESTIC_KEY_HINT)
  • --limit-download=0 β€” limits downloads to a maximum rate in KiB/s. (default: unlimited)
  • --limit-upload=0 β€” limits uploads to a maximum rate in KiB/s. (default: unlimited)
  • --no-cache[=false] β€” do not use a local cache
  • --no-extra-verify[=false] β€” skip additional verification of data before upload (see documentation)
  • --no-lock[=false] β€” do not lock the repository, this allows some operations on read-only repositories
  • -o, --option=[] β€” set extended option (key=value, can be specified multiple times)
  • --pack-size=0 β€” set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)
  • --password-command="" β€” shell command to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)
  • -p, --password-file="" β€” file to read the repository password from (default: $RESTIC_PASSWORD_FILE)
  • -q, --quiet[=false] β€” do not output comprehensive progress report
  • -r, --repo="" β€” repository to backup to or restore from (default: $RESTIC_REPOSITORY)
  • --repository-file="" β€” file to read the repository location from (default: $RESTIC_REPOSITORY_FILE)
  • --retry-lock=0s β€” retry to lock the repository if it is already locked, takes a value like 5m or 2h (default: no retries)
  • --stuck-request-timeout=5m0s β€” duration after which to retry stuck requests
  • --tls-client-cert="" β€” path to a file containing PEM encoded TLS client certificate and private key (default: $RESTIC_TLS_CLIENT_CERT)
  • -v, --verbose[=0] β€” be verbose (specify multiple times or a level using `--verbose=n``, max level/times is 2)
πŸ’€ two options up in here are literally named insecure. --insecure-no-password and --insecure-tls. they are telling on themselves. if you use them, know what you're doing. no cap.

🌈 SEE ALSO 🌈


okay and for the cute sign-off bestie: this lil masterpiece was generated by restic generate, dated Jan 2017, and it lives under the manual name restic backup(1) (again. iconic of it). love that for us. go add your key, stay secure, mwah πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from