<commit_before># Backup

## **Introduction**

Backup is a Laravel package that allow the creation and restoration of database backups in an easy way.

## **Quick Installation**

Begin by installing this package through Composer.

You can run:

    composer require paulvl/backup 1.*

Or edit your project's composer.json file to require paulvl/backup.
```
    "require": {
        "paulvl/backup": "1.*"
    }
```
Next, update Composer from the Terminal:

    composer update

Once the package's installation completes, the final step is to add the service provider. Open `config/app.php`, and add a new item to the providers array:

```
Backup\BackupServiceProvider::class,
```

Finally publish package's configuration file:

    php artisan vendor:publish --provider="Backup\BackupServiceProvider"

Then the file `config/backup.php` will be created.

That's it! You're all set to go. Run the artisan command from the Terminal to see the new `backup` commands.

    php artisan

## **Mysql**

### **Creating a backup**
To make a backup of you current aplicationa database you have to run:

    php artisan backup:mysq-dump

This will create an `.sql` file on your configured path like `/this/is/my/path/dbname_20150101201505.sql`, this file is named using current datetime. If you want a custom name run:

    php artisan backup:mysql-dump example

This will create an `.sql` file on your configured path like `/this/is/my/path/example.sql`

### **Restoring database from file**
To restore a backup to your current aplicationa database you have to run:

    php artisan mysql:restore filename

This will restore the `/this/is/my/path/filename.sql` file stored on your configured.

### **Programing backups**
If you need to perform a backup for example, every day at midnight, at this like to yor schedule function on `app/Console/Commands/Kernel.php`:
```
protected function schedule(Schedule $schedule)
{
...
    $schedule->command('backup:mysql-dump')->dailyAt('00:00');
...
}
```
## **Contribute and share ;-)**
If you like this little piece of code share it with you friends and feel free to contribute with any improvements.
<commit_msg>Updated readme.me file<commit_after># Backup

Backup is a Laravel package that allow the creation and restoration of database backups in an easy way.

[![Latest Stable Version](https://poser.pugx.org/paulvl/backup/v/stable)](https://packagist.org/packages/paulvl/backup)  [![Latest Unstable Version](https://poser.pugx.org/paulvl/backup/v/unstable)](https://packagist.org/packages/paulvl/backup) [![License](https://poser.pugx.org/paulvl/backup/license)](https://packagist.org/packages/paulvl/backup) [![Total Downloads](https://poser.pugx.org/paulvl/backup/downloads)](https://packagist.org/packages/paulvl/backup)

## **Quick Installation**

Begin by installing this package through Composer.

You can run:

    composer require paulvl/backup 1.*

Or edit your project's composer.json file to require paulvl/backup.
```
    "require": {
        "paulvl/backup": "1.*"
    }
```
Next, update Composer from the Terminal:

    composer update

Once the package's installation completes, the final step is to add the service provider. Open `config/app.php`, and add a new item to the providers array:

```
Backup\BackupServiceProvider::class,
```

Finally publish package's configuration file:

    php artisan vendor:publish --provider="Backup\BackupServiceProvider"

Then the file `config/backup.php` will be created.

That's it! You're all set to go. Run the artisan command from the Terminal to see the new `backup` commands.

    php artisan

## **Mysql**

### **Creating a backup**
To make a backup of you current aplicationa database you have to run:

    php artisan backup:mysq-dump

This will create an `.sql` file on your configured path like `/this/is/my/path/dbname_20150101201505.sql`, this file is named using current datetime. If you want a custom name run:

    php artisan backup:mysql-dump example

This will create an `.sql` file on your configured path like `/this/is/my/path/example.sql`

### **Restoring database from file**
To restore a backup to your current aplicationa database you have to run:

    php artisan mysql:restore filename

This will restore the `/this/is/my/path/filename.sql` file stored on your configured.

### **Programing backups**
If you need to perform a backup for example, every day at midnight, at this like to yor schedule function on `app/Console/Commands/Kernel.php`:
```
protected function schedule(Schedule $schedule)
{
...
    $schedule->command('backup:mysql-dump')->dailyAt('00:00');
...
}
```
## **Contribute and share ;-)**
If you like this little piece of code share it with you friends and feel free to contribute with any improvements.


{'fraction_non_alphanumeric': 0.10736131617802151, 'fraction_numerical': 0.008437038599451592, 'mean_word_length': 4.228224917309813, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3765144', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1349, 'n_words': 544}