What’s the best way to transfer a Directus instance from one environment to another?

For example, from local to production, or just for making simple copies.

I remember there used to be a snapshot command, or maybe even a more recent extension that made data transfers easier, including both schema and data.

This one

It seems like this info has disappeared from the docs — or at least I can’t find it anymore. I think this kind of guidance would be helpful for more than just me :slight_smile:

Here’s the error I got with the extension :frowning:

Thanks, bunnies! :rabbit:

2 Answers

2

This is definitely a tough question to answer because there are different pieces you might want to migrate from one environment to another.

You could be looking to migrate:

  • Just your data model/schema
  • Configuration settings
  • Content and assets
  • The entire instance

Migration Options

Here are a few approaches depending on what you need:

Schema & Configuration Only

Full Instance Migration

The migration extension is probably your best bet to get started, then you can layer on additional tools based on your specific needs.

I recently discover this new tools for those who are looking for a bootstrap tool.

It’s look really cool. Can’t wait to make my own.

Hope I’ll can use it with a docker compose file :smiley:

Or maybe this one could fit your usecase: https://community.directus.com/t/full-directus-backup-restore-solution-docker-based-feedback-wanted/2078 It can be as simple as downloading a backup file, upload it to the other instance and restore. However this would be a full 1:1 backup.