<p>This can be a challenging situation. Craft content can be highly relational which makes it tricky to just export and re-import.</p>

<p>Scenario 1: <em>If your database and your clients database were both equivalent before your client added the additional content, you may be able to just migrate over your clients database and replace your own database and get both back in sync.</em></p>

<p>To <strong>migrate the database</strong> would involve exporting the database from the clients environment (either via <code>Settings-&gt;Tools-&gt;Backup Database</code> or via a database admin tool) and reimporting it into your environment with a database admin tool. </p>

<p>Scenario 2: <em>If both you and your client made changes to your respective databases (for example, you both added articles in each environment) and you need to preserve the new articles added in your environment while also migrating over the articles added in the clients environment you have two options.</em></p>

<p>First, you could just <strong>manually re-enter the articles</strong> in the right environment. As it sounds like your client added a lot of articles, that might be time consuming, but sometimes these types of mistakes take time to correct manually. It's often the best option.  </p>

<p>In the case you added a few articles and your client added many articles, it may make more sense to add your articles to your clients database and then migrate the full database back to your servers as described in Scenario 1.</p>

<p>Your second option would be to <strong>migrate the content programmatically</strong>. This becomes a bit more technical so you'd probably need to get a front-end or back-end developer involved. And it will only make sense to go this route if the quantity of data you need to migrate is too much to just do manually.</p>

<p>A plugin like <a href="http://sprout.barrelstrengthdesign.com/craft-plugins/import" rel="nofollow noreferrer">Sprout Import</a> can help with this scenario. (Full disclosure, my team developed Sprout Import.) The steps would involve outputting the content from your clients database into a template into an importable JSON format. And then importing the content defined in the JSON file into your database.  The docs and examples within the plugin would go into more detail about the exact format you would need. For this answer, the more general point is that if your data was complex enough, a database migration plugin like Sprout Import could help provide a path toward a solution.</p>

CC BY-SA 3.0
2016-11-04T23:58:50.033Z
2016-11-05T01:38:55.460Z
2016-11-05T01:38:55.460Z
Ben Parizek
<p>You should be able to back up the database in the Settings panel in <em>your</em> version of Craft, and then drop the database on <em>his</em> server in PHPmyAdmin and load in the backup. This will replace everything on his server with what's on yours.</p>

CC BY-SA 3.0
2016-11-04T21:11:44.240Z
2016-11-04T21:11:44.240Z
strandall
<p>If your systems are <em>exactly</em> the same, you should be able to:</p>
<ol>
<li><p>back up the Craft database for each system: client and 'ours'.
This is your protection against errors or unknown issues, so don't
skip it please.</p>
</li>
<li><p>if your backup isn't a kind to create a full structure and content sql file for each database, make this kind of backup also, for safety and for the actual transfer of content that you want. A tool like Navicat should make this very easy, but your database administrator will know how.</p>
</li>
<li><p>you're fully backed up, right?</p>
</li>
<li><p>on the 'client' system, delete all tables in the Craft database, or drop the database itself, in which case you'll have to re-create it,set utf8mb4 character and sort, and add back allowed users. Again, a tool like Navicat can make this easy, and your database administrator should know how.</p>
</li>
<li><p>with the now-empty 'client' database, execute (play back) the structure and content sql file from the 'ours' system, that you createdd in step a) or b)</p>
</li>
<li><p>now the 'client' system is running with the same data as the 'ours' system, so you will have successfully transferred the work they did there.</p>
</li>
</ol>
<p>Caveat. If the client actually did some work on their system, like setting up users or adding/changing content, this would be lost.</p>
<p>Recovering it from the backup won't be possible, as complex record identities and relations won't be the same. The way to prepare for this is to re-key any extra work like this into the 'ours' Craft system, before you do the backups and start the above procedure. If you don't prepare this way, then you can re-key on the client system after you've moved the 'ours' data to it as above.</p>
<p>I think I've covered everything, but have your database administrator look at these notes and have a think about it.</p>
<p>Good fortune, and since you're near the beginning, probably the worst that could happen is to need more re-keying.</p>
<p>This procedure is the one many developers use all the time -- it's standard.</p>
<p>If you have doubts, please don't use this process; instead, re-key the missing work, as that will be safest.</p>
<p>If the procedure fails, you will have your structure-and-content sql file, and can replay it into the client database after emptying it again, to restore the current situation. Or use your other database backup restore method from step a), if there was one.</p>

CC BY-SA 4.0
2016-11-04T21:17:50.923Z
2024-01-31T00:15:22.510Z
2024-01-31T00:15:22.510Z
narration_sd
<p>Our client build tons of articles in our craft system instead of <em>his</em>. Both systems have the identical structure, in fact, his system is a exact copy of ours, which runs on a different server. How can we move all <em>his</em> content on  <em>our</em>  craft system into  <em>his</em>  system?</p>

