Add database export function
Merge branch 'create-files-from-db'