You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-4Lines changed: 27 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,32 @@
1
-
# Magento 2 Production DB Sync v1.0.0
1
+
# Magento 2 Production DB Sync v1.1.0
2
2
3
-
A script to copy over a production database to a staging server.
3
+
## About
4
+
A script to copy over a production database to another server, also has the ability to copy across imagery.
4
5
5
-
You can save a configuration file in the Magento directory to save answering some of the questions.
6
+
Currently the script is configured to attempt Magento 2 and WordPress database migrations and assumes you have your WordPress database details configured in the `magento/app/etc/env.php` file as a second `connection`.
7
+
8
+
## Requirements
9
+
- You need curl installed locally.
10
+
- The excellent [n98-magerun2](https://github.com/netz98/n98-magerun2) needs to be installed on both the local machine and the production machine. (Needs to be executable as n98-magerun).
11
+
- MySQL (or equivalent) needs to be installed on both the local machine and the server (obviously).
12
+
- Magento 2 needs to be installed and configured on both the local and the host machine.
13
+
- rsync needs to be installed locally.
14
+
15
+
## Installing and Updating
16
+
To install or update the script run the following curl script
To copy over a production database first get a shell on the system you want to copy the data to.
21
+
22
+
> Notes: If using SSH to connect to the host machine make sure you've connected with the -A flag so that your ssh agent is forwarded to allow additional connections.
23
+
24
+
Execute the script in your Magento directory
25
+
```
26
+
$ db-sync.sh
27
+
```
28
+
29
+
You can save a configuration file in the Magento directory to save answering some of the questions. An example is included in this repository [example.conf](./example.conf)
0 commit comments