<p>(As you may have noticed I am not a developer. I hope you get what my problem is here ... )</p>

CC BY-SA 4.0
2023-04-11T18:09:51.770Z
@brad-bell do you have any recommendation? We have 2 environments TEST and PROD. Each environment has different set of users /permissions, graphql keys, SSO integration, redirects. Simply importing whole DB drops environment specific values.
dhumketu
<migration><import>
How can I export or move content from one Craft system into another? (with exactly the same configuration)
# How can I export or move content from one Craft system into another? (with exactly the same configuration)

(Asked by: username_0 on 2016-11-04)

Our client build tons of articles in our craft system instead of *his*. Both systems have the identical structure, in fact, his system is a exact copy of ours, which runs on a different server. How can we move all *his* content on *our* craft system into *his* system?

(As you may have noticed I am not a developer. I hope you get what my problem is here ... )

**Tags:** migration, import
> **Comments:**
> **username_1**: @brad-bell do you have any recommendation? We have 2 environments TEST and PROD. Each environment has different set of users /permissions, graphql keys, SSO integration, redirects. Simply importing whole DB drops environment specific values.  

---

## 3 answers

### Answer by username_2 on 2016-11-04. Score: 4

This can be a challenging situation. Craft content can be highly relational which makes it tricky to just export and re-import.

Scenario 1: *If your database and your clients database were both equivalent before your client added the additional content, you may be able to just migrate over your clients database and replace your own database and get both back in sync.*

To **migrate the database** would involve exporting the database from the clients environment (either via `Settings->Tools->Backup Database` or via a database admin tool) and reimporting it into your environment with a database admin tool.

Scenario 2: *If both you and your client made changes to your respective databases (for example, you both added articles in each environment) and you need to preserve the new articles added in your environment while also migrating over the articles added in the clients environment you have two options.*

First, you could just **manually re-enter the articles** in the right environment. As it sounds like your client added a lot of articles, that might be time consuming, but sometimes these types of mistakes take time to correct manually. It's often the best option.

In the case you added a few articles and your client added many articles, it may make more sense to add your articles to your clients database and then migrate the full database back to your servers as described in Scenario 1.

Your second option would be to **migrate the content programmatically**. This becomes a bit more technical so you'd probably need to get a front-end or back-end developer involved. And it will only make sense to go this route if the quantity of data you need to migrate is too much to just do manually.

A plugin like [Sprout Import](http://sprout.barrelstrengthdesign.com/craft-plugins/import) can help with this scenario. (Full disclosure, my team developed Sprout Import.) The steps would involve outputting the content from your clients database into a template into an importable JSON format. And then importing the content defined in the JSON file into your database. The docs and examples within the plugin would go into more detail about the exact format you would need. For this answer, the more general point is that if your data was complex enough, a database migration plugin like Sprout Import could help provide a path toward a solution.


---

### Answer by username_3 on 2016-11-04. Score: 1

You should be able to back up the database in the Settings panel in *your* version of Craft, and then drop the database on *his* server in PHPmyAdmin and load in the backup. This will replace everything on his server with what's on yours.


---

### Answer by username_4 on 2016-11-04. Score: 1

If your systems are *exactly* the same, you should be able to:

1. back up the Craft database for each system: client and 'ours'.
   This is your protection against errors or unknown issues, so don't
   skip it please.
2. if your backup isn't a kind to create a full structure and content sql file for each database, make this kind of backup also, for safety and for the actual transfer of content that you want. A tool like Navicat should make this very easy, but your database administrator will know how.
3. you're fully backed up, right?
4. on the 'client' system, delete all tables in the Craft database, or drop the database itself, in which case you'll have to re-create it,set utf8mb4 character and sort, and add back allowed users. Again, a tool like Navicat can make this easy, and your database administrator should know how.
5. with the now-empty 'client' database, execute (play back) the structure and content sql file from the 'ours' system, that you createdd in step a) or b)
6. now the 'client' system is running with the same data as the 'ours' system, so you will have successfully transferred the work they did there.

Caveat. If the client actually did some work on their system, like setting up users or adding/changing content, this would be lost.

Recovering it from the backup won't be possible, as complex record identities and relations won't be the same. The way to prepare for this is to re-key any extra work like this into the 'ours' Craft system, before you do the backups and start the above procedure. If you don't prepare this way, then you can re-key on the client system after you've moved the 'ours' data to it as above.

I think I've covered everything, but have your database administrator look at these notes and have a think about it.

Good fortune, and since you're near the beginning, probably the worst that could happen is to need more re-keying.

This procedure is the one many developers use all the time -- it's standard.

If you have doubts, please don't use this process; instead, re-key the missing work, as that will be safest.

If the procedure fails, you will have your structure-and-content sql file, and can replay it into the client database after emptying it again, to restore the current situation. Or use your other database backup restore method from step a), if there was one.


---

