codicastudio/backup-manager

A random Codica Studio package.

1.0.0 2020-09-25 01:53 UTC

This package is auto-updated.

Last update: 2024-04-25 13:11:29 UTC


README

This Nova tool lets you:

  • list all backups
  • create a new backup
  • download a backup
  • delete a backup

Behind the scenes spatie/laravel-backup is used.

screenshot of the backup tool

You can see the tool in action in this video on YouTube.

Support us

Learn how to create a package like this one, by watching our premium video course:

Laravel Package training

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Requirements

Make sure you meet the requirements for installing spatie/laravel-backup.

Installation

First you must install spatie/laravel-backup into your Laravel app. The installation instructions are here. When successfull running php artisan backup:run on the terminal should create a backup and php artisan backup:list should return a list with an overview of all backup disks.

You can install the nova tool in to a Laravel app that uses Nova via composer:

composer require spatie/nova-backup-tool

Next up, you must register the tool with Nova. This is typically done in the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvder.php

// ...

public function tools()
{
    return [
        // ...
        new \Spatie\BackupTool\BackupTool(),
    ];
}

Finally you should setup a queue. This tool doesn't care what kind of queue as long as you don't use the sync driver.

Configuration

You can optionally publish the config file with:

php artisan vendor:publish --provider="Spatie\BackupTool\BackupToolServiceProvider" --tag="config"

This is the contents of the published config file:

<?php

return [
    /*
     * Enable or disable backup tool polling.
     */
    'polling' => true,

    /*
     * Interval seconds between polling requests.
     */
    'polling_interval' => 1,
];

Usage

Click on the "Backups" menu item in your Nova app to see the backup tool.

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.