Repository navigation
Importing and Exporting Data
The OTP Generator supports import and export of service definitions from and to CSV format files. The format is illustrated below:
Name,Account,Secret
"Service #1","someone@some.domain.com","JZXGKWDXGJIWQMLXJVHHQ5BWJ5GTGWLBPFDUUR3KJR5G63SGGF2ESTKKPBRTE2TULJ2WOUQ"
"Service #2","someone@some.domain.com","OJTHQZSCIRFEMWTOK5MHEMTKMYYEQ5CKJRFXS2DZGZMESVKWGFCA"
"Service #3","someone@some.domain.com","KVATON3LPJGGSWDCLFNGI6TYG5HE4NTVGFBTMTJXLBUWST3M"
"Service #4","someone@some.domain.com","NZ4XQ6DRIM3FSWRUJFIUYYTKN5JDS42SGFUTQVCSJEYDAS2ZN5VWO6A"
"Service #5","someone@some.domain.com","JIZWYRLQIVBXIMJYGVVWOS3EONTUKOKPMRKUM5CRM5LWOSDROBKGQ4KWGJ3XG5TP"Note that all fields are quoted "...".
Note
The secrets provided when 2FA is configured with a service are sensitive data and should not be disclosed. Import/export via CSV file is supported solely to aid migration into and out of the application. The secrets are shown in clear text in the CSV files so they should be kept only for as long as is necessary to effect the transfer, after which they should be deleted.
To import service definitions into the application, use the following command:
/path/to/OtpGenerator.Terminal --import /path/to/csv/file
Where:
| Argument | Comments |
|---|---|
| /path/to/OtpGenerator.Terminal | The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows |
| /path/to/csv/file | Full path to the CSV file to import |
The application will respond as follows:

To export the current entries from the database, use the following command:
/path/to/OtpGenerator.Terminal --export /path/to/csv/file
Where:
| Argument | Comments |
|---|---|
| /path/to/OtpGenerator.Terminal | The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows |
| /path/to/csv/file | Full path to the CSV file to which the data should be written |
The application will respond as follows:
