Codebook's Export feature is available on macOS and Windows, it is not available on Android and iOS.
To export your database, select the File menu > Export.
Due to its general ubiquity in other apps, Codebook provides data for export in CSV format, as well as a plain-text option (e.g. for printing a physical backup). The following options are available under the File > Export menu:
Export Database will export all of your records, and Export Favorites will limit the list of records exported to those in the Favorites list. In the dialog that appears you can select your export format:
|Entry||The name of the record.|
|Category||The name of the category the record will be assigned.|
|Note Entry||If the record is a Note this field contains the text.|
|Entry Icon||The icon in Codebook to assign to the record.|
|Category Icon||The icon in Codebook to assign to the category.|
|All other columns||List the fields for each record.|
A sample file might look something like this:
Entry,Category,Account,Email,Note,Password,Phone,PIN,Username,Website "Credit Card",Financial,3759 876613 21001,,"exp:12/12 CVV:3829",secret,1-800-123-4567,4,mscott,http://mycreditcard.com "Insurance Policy",Financial,3759 876613 21001,,secret: name of your first pet? spot,secret,1-800-123-4567,4,mscott,http://myinsurance.com "Shopping Website",Personal,,email@example.com,,secret,,,,http://paypal.com
Note that newlines are supported in a CSV as long as the data is properly escaped, so the number of lines in the export file will likely exceed the number of records exported. It's best to spot-check your exported data in a spreadsheet editor before doing something else with it.
Codebook CSV is a modification of the CSV format intended so that you can export and re-import your data to Codebook.
A record in Codebook can have any number of Fields attached to it, even the same type of field multiple times. For instance, an Entry record could have two Password fields attached to it. Normally on export Codebook will concatenate these values with a newline (
\n) character. However, if you select Codebook CSV format instead, Codebook will join these values by a
| (pipe) character as the field value to use for the Password column for that record. However, since your data may legitimately have the pipe characters, those are escaped with a
\ (backslash) character.
Let's suppose we have a database with two records, where the first has two Password fields, and the second has one Password field with a
| in it,
f|x7h3r4t3s. The exported data would look like this:
Entry,Category,Email,Password "Bank of Mars",Financial,firstname.lastname@example.org,myoldpassword|mynewpassword "Bank of Duckberg",Financial,email@example.com,f\|x7h3r4t3s
This means that to use these values you'll need to process them and scan for escaped pipes. Because these values are escaped in this way, you can directly import a Codebook CSV Export without modifying the file.