Skip to content

Commit 89ec57a

Browse files
committed
Merge tag 'v1.1.0' into development
- Installer - Example [config file](./example.conf) - [Changelog](./CHANGELOG.md) - README.md includes more information
2 parents 24b807e + ffeb3f6 commit 89ec57a

File tree

4 files changed

+42
-7
lines changed

4 files changed

+42
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
9+
## [1.1.0] - 2020-07-10
810
### Added
911
- Installer
12+
- Example [config file](./example.conf)
13+
- [Changelog](./CHANGELOG.md)
14+
15+
### Changed
16+
- README.md includes more information
17+
1018

1119
## [1.0.0] - 2020-07-09
1220
### Added

README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
1-
# Magento 2 Production DB Sync v1.0.0
1+
# Magento 2 Production DB Sync v1.1.0
22

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.
45

5-
## Installation
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
616
To install or update the script run the following curl script
7-
```curl -o- https://raw.githubusercontent.com/clivewalkden/bash-magento2-db-sync/development/install.sh | bash```
17+
```curl -o- https://raw.githubusercontent.com/clivewalkden/bash-magento2-db-sync/v1.1.0/install.sh | bash```
18+
19+
## Usage
20+
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+
```
828

9-
You can save a configuration file in the Magento directory to save answering some of the questions.
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)
1030

1131
```bash
1232
remote_host=cotswoldcollections.com
@@ -18,4 +38,3 @@ remote_backup_dir=/opt/magento/backups
1838
remote_shared_deployment_dir=/opt/magento/deployment/shared/magento
1939
```
2040

21-
| Notes: Make sure you've connected to the host machine with the -A flag so that your ssh agent is forwarded to allow additional connections.

example.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Configuration file for db-sync (https://github.com/clivewalkden/bash-magento2-db-sync)
2+
remote_host=domain.com
3+
remote_domain=www.domain.com
4+
remote_port=22
5+
remote_username=magento
6+
remote_magento_dir=/opt/magento/magento2
7+
remote_backup_dir=/opt/magento/backups
8+
remote_shared_deployment_dir=/opt/magento/deployment/shared/magento

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dbsync_install_dir() {
77
}
88

99
dbsync_latest_version() {
10-
echo "v1.0.0"
10+
echo "v1.1.0"
1111
}
1212

1313
#

0 commit comments

Comments
 (0)