throws IOException, XMLStreamException
{
AuthenticationKeyDatabase database = new AuthenticationKeyDatabase();
database.setKeys( manager.getAllKeys() );
RedbackKeyManagementJdoStaxWriter writer = new RedbackKeyManagementJdoStaxWriter();
FileWriter fileWriter = new FileWriter( new File( backupDirectory, KEYS_XML_NAME ) );
try
{
writer.write( fileWriter, database );
}
finally
{
IOUtil.close( fileWriter );
}