Usage¶
BACKUP is the backup file created by FreeOTP. The examples use the command name of the standalone executable; with the single script, use ./freeotp_export_reader.py instead.
Options¶
| Option | Description |
|---|---|
-p, --password-file FILE |
Read the password from the first line of FILE; use - for stdin |
-o, --output FILE |
Write the JSON to FILE (created with owner-only permissions) |
-f, --force |
Replace an existing output file |
--check |
Only check for tokens which cannot be decrypted; outputs a report without secrets (see Tokens which cannot be decrypted) |
--indent N |
JSON indentation (default: 2) |
--version |
Show the version |
Examples¶
Write the tokens to a file, with the password read from stdin:
Only check the backup, without writing out any secrets:
Password¶
The tool looks for the password in this order:
--password-file- the
FREEOTP_PASSWORDenvironment variable - an interactive prompt
The password is never accepted as a command line argument, since other users could see it in the process list.
Logging¶
Set FREEOTP_EXPORT_READER_LOG_LEVEL to DEBUG, INFO, WARNING (default), ERROR or CRITICAL to control logging to stderr. Secrets are never logged.
Exit codes¶
| Exit code | Meaning |
|---|---|
| 0 | All tokens can be decrypted |
| 1 | Error, e.g. wrong password or invalid backup file |
| 3 | --check found tokens which cannot be decrypted |