'Is there a way to backup/export & import Strapi data
So I am at the place where I lost all of my Strapi data after moving from local to remote host and deploying my Strapi through herokuapp.com
I am using Strapi in my personal NEXT.JS project.
Luckily my Strapi database wasn't so huge and all content-types were kept so I was able to recreate the database quite quick. Also this was just a personal project.
I am wondering though, if I decide to push Strapi to use in in more professional context and in real project – how do I move from local development to deployment without loosing all data?
Is there a way to export everything before deployment and then import it into the deployed CMS or how does this work?
Also – what if I want to do it the other way around? I will keep working on my app using my Strapi on Heroku but at some point I will want to replicate the CMS locally. Where is the data stored and how do it get access to it?
Solution 1:[1]
And there is no export/import content for now.
To export your data for example from the local environment to the production you have to handle:
- content-types - Strapi store this stuff at files so version control will help
- database data - you have to make database backup manually and then import data at the production server
- static files - if you use Srapi to handle the static files you probably will have to copy them manually and import them to the production server or use version control for it (bad option). They are stored at
app/public/uploads
I didn't tried this myself but it looks like a pretty tough task.
Conclusion: if it's OK for you to migrate only your content types, just put a git on your Strapi folder
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |