Save db in temporary dir