Write settings for DB
Sync DB