Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.13 KB

README.md

File metadata and controls

38 lines (29 loc) · 1.13 KB

Remote Database Sync

This package allows you to sync a remote database to your local environment.

Installation

You can install the package via composer:

Add the following to your composer.json file:

"repositories": [
  {
    "type": "vcs",
    "url": "https://github.com/doeanderson/remote-database-sync"
  }
]
composer require --dev doeanderson/remote-database-sync

Config

You can publish the config file with:

php artisan vendor:publish --tag="remote-database-sync-config"

❗ This package uses the prodigyphp/laravel-ssh-tunnel package to create an SSH tunnel to the remote server. You will need to configure the tunneler package before using this package. Afterward you can configure per-environment tunnels in your config/remote-database-sync.php file. The published config file has an example of how to do this.

Usage

php artisan db:download-remote

You will be prompted to save an optiona local database backup, select which remote environment to download from and which individual database tables to download.