Download the PHP package jairocgr/datashot without Composer

On this page you can find all versions of the php package jairocgr/datashot. 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 datashot

Datashot Database Snapper

A tool for taking partial and minified database snapshots for testing and development purpose.

Instead of taking a full database dump, you can filter which rows you want to dump in order to come up with a downsized database snapshot.

Requirements

To install and run datashot you must have:

Installing

Install it as a regular package via composer:

composer require jairocgr/datashot

Usage

You can call it as a command line tool:

php vendor/bin/datashot --help

Getting Started

With datashot you can filter which rows you want to dump to come up with a much smaller database dump.

You can reduce ginormous multi-gigabyte databases in to a small gziped file ready to be restored in to staging and local develoment environments.

This kind of power come up handy for troubleshooting production bugs and all arround better development experience with real life data that best reflects your application usage than a mocked or seeded schema.

With datashot you can for instance take a database dump with only the orders from the current quarter.

You can also perform other operations like:

Configuration

The first step is to setup the datashot.config.php file in the root of your application repository.

This is the configuration file where you set the database hosts, passwords and the SQL WHERE clauses in order to slice the database down.

For a more complete and commented and configuration file see the sample datashot.config.php file inside this repository root directory

Database Hosts

You have to configure all your database in order to be able to work with it.

Repositories

You have to set the repositories where you will store the dumps.

Snappers

The snappers tell datashot how to slice down the database.

Your First Snapshot

To take a database snapshot using the previously configured file:

php vendor/bin/datashot snap myerp --from live1 --to remote:quick_snap --snapper quick

Then datashot will take a proper mysqldump from the scheme myerp that is running inside the production server live1 and it will be using the quick snapper to cut the logs and users table down.

Then it will upload a file called quick.gz to the remote s3 repository called remote previously configured in the datashot.config.php configuration file.

Restoring Snapshots

You can use datashot to download and restore your snapshots:

php vendor/bin/datashot restore remote:quick --to dev --database myerp_dev

The command above will download the quick snapshot previously taken, restore the dump as myerp_dev schema at dev databaser server.

You can also restore the snapshot like a regular gziped SQL dump file:

gunzip < path/to/quick.gz | mysql -h localhost myerp

Hat Tipping

I tip my hat to ifsnop/mysqldump-php for providing insights on how to dump a mysql database via PHP/PDO.

License

This project is licensed under the MIT License - see the LICENSE file for details


All versions of datashot with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-pdo Version *
ext-zlib Version *
symfony/console Version ^5
symfony/process Version ^5
league/flysystem-aws-s3-v3 Version ^1
league/flysystem-sftp Version ^1
vlucas/phpdotenv Version ^5
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 jairocgr/datashot contains the following files

Loading the files please wait ....