Download the PHP package ambirus/backup without Composer

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

An easy way backup and restore databases in Laravel.

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality

For Laravel 5.x, check version 2.7.0

For Laravel 4.x, check version 1.3.0

Think of Backup as an easy way to backup and restore a database, with command line integration to Laravel's artisan. These include:

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require cornford/backup.

"require": {
    "cornford/backup": "3.*"
}

Next, update Composer from the Terminal:

composer update

Once this operation completes, the next step is to add the service provider. Open config/app.php, and add a new item to the providers array.

Cornford\Backup\Providers\BackupServiceProvider::class,

The next step is to introduce the facade. Open config/app.php, and add a new item to the aliases array.

'Backup'         => Cornford\Backup\Facades\BackupFacade::class,

Finally we need to introduce the configuration files into your application.

php artisan vendor:publish --provider="Cornford\Backup\Providers\BackupServiceProvider" --tag=backup

That's it! You're all set to go.

Configuration

You can now configure Backup in a few simple steps. Open config/backup.php and update the options as needed.

Usage

It's really as simple as using the Backup class in any Controller / Model / File you see fit with:

Backup::

This will give you access to

Export

The export method allows a database export file to be created in the defined backup location, with an optional filename option.

Backup::export();
Backup::export('database_backup');

Restore

The restore method allows a database export file to be restored to the database, specifying a full filepath to the file.

Backup::restore('./database_backup.sql');

Set Backup Engine Instance

The setBackupEngineInstance method allows a custom backup engine instance object to be utilised, implementing the BackupEngineInterface.

Backup::setBackupEngineInstance(new BackupEngineMysql(new BackupProcess(new Symfony\Component\Process\Process), 'database', 'localhost', 3306, 'root', '', []));

Get Backup Engine Instance

The getBackupEngineInstance method returns the current backup engine instance object.

Backup::getBackupEngineInstance();

Set Backup Filesystem Instance

The setBackupFilesystemInstance method allows a custom backup filesystem instance object to be utilised, implementing the BackupFilesystemInterface.

Backup::setBackupFilesystemInstance(new BackupFilesystemInstance);

Get Backup Filesystem Instance

The getBackupFilesystemInstance method returns the current backup filesystem instance object.

Backup::getBackupFilesystemInstance();

Set Enabled

The setEnabled method allows backup to be switched on or off, specifying a bool for state.

Backup::setEnabled(true);
Backup::setEnabled(false);

Get Enabled

The getEnabled method returns the current backup enabled status, returning a bool for its state.

Backup::getEnabled();

Set Path

The setPath method allows backup location path to be set, specifying a relative or absolute path as a string, a trailing slash is required.

Backup::setPath('/path/to/directory/');

Get Path

The getPath method returns the current absolute backup path in string format.

Backup::getPath();

Set Compress

The setCompress method allows backup file compression to be switched on or off, specifying a bool for state.

Backup::setCompress(true);
Backup::setCompress(false);

Get Compress

The getCompress method returns the current compression backup status, returning a bool for its state.

Backup::getCompress();

Set Filename

The setFilename method allows backup filename to be set, specified in a string format.

Backup::setFilename('database_backup');
Backup::setFilename('backup-' . date('Ymd-His'));

Get Filename

The getFilename method returns the current set backup filename in a string format.

Backup::getFilename();

Get Working Filepath

The getWorkingFilepath method returns the current set working filepath of the current item being processed in a string format.

Backup::getWorkingFilepath();

Get Restoration Files

The getRestorationFiles method returns an array containing all of the restoration file filepaths within a give path, an optional absolute path can be set as a string.

Backup::getRestorationFiles();
Backup::getRestorationFiles('/path/to/directory/');

License

Backup is open-sourced software licensed under the MIT license


All versions of backup with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
illuminate/support Version ^6.0 || ^7.0 || ^8.0
illuminate/console Version ^6.0 || ^7.0 || ^8.0
illuminate/config Version ^6.0 || ^7.0 || ^8.0
symfony/process Version ^4.3
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 ambirus/backup contains the following files

Loading the files please wait ....