Add export option to write to file
Rejig command line options around export
Add import action

Can import from stdin or file, and from multiple formats.

An option means you can delete and completely replace the database.  So you can
now export the database, make many edits, delete ones you don't want and then
re-import it.