Updated restoreDatabase to write backups on /temp folder