Restore tmp folder and database config