DB-prepare
Usage
db-prepare has been tested with Node.js v10.15.0
Install the dependencies
$ npm i -g @hugohammarstrom/db-prepare
Run the command with
$ db-prepare --config "path to config file"
Config:
version: 1
dumpfile: db.sql #path to the original dumpfile
output_file: name-{date}-{time}-localhost.txt #date and time can be used in the name
installation_path: /Applications/MAMP/htdocs/wordpress #if using the export feature this is the path that is used to export the database
server_url: http://localhost:8080 #server_url if using monitoring
no_export: true #enable and disable the export feature
no_delete: false #delete the outputfile after succesfull upload to google cloud
no_delete_original: true #delete the original dumpfile after succesfull search and replace
slack:
disabled: false
webhook_url: https://hooks.slack.com/services/AAAAAAAAA/BBBBBBBBB/CCCCCCCCC #the webhook url that is used when sending messages
gcloud:
disabled: false
project_id: db-prepare #google cloud project id
keyfile: secrets/service-account.json #google cloud keyfile
bucket: bucketname #bucket that will be used to upload to google cloud
sites:
- steps:
- search: https://olddomain.com
replace: https://newdomain.com
- steps:
- search: https://another_olddomain.com
replace: https://another_newdomain.com