Roots Discourse

Sync Script initial setup

#1

I’m trying to get this Sync Script setup and running but I get the following errors:

:white_check_mark: Able to connect to development
:white_check_mark: Able to connect to staging

./sync.sh: line 94: wp: command not found
building file list …
3715 files to consider
rsync: connection unexpectedly closed (8 bytes received so far) [sender
]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoo
t/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/io.c(
453) [sender=2.6.9]

:arrows_counterclockwise: Sync from development to staging complete.

AND since I haven’t really seen much talk about this script, it’s a great idea and you can buy it here:

0 Likes

#2

Looks like you need to install WP-CLI on your host machine

0 Likes

#3

It transferred all the media files from dev to staging but did not transfer the db.

0 Likes

#4

These are screenshots of WP-CLI installed on your Vagrant box and on a remote environment

You need to install WP-CLI on your host machine, which is also where the sync script is ran from

0 Likes

#5

Please forgive my ignorance.

I’ve followed these instructions:

OS:     Darwin 18.2.0 Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64 x86_64
Shell:  /bin/bash
PHP binary:     /usr/bin/php
PHP version:    7.1.23
php.ini used:
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.1.0

After doing so, when running the script it’s now unable to connect.

Not sure what I’m doing so I apologize in advance.

0 Likes

#6

Have you followed the setup instructions and setup WP-CLI aliases for all of your environments? The README has examples — you’ll need to deploy after committing your updates to site/wp-cli.yml

0 Likes

#7

I did follow the instructions from the readme but have not deployed. Will do that now and try again. Thanks!

0 Likes

#8

Awesome, the deploy solved the problem.

This script kicks ass, thanks for making it!

1 Like

#9

Glad it’s all sorted! You’re welcome, and thank you for buying it :smiley:

1 Like

#10

This is so much faster and fluid than using delicious brains plugin. I know they both offer different advantages and disadvantages as this needs bedrock to function. Thanks for offering it at a good price. Highly recommended. Roots rules. Odoyle rules!

0 Likes

#11

It would be awesome if this could be modified to place the development db backup in a folder to have git ignore. I work on a few projects that are massive databases and I always forget to move the database backup before pushing my changes to github.

0 Likes

#12

Never mind, I’ll ignore sql files but anyways.

0 Likes