db download script