I have multiple client projects running on Sanity. I use a staging and production dataset for each, using staging for my local development. This way I can show them a staging site, using staging data, for new features or other changes.
I like to keep the staging dataset as close to production as much as possible. So, when I get to work on a new feature, I run:
sanity dataset export production && sanity dataset import production.tar.gz staging --replace && rm production.tar.gz
Now that my clients have been using Sanity for a bit, their assets have grown substantially and this command can take some time - and is also (probably) eating up our bandwidth.
I'd love to be able to do something like:
sanity dataset sync --from production --to staging
and (ideally) have it do a real 'sync', instead of an entire dump-and-upload.
This is a鈥β爂ood idea. It's put on the backlog 馃憤
Good one. We'd like this too!
Desperately needed. Something to consider is that exporting and importing with replace does not actually remove documents from the target dataset.
Any update on this one? Dataset management tools would be so great. In my current environment I'd love to be able to overwrite staging with production, but also update production with preview without overwriting custom changes made in production (in case I had to hotfix production)
This would be most welcome!
I'm having a similar issue that exporting and importing the prod dataset now takes ~2hrs in total... which will only get worse.
This feels like it'd be a massive addition!
Most helpful comment
This is a鈥β爂ood idea. It's put on the backlog 馃憤