oscklm
oscklm•8mo ago

clear a dev deployment

2 quick questions: 1. Is there a way to wipe/reset a dev server? (other than snapshot --replace) 2. Is there some way to delete all files in storage for a dev server?
6 Replies
lee
lee•8mo ago
the supported way, for both tables and file storage, is to do npx convex import --replace with a zip file that has empty data for each table and _storage. there's currently no other way, although we are considering building one.
oscklm
oscklmOP•8mo ago
Alright so basically taking a snapshot like one i already have exported and "clearing it out", would do the trick. Is that correctly understood?
lee
lee•8mo ago
yep that's exactly it
oscklm
oscklmOP•8mo ago
Cool. I'll do that. Thanks for the quick response 🥷
ballingt
ballingt•8mo ago
Re 2) there's an API to list all files which you can then walk over and delete https://docs.convex.dev/file-storage/file-metadata
Accessing File Metadata | Convex Developer Hub
Every stored file is reflected as a document in the "_storage" system table.
oscklm
oscklmOP•8mo ago
Totally missed that. Thanks Tom!

Did you find this page helpful?