Download the PHP package inigopascall/clone-db without Composer

On this page you can find all versions of the php package inigopascall/clone-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package clone-db

A Laravel package for cloning medium-size databases

This package was created as a solution to the problem of cloning medium/large databases between connections, for example pulling in a live database (or a subet of one) to staging or development environments where there is a need to play with real data. Large sql dump files are often too big to import in one go and can hit issues with memory limits (packet size), especially on micro servers. While this is an old problem, there are still surprisingly few straightforward ways to go about it. This package is an attempt at an out-of-the-box solution in the form of a Laravel package which provides a new artisan command for cloning one database to another.

Obviously, running this script is destructive. Please ensure backups of all relevant databases have been taken before starting.

Instructions

composer require inigopascall/clone-db

php artisan vendor:publish --provider="InigoPascall\CloneDB\Providers\CloneDBProvider"

1. Configure the config file as needed

app/config/clone-db.php

Sensible defaults have been pre-set, with examples given in the comments in this file of how to fine-tune things to suit your needs.

2. Make sure the source & target databases are configured correctly in your app's config

app/config/database.php

.env

3. run the command with the source & target connection names as parameters. Check & confirm output.

php artisan clone:db my_source_db_connection my_target_db_connection

Cloning a remote database via SSH

SSH config for your server pointing to the private key location

~/.ssh/config

Open SSH connection with ssh remoteservername -N -L 13306:localhost:3306 username@{server ip address}

app/config/database.php entry for the connection would then be set with localhost and the local port number specified in the above command (13306):


All versions of clone-db with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package inigopascall/clone-db contains the following files

Loading the files please wait ...