Closed abdullah-kasim closed 1 month ago
✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.
Package | Version | Score | Details |
---|
This is awesome!
For future ref, here's some minimal performance tests that I've run with importing a 3 GB dump:
# vip dev-env import - mydumper - 10 SRs with wp search-replace
real 20m55.033s
user 0m31.632s
sys 0m5.237s
# vip dev-env import mydumper - 0 SRs
real 3m55.207s
user 0m30.658s
sys 0m6.472s
# 17 minutes for 10 SRs
# 1.7 minutes per SR with wp search-replace
# vip dev-env import - mysqldump - 0 SRs:
real 10m15.278s
user 0m19.742s
sys 0m6.805s
# mysqldump - no streaming by copying file into docker container.
real 10m4.920s
user 0m11.425s
sys 0m2.730s
# vip search-replace - 10 SRs with go-search-replace.
real 0m32.049s
user 0m33.223s
sys 0m12.168s
# winner: go-search-replace with mydumper.
Issues
4 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Description
This PR adds support for mydumper-based SQL dumps for almost all commands that interact with SQL dumps.
Those commands are:
vip dev-env sync sql
vip dev-env import sql
vip search-replace
What's currently not supported is:
vip import sql
- the post-processing involved is included in this PR, but this also requires a back-end change so that the endpoint it's communicating with can read amydumper
file. For now, it's best to use the datasync feature.Pull request checklist
New release checklist
Steps to Test
For testing
vip dev-env sync
:npm run build:watch
p6jPRI-8tH
shortlink on how to make a site be part of one../dist/bin/vip-dev-env-create.js @0000.production --slug=0000-production
where0000
is your testing site id. I also suggest that you add phpmyadmin for validation purposes./dist/bin/vip-dev-env-start.js @0000.production --slug=0000-production
./dist/bin/vip-dev-env-sync-sql.js @0000.production --slug=0000-production
and your local dev environment should now have its database ready - with all the search and replace working.For testing
vip dev-env import sql
:vip dev-env sync
../dist/bin/vip-dev-env-import-sql.js <path-to-mydumper-sql-file> --slug=0000-production
./dist/bin/vip-dev-env-import-sql.js <path-to-mydumper-sql-file> --slug=0000-production --search-replace="from,to"
as per its recommendation.0000-production
will work, just like a mysqldump-based file.For testing
vip search-replace
:vip dev-env sync
./dist/bin/vip-search-replace.js <mydumper-file> --search-replace="some.from.domain,some.to.domain" --output="result.sql"
. The resulting file should have metadata headers i.e.-- some_db_wp_site.00000.sql -1
with a -1 at the back. It will also properly replace the values listed in search-replace.