2017 © Pedro Peláez
 

utility multisite-backup-command

A wrapper around spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server

image

timacdonald/multisite-backup-command

A wrapper around spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server

  • Monday, April 23, 2018
  • by timacdonald
  • Repository
  • 1 Watchers
  • 2 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Multisite Backup Command for spatie/laravel-backup

Latest Stable Version Total Downloads License, (*1)

This command wraps the spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server - from the one Laravel installation. You can read more about is over on my blog., (*2)

Installation

You should already have spatie/laravel-backup installed and configured., (*3)

You can install using composer from Packagist., (*4)

$ composer require timacdonald/multisite-backup-command

Usage

Extend the class and add the command to your app as per usual. Then add you sites the $sites variable:, (*5)

<?php

namespace App\Console\Commands;

use TiMacDonald\MultisiteBackupCommand\BackupCommand as BaseBackupCommand;

class BackupCommand extends BaseBackupCommand
{
    protected $sites = [
        [
            'name' => 'My Website',
            'databases' => [
                'mysql' => 'timacdonald_mysql_db',
                'pgsql' => 'timacdonald_pgsql_db',
            ],
            'include' => ['timacdonald.me/storage/app'],
        ],
        [
            'name' => 'A Wordpress Website',
            'databases' => ['mysql' => 'my_wp_db'],
            'include' => ['wordpress.site.com.au/wp-content/uploads'],
        ],
    ];
}

And then you will have to following commands available:, (*6)

# Backup all sites
php artisan app:backup --run

# Clean all sites
php artisan app:backup --clean

# List all sites
php artisan app:backup --list

# Monitor all sites
php artisan app:backup --monitor

v1 to v2 upgrade guide

The structure of the $sites array has changed. Please update the array and you should be good to go., (*7)

Previously:, (*8)

protected $sites = [
    [
        'domain' => 'timacdonald.me',
        'database' => 'timacdonald_mysql_db',
        'paths' => ['storage/app'],
    ],
];

Update each site to the following structure:, (*9)

protected $sites = [
    [
        'name' => 'https://timacdonald.me',
        'databases' => ['mysql' => 'timacdonald_mysql_db'],
        'include' => ['timacdonald.me/storage/app'],
    ],
];

And your done!, (*10)

Thanksware

You are free to use this package, but I ask that you reach out to someone (not me) who has previously, or is currently, maintaining or contributing to an open source library you are using in your project and thank them for their work. Consider your entire tech stack: packages, frameworks, languages, databases, operating systems, frontend, backend, etc., (*11)

The Versions

23/04 2018

dev-master

9999999-dev

A wrapper around spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server

  Sources   Download

MIT

The Requires

 

The Development Requires

backup

23/04 2018

v2.0.1

2.0.1.0

A wrapper around spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server

  Sources   Download

MIT

The Requires

 

The Development Requires

backup

06/03 2018

v2.0.0

2.0.0.0

A wrapper around spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server

  Sources   Download

MIT

The Requires

 

The Development Requires

backup

06/03 2018

v1.0.2

1.0.2.0

A wrapper around spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server

  Sources   Download

MIT

The Requires

 

The Development Requires

backup

05/03 2018

v1.0.1

1.0.1.0

A wrapper around spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server

  Sources   Download

MIT

The Requires

 

backup

28/02 2018

v1.0.0

1.0.0.0

A wrapper around spatie/laravel-backup backup command to make it super simple to backup multiple sites on a single server

  Sources   Download

MIT

The Requires

 

backup