Skip to content

Commit 4b2c26a

Browse files
committed
Merge branch 'release/v1.4.1'
2 parents 21b7582 + 033bdaf commit 4b2c26a

13 files changed

+56
-27
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [1.4.1] - 2020-09-08
10+
### Changed
11+
- Starting to unify messages.
12+
13+
### Fixed
14+
- URL switch for WordPress database.
15+
16+
917
## [1.4.0] - 2020-09-02
1018
### Added
1119
- wordpress flag (disabled by default) to backup wordpress database and imagery.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Magento 2 Production DB Sync v1.4.0
1+
# Magento 2 Production DB Sync v1.4.1
22

33
## About
44
A script to copy over a production database to another server, also has the ability to copy across imagery.
@@ -15,7 +15,7 @@ Currently the script is configured to attempt Magento 2 and WordPress database m
1515
## Installing and Updating
1616
To install or update the script run the following curl script
1717

18-
```curl -o- https://raw.githubusercontent.com/clivewalkden/bash-magento2-db-sync/v1.4.0/install.sh | bash```
18+
```curl -o- https://raw.githubusercontent.com/clivewalkden/bash-magento2-db-sync/v1.4.1/install.sh | bash```
1919

2020
## Usage
2121
To copy over a production database first get a shell on the system you want to copy the data to.

db-sync.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ echo -e "${bg_black}${txt_white} Copy over a production database to staging ${
2727
echo -e "${bg_black}${txt_white} ${txt_end}"
2828

2929
# Check for a local config file
30+
echo -e ""
3031
echo -e "${txt_blue} Checking for local configuration file (${conf_file}). ${txt_end}"
32+
echo -e ""
3133
if [[ -f "$conf_file" ]]; then
3234
. "$conf_file"
3335
fi
@@ -79,14 +81,12 @@ while true; do
7981
esac
8082
done
8183

82-
echo -e "${bg_black}${txt_white} ${txt_end}"
83-
echo -e "${bg_black}${txt_white} Run the Magento configuration. ${txt_end}"
84-
echo -e "${bg_black}${txt_white} ${txt_end}"
84+
echo -e ""
85+
echo -e "${txt_blue} Run the Magento configuration. ${txt_end}"
86+
echo -e ""
8587

8688
n98-magerun setup:upgrade
8789
echo
88-
n98-magerun deploy:mode:set developer
89-
echo
9090
n98-magerun setup:di:compile
9191
echo
9292
n98-magerun indexer:reindex

install.sh

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

99
dbsync_latest_version() {
10-
echo "v1.4.0"
10+
echo "v1.4.1"
1111
}
1212

1313
#

utils/local_backup.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22

33
if [ $_arg_local_backup == 'on' ]; then
44
# Backup the current local database
5-
echo -e "\n${txt_white}${bg_black}Backing up local database(s).${txt_end}\n"
5+
echo -e ""
6+
echo -e "${txt_blue} Backing up local database(s).${txt_end}"
7+
echo -e ""
68

7-
n98-magerun --root-dir="${PWD}" db:dump --compression="gzip" --force "../backups/$DATESTAMP-m2.sql.gz"
9+
n98-magerun --ansi --root-dir="${PWD}" db:dump --compression="gzip" --force "../backups/$DATESTAMP-m2.sql.gz"
810

911
if [ $_arg_wordpress == 'on' ]; then
10-
n98-magerun --root-dir="${PWD}" db:dump --compression="gzip" --connection="wordpress" --force "../backups/$DATESTAMP-wp.sql.gz"
12+
n98-magerun --ansi --root-dir="${PWD}" db:dump --compression="gzip" --connection="wordpress" --force "../backups/$DATESTAMP-wp.sql.gz"
1113
fi
1214
else
1315
# No local backup
14-
echo -e "\n${txt_white}${bg_black}Skipping local database(s) backup.${txt_end}\n"
16+
echo -e ""
17+
echo -e "${txt_blue} Skipping local database(s) backup.${txt_end}"
18+
echo -e ""
1519
fi

utils/local_imagery_import.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env bash
22

33
# Backup the current local database
4-
echo -e "\n${txt_white}${bg_black}Importing imagery from live.${txt_end}\n"
4+
echo -e ""
5+
echo -e "${txt_blue} Importing imagery from live.${txt_end}"
6+
echo -e ""
57

68
# Set the default directories to transfer
79
source=("/pub/media/" "/wp/wp-content/uploads/")

utils/local_import.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env bash
22

33
# Backup the current local database
4-
echo -e "\n${txt_white}${bg_black}Importing into local database(s).${txt_end}\n"
4+
echo -e ""
5+
echo -e "${txt_blue} Importing into local database(s).${txt_end}"
6+
echo -e ""
57

68
mysql -h$DB_HOST -u$DB_USER -p$DB_PASS $DB_DBASE<../backups/latest-m2.sql
79

utils/menu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
version="1.4.0"
2+
version="1.4.1"
33

44
die()
55
{

utils/remote_backup.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/usr/bin/env bash
22

33
# Use the settings to check your connection
4-
echo -e "\n${txt_white}${bg_black}Backing up remote database(s). ${txt_end}\n"
4+
echo -e "${bg_black}${txt_white} ${txt_end}"
5+
echo -e "${bg_black}${txt_white} Backing up remote database(s). ${txt_end}"
56
if [ $_arg_full == 'on' ]; then
6-
echo -e "${txt_white}${bg_black} Full customer and order backup.${txt_end}\n"
7+
echo -e "${bg_black}${txt_white} Full customer and order backup. ${txt_end}"
78
fi
9+
echo -e "${bg_black}${txt_white} ${txt_end}"
810

911
ssh -p "${remote_port}" "${remote_username}@${remote_host}" <<ENDSSH
1012
mkdir -p $remote_backup_dir
@@ -22,6 +24,6 @@ n98-magerun db:dump --compression="gzip" --strip="@log @sessions @trade @sales"
2224
fi
2325
2426
if [ $_arg_wordpress == 'on' ]; then
25-
n98-magerun db:dump --compression="gzip" --conneciton="wordpress" --force $remote_backup_dir/latest-wp.sql.gz
27+
n98-magerun db:dump --compression="gzip" --connection="wordpress" --force $remote_backup_dir/latest-wp.sql.gz
2628
fi
2729
ENDSSH

utils/remote_retrieve.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env bash
22

33
# Use the settings to check your connection
4-
echo -e "\n${txt_white}${bg_black}Retrieving database(s).${txt_end}\n"
4+
echo -e ""
5+
echo -e "${txt_blue} Retrieving database(s).${txt_end}"
6+
echo -e ""
57

68
remote_m2_db_file="$remote_backup_dir/latest-m2.sql.gz"
79
remote_wp_db_file="$remote_backup_dir/latest-wp.sql.gz"

0 commit comments

Comments
 (0)