Backups install
This commit is contained in:
@@ -12,7 +12,8 @@ class Kernel extends ConsoleKernel
|
|||||||
*/
|
*/
|
||||||
protected function schedule(Schedule $schedule): void
|
protected function schedule(Schedule $schedule): void
|
||||||
{
|
{
|
||||||
// $schedule->command('inspire')->hourly();
|
// $schedule->command('backup:clean')->daily()->at('01:00');
|
||||||
|
// $schedule->command('backup:run')->daily()->at('01:30');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -79,6 +79,18 @@ class User extends Authenticatable
|
|||||||
return $this->email === 'nurmuhammet@mail.com';
|
return $this->email === 'nurmuhammet@mail.com';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if user is super admin.
|
||||||
|
*/
|
||||||
|
public function isSuperAdmin(): bool
|
||||||
|
{
|
||||||
|
if ($this->isMe()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->hasRole('superadmin');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if user is admin.
|
* Check if user is admin.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ use Laravel\Nova\Menu\MenuItem;
|
|||||||
use Laravel\Nova\Menu\MenuSection;
|
use Laravel\Nova\Menu\MenuSection;
|
||||||
use Laravel\Nova\Nova;
|
use Laravel\Nova\Nova;
|
||||||
use Laravel\Nova\NovaApplicationServiceProvider;
|
use Laravel\Nova\NovaApplicationServiceProvider;
|
||||||
|
use Spatie\BackupTool\BackupTool;
|
||||||
|
|
||||||
class NovaServiceProvider extends NovaApplicationServiceProvider
|
class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||||
{
|
{
|
||||||
@@ -87,6 +88,9 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
|||||||
LocaleSwitcher::make()
|
LocaleSwitcher::make()
|
||||||
->setLocales(config('app.locales'))
|
->setLocales(config('app.locales'))
|
||||||
->onSwitchLocale(NovaRepo::localeSwitcherSave()),
|
->onSwitchLocale(NovaRepo::localeSwitcherSave()),
|
||||||
|
|
||||||
|
BackupTool::make()
|
||||||
|
->canSee(fn () => auth()->user()->isSuperAdmin()),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,6 +132,11 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
|||||||
MenuItem::resource(Branch::class),
|
MenuItem::resource(Branch::class),
|
||||||
])->collapsable(),
|
])->collapsable(),
|
||||||
])->icon('cog')->collapsable(),
|
])->icon('cog')->collapsable(),
|
||||||
|
|
||||||
|
MenuSection::make(__('Backups'))
|
||||||
|
->path('/backups')
|
||||||
|
->icon('server')
|
||||||
|
->canSee(fn () => auth()->user()->isSuperAdmin()),
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,10 @@
|
|||||||
"nurmuhammet/nova-inputmask": "^1.0",
|
"nurmuhammet/nova-inputmask": "^1.0",
|
||||||
"outl1ne/nova-grid": "@dev",
|
"outl1ne/nova-grid": "@dev",
|
||||||
"outl1ne/nova-translatable": "^2.2",
|
"outl1ne/nova-translatable": "^2.2",
|
||||||
|
"spatie/laravel-backup": "^8.4",
|
||||||
"spatie/laravel-permission": "^6.1",
|
"spatie/laravel-permission": "^6.1",
|
||||||
"spatie/laravel-translatable": "^6.5",
|
"spatie/laravel-translatable": "^6.5",
|
||||||
|
"spatie/nova-backup-tool": "^5.0",
|
||||||
"trin4ik/nova-switcher": "^0.4.0"
|
"trin4ik/nova-switcher": "^0.4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
367
composer.lock
generated
367
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "cc6759c8d14ea88f0e1d0d579fcf7e1a",
|
"content-hash": "2effb5612ace8198f463cda2db0e9248",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
@@ -4293,6 +4293,168 @@
|
|||||||
],
|
],
|
||||||
"time": "2023-09-01T06:07:32+00:00"
|
"time": "2023-09-01T06:07:32+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/db-dumper",
|
||||||
|
"version": "3.4.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/db-dumper.git",
|
||||||
|
"reference": "bbd5ae0f331d47e6534eb307e256c11a65c8e24a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/db-dumper/zipball/bbd5ae0f331d47e6534eb307e256c11a65c8e24a",
|
||||||
|
"reference": "bbd5ae0f331d47e6534eb307e256c11a65c8e24a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^8.0",
|
||||||
|
"symfony/process": "^5.0|^6.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"pestphp/pest": "^1.22"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Spatie\\DbDumper\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Freek Van der Herten",
|
||||||
|
"email": "freek@spatie.be",
|
||||||
|
"homepage": "https://spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Dump databases",
|
||||||
|
"homepage": "https://github.com/spatie/db-dumper",
|
||||||
|
"keywords": [
|
||||||
|
"database",
|
||||||
|
"db-dumper",
|
||||||
|
"dump",
|
||||||
|
"mysqldump",
|
||||||
|
"spatie"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/spatie/db-dumper/tree/3.4.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://spatie.be/open-source/support-us",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/spatie",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-06-27T08:34:52+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/laravel-backup",
|
||||||
|
"version": "8.4.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/laravel-backup.git",
|
||||||
|
"reference": "b79f790cc856e67cce012abf34bf1c9035085dc1"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/laravel-backup/zipball/b79f790cc856e67cce012abf34bf1c9035085dc1",
|
||||||
|
"reference": "b79f790cc856e67cce012abf34bf1c9035085dc1",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-zip": "^1.14.0",
|
||||||
|
"illuminate/console": "^10.10.0",
|
||||||
|
"illuminate/contracts": "^10.10.0",
|
||||||
|
"illuminate/events": "^10.10.0",
|
||||||
|
"illuminate/filesystem": "^10.10.0",
|
||||||
|
"illuminate/notifications": "^10.10.0",
|
||||||
|
"illuminate/support": "^10.10.0",
|
||||||
|
"league/flysystem": "^3.0",
|
||||||
|
"php": "^8.1",
|
||||||
|
"spatie/db-dumper": "^3.0",
|
||||||
|
"spatie/laravel-package-tools": "^1.6.2",
|
||||||
|
"spatie/laravel-signal-aware-command": "^1.2",
|
||||||
|
"spatie/temporary-directory": "^2.0",
|
||||||
|
"symfony/console": "^6.0",
|
||||||
|
"symfony/finder": "^6.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"composer-runtime-api": "^2.0",
|
||||||
|
"ext-pcntl": "*",
|
||||||
|
"laravel/slack-notification-channel": "^2.5",
|
||||||
|
"league/flysystem-aws-s3-v3": "^2.0|^3.0",
|
||||||
|
"mockery/mockery": "^1.4",
|
||||||
|
"nunomaduro/larastan": "^2.1",
|
||||||
|
"orchestra/testbench": "^8.0",
|
||||||
|
"pestphp/pest": "^1.20",
|
||||||
|
"phpstan/extension-installer": "^1.1",
|
||||||
|
"phpstan/phpstan-deprecation-rules": "^1.0",
|
||||||
|
"phpstan/phpstan-phpunit": "^1.1"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"laravel/slack-notification-channel": "Required for sending notifications via Slack"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Spatie\\Backup\\BackupServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/Helpers/functions.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Spatie\\Backup\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Freek Van der Herten",
|
||||||
|
"email": "freek@spatie.be",
|
||||||
|
"homepage": "https://spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A Laravel package to backup your application",
|
||||||
|
"homepage": "https://github.com/spatie/laravel-backup",
|
||||||
|
"keywords": [
|
||||||
|
"backup",
|
||||||
|
"database",
|
||||||
|
"laravel-backup",
|
||||||
|
"spatie"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/spatie/laravel-backup/issues",
|
||||||
|
"source": "https://github.com/spatie/laravel-backup/tree/8.4.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/sponsors/spatie",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://spatie.be/open-source/support-us",
|
||||||
|
"type": "other"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-11-20T08:21:45+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-package-tools",
|
"name": "spatie/laravel-package-tools",
|
||||||
"version": "1.16.1",
|
"version": "1.16.1",
|
||||||
@@ -4435,6 +4597,80 @@
|
|||||||
],
|
],
|
||||||
"time": "2023-11-09T22:03:17+00:00"
|
"time": "2023-11-09T22:03:17+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/laravel-signal-aware-command",
|
||||||
|
"version": "1.3.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/laravel-signal-aware-command.git",
|
||||||
|
"reference": "46cda09a85aef3fd47fb73ddc7081f963e255571"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/laravel-signal-aware-command/zipball/46cda09a85aef3fd47fb73ddc7081f963e255571",
|
||||||
|
"reference": "46cda09a85aef3fd47fb73ddc7081f963e255571",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/contracts": "^8.35|^9.0|^10.0",
|
||||||
|
"php": "^8.0",
|
||||||
|
"spatie/laravel-package-tools": "^1.4.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"brianium/paratest": "^6.2",
|
||||||
|
"ext-pcntl": "*",
|
||||||
|
"nunomaduro/collision": "^5.3|^6.0",
|
||||||
|
"orchestra/testbench": "^6.16|^7.0|^8.0",
|
||||||
|
"pestphp/pest-plugin-laravel": "^1.3",
|
||||||
|
"phpunit/phpunit": "^9.5",
|
||||||
|
"spatie/laravel-ray": "^1.17"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Spatie\\SignalAwareCommand\\SignalAwareCommandServiceProvider"
|
||||||
|
],
|
||||||
|
"aliases": {
|
||||||
|
"Signal": "Spatie\\SignalAwareCommand\\Facades\\Signal"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Spatie\\SignalAwareCommand\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Freek Van der Herten",
|
||||||
|
"email": "freek@spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Handle signals in artisan commands",
|
||||||
|
"homepage": "https://github.com/spatie/laravel-signal-aware-command",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"laravel-signal-aware-command",
|
||||||
|
"spatie"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/spatie/laravel-signal-aware-command/issues",
|
||||||
|
"source": "https://github.com/spatie/laravel-signal-aware-command/tree/1.3.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/spatie",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-01-14T21:10:59+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-translatable",
|
"name": "spatie/laravel-translatable",
|
||||||
"version": "6.5.3",
|
"version": "6.5.3",
|
||||||
@@ -4517,6 +4753,74 @@
|
|||||||
],
|
],
|
||||||
"time": "2023-07-19T19:21:38+00:00"
|
"time": "2023-07-19T19:21:38+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/nova-backup-tool",
|
||||||
|
"version": "5.0.6",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/nova-backup-tool.git",
|
||||||
|
"reference": "2b3a4ff4c3c82038d4c19025e297882a026d243f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/nova-backup-tool/zipball/2b3a4ff4c3c82038d4c19025e297882a026d243f",
|
||||||
|
"reference": "2b3a4ff4c3c82038d4c19025e297882a026d243f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/support": "^7.0|^8.0|^9.0|^10.0",
|
||||||
|
"laravel/nova": "^4.0",
|
||||||
|
"nesbot/carbon": "^2.63",
|
||||||
|
"php": "^8.0|^7.3",
|
||||||
|
"spatie/laravel-backup": "^6.0|^7.0|^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"orchestra/testbench": "^5.0|^6.0|^7.0",
|
||||||
|
"phpunit/phpunit": "9.3",
|
||||||
|
"spatie/phpunit-snapshot-assertions": "^3.0|^4.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Spatie\\BackupTool\\BackupToolServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Spatie\\BackupTool\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Freek Van der Herten",
|
||||||
|
"email": "freek@spatie.be",
|
||||||
|
"homepage": "https://spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A Laravel Nova tool to backup your application.",
|
||||||
|
"homepage": "https://github.com/spatie/nova-backup-tool",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"nova"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/spatie/nova-backup-tool/tree/5.0.6"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://spatie.be/open-source/support-us",
|
||||||
|
"type": "custom"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-12-01T10:11:31+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/once",
|
"name": "spatie/once",
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
@@ -4579,6 +4883,67 @@
|
|||||||
],
|
],
|
||||||
"time": "2022-04-21T12:23:20+00:00"
|
"time": "2022-04-21T12:23:20+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/temporary-directory",
|
||||||
|
"version": "2.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/temporary-directory.git",
|
||||||
|
"reference": "efc258c9f4da28f0c7661765b8393e4ccee3d19c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/temporary-directory/zipball/efc258c9f4da28f0c7661765b8393e4ccee3d19c",
|
||||||
|
"reference": "efc258c9f4da28f0c7661765b8393e4ccee3d19c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Spatie\\TemporaryDirectory\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Alex Vanderbist",
|
||||||
|
"email": "alex@spatie.be",
|
||||||
|
"homepage": "https://spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Easily create, use and destroy temporary directories",
|
||||||
|
"homepage": "https://github.com/spatie/temporary-directory",
|
||||||
|
"keywords": [
|
||||||
|
"php",
|
||||||
|
"spatie",
|
||||||
|
"temporary-directory"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/spatie/temporary-directory/issues",
|
||||||
|
"source": "https://github.com/spatie/temporary-directory/tree/2.2.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://spatie.be/open-source/support-us",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/spatie",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-09-25T07:13:36+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v6.3.8",
|
"version": "v6.3.8",
|
||||||
|
|||||||
335
config/backup.php
Normal file
335
config/backup.php
Normal file
@@ -0,0 +1,335 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
'backup' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The name of this application. You can use this name to monitor
|
||||||
|
* the backups.
|
||||||
|
*/
|
||||||
|
'name' => env('APP_NAME', 'laravel-backup'),
|
||||||
|
|
||||||
|
'source' => [
|
||||||
|
|
||||||
|
'files' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The list of directories and files that will be included in the backup.
|
||||||
|
*/
|
||||||
|
'include' => [
|
||||||
|
base_path(),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These directories and files will be excluded from the backup.
|
||||||
|
*
|
||||||
|
* Directories used by the backup process will automatically be excluded.
|
||||||
|
*/
|
||||||
|
'exclude' => [],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Determines if symlinks should be followed.
|
||||||
|
*/
|
||||||
|
'follow_links' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Determines if it should avoid unreadable folders.
|
||||||
|
*/
|
||||||
|
'ignore_unreadable_directories' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This path is used to make directories in resulting zip-file relative
|
||||||
|
* Set to `null` to include complete absolute path
|
||||||
|
* Example: base_path()
|
||||||
|
*/
|
||||||
|
'relative_path' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The names of the connections to the databases that should be backed up
|
||||||
|
* MySQL, PostgreSQL, SQLite and Mongo databases are supported.
|
||||||
|
*
|
||||||
|
* The content of the database dump may be customized for each connection
|
||||||
|
* by adding a 'dump' key to the connection settings in config/database.php.
|
||||||
|
* E.g.
|
||||||
|
* 'mysql' => [
|
||||||
|
* ...
|
||||||
|
* 'dump' => [
|
||||||
|
* 'excludeTables' => [
|
||||||
|
* 'table_to_exclude_from_backup',
|
||||||
|
* 'another_table_to_exclude'
|
||||||
|
* ]
|
||||||
|
* ],
|
||||||
|
* ],
|
||||||
|
*
|
||||||
|
* If you are using only InnoDB tables on a MySQL server, you can
|
||||||
|
* also supply the useSingleTransaction option to avoid table locking.
|
||||||
|
*
|
||||||
|
* E.g.
|
||||||
|
* 'mysql' => [
|
||||||
|
* ...
|
||||||
|
* 'dump' => [
|
||||||
|
* 'useSingleTransaction' => true,
|
||||||
|
* ],
|
||||||
|
* ],
|
||||||
|
*
|
||||||
|
* For a complete list of available customization options, see https://github.com/spatie/db-dumper
|
||||||
|
*/
|
||||||
|
'databases' => [
|
||||||
|
'pgsql',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The database dump can be compressed to decrease disk space usage.
|
||||||
|
*
|
||||||
|
* Out of the box Laravel-backup supplies
|
||||||
|
* Spatie\DbDumper\Compressors\GzipCompressor::class.
|
||||||
|
*
|
||||||
|
* You can also create custom compressor. More info on that here:
|
||||||
|
* https://github.com/spatie/db-dumper#using-compression
|
||||||
|
*
|
||||||
|
* If you do not want any compressor at all, set it to null.
|
||||||
|
*/
|
||||||
|
'database_dump_compressor' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If specified, the database dumped file name will contain a timestamp (e.g.: 'Y-m-d-H-i-s').
|
||||||
|
*/
|
||||||
|
'database_dump_file_timestamp_format' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The file extension used for the database dump files.
|
||||||
|
*
|
||||||
|
* If not specified, the file extension will be .archive for MongoDB and .sql for all other databases
|
||||||
|
* The file extension should be specified without a leading .
|
||||||
|
*/
|
||||||
|
'database_dump_file_extension' => '',
|
||||||
|
|
||||||
|
'destination' => [
|
||||||
|
/*
|
||||||
|
* The compression algorithm to be used for creating the zip archive.
|
||||||
|
*
|
||||||
|
* If backing up only database, you may choose gzip compression for db dump and no compression at zip.
|
||||||
|
*
|
||||||
|
* Some common algorithms are listed below:
|
||||||
|
* ZipArchive::CM_STORE (no compression at all; set 0 as compression level)
|
||||||
|
* ZipArchive::CM_DEFAULT
|
||||||
|
* ZipArchive::CM_DEFLATE
|
||||||
|
* ZipArchive::CM_BZIP2
|
||||||
|
* ZipArchive::CM_XZ
|
||||||
|
*
|
||||||
|
* For more check https://www.php.net/manual/zip.constants.php and confirm it's supported by your system.
|
||||||
|
*/
|
||||||
|
'compression_method' => ZipArchive::CM_DEFAULT,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The compression level corresponding to the used algorithm; an integer between 0 and 9.
|
||||||
|
*
|
||||||
|
* Check supported levels for the chosen algorithm, usually 1 means the fastest and weakest compression,
|
||||||
|
* while 9 the slowest and strongest one.
|
||||||
|
*
|
||||||
|
* Setting of 0 for some algorithms may switch to the strongest compression.
|
||||||
|
*/
|
||||||
|
'compression_level' => 9,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The filename prefix used for the backup zip file.
|
||||||
|
*/
|
||||||
|
'filename_prefix' => '',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The disk names on which the backups will be stored.
|
||||||
|
*/
|
||||||
|
'disks' => [
|
||||||
|
'local',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The directory where the temporary files will be stored.
|
||||||
|
*/
|
||||||
|
'temporary_directory' => storage_path('app/backup-temp'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The password to be used for archive encryption.
|
||||||
|
* Set to `null` to disable encryption.
|
||||||
|
*/
|
||||||
|
'password' => env('BACKUP_ARCHIVE_PASSWORD'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The encryption algorithm to be used for archive encryption.
|
||||||
|
* You can set it to `null` or `false` to disable encryption.
|
||||||
|
*
|
||||||
|
* When set to 'default', we'll use ZipArchive::EM_AES_256 if it is
|
||||||
|
* available on your system.
|
||||||
|
*/
|
||||||
|
'encryption' => 'default',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of attempts, in case the backup command encounters an exception
|
||||||
|
*/
|
||||||
|
'tries' => 1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of seconds to wait before attempting a new backup if the previous try failed
|
||||||
|
* Set to `0` for none
|
||||||
|
*/
|
||||||
|
'retry_delay' => 0,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'.
|
||||||
|
* For Slack you need to install laravel/slack-notification-channel.
|
||||||
|
*
|
||||||
|
* You can also use your own notification classes, just make sure the class is named after one of
|
||||||
|
* the `Spatie\Backup\Notifications\Notifications` classes.
|
||||||
|
*/
|
||||||
|
'notifications' => [
|
||||||
|
|
||||||
|
'notifications' => [
|
||||||
|
\Spatie\Backup\Notifications\Notifications\BackupHasFailedNotification::class => [],
|
||||||
|
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFoundNotification::class => [],
|
||||||
|
\Spatie\Backup\Notifications\Notifications\CleanupHasFailedNotification::class => [],
|
||||||
|
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessfulNotification::class => [],
|
||||||
|
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFoundNotification::class => [],
|
||||||
|
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessfulNotification::class => [],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Here you can specify the notifiable to which the notifications should be sent. The default
|
||||||
|
* notifiable will use the variables specified in this config file.
|
||||||
|
*/
|
||||||
|
'notifiable' => \Spatie\Backup\Notifications\Notifiable::class,
|
||||||
|
|
||||||
|
'mail' => [
|
||||||
|
'to' => 'your@example.com',
|
||||||
|
|
||||||
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'webhook_url' => '',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If this is set to null the default channel of the webhook will be used.
|
||||||
|
*/
|
||||||
|
'channel' => null,
|
||||||
|
|
||||||
|
'username' => null,
|
||||||
|
|
||||||
|
'icon' => null,
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
'discord' => [
|
||||||
|
'webhook_url' => '',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If this is an empty string, the name field on the webhook will be used.
|
||||||
|
*/
|
||||||
|
'username' => '',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If this is an empty string, the avatar on the webhook will be used.
|
||||||
|
*/
|
||||||
|
'avatar_url' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Here you can specify which backups should be monitored.
|
||||||
|
* If a backup does not meet the specified requirements the
|
||||||
|
* UnHealthyBackupWasFound event will be fired.
|
||||||
|
*/
|
||||||
|
'monitor_backups' => [
|
||||||
|
[
|
||||||
|
'name' => env('APP_NAME', 'laravel-backup'),
|
||||||
|
'disks' => ['local'],
|
||||||
|
'health_checks' => [
|
||||||
|
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
|
||||||
|
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
[
|
||||||
|
'name' => 'name of the second app',
|
||||||
|
'disks' => ['local', 's3'],
|
||||||
|
'health_checks' => [
|
||||||
|
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
|
||||||
|
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
*/
|
||||||
|
],
|
||||||
|
|
||||||
|
'cleanup' => [
|
||||||
|
/*
|
||||||
|
* The strategy that will be used to cleanup old backups. The default strategy
|
||||||
|
* will keep all backups for a certain amount of days. After that period only
|
||||||
|
* a daily backup will be kept. After that period only weekly backups will
|
||||||
|
* be kept and so on.
|
||||||
|
*
|
||||||
|
* No matter how you configure it the default strategy will never
|
||||||
|
* delete the newest backup.
|
||||||
|
*/
|
||||||
|
'strategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||||
|
|
||||||
|
'default_strategy' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The number of days for which backups must be kept.
|
||||||
|
*/
|
||||||
|
'keep_all_backups_for_days' => 7,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* After the "keep_all_backups_for_days" period is over, the most recent backup
|
||||||
|
* of that day will be kept. Older backups within the same day will be removed.
|
||||||
|
* If you create backups only once a day, no backups will be removed yet.
|
||||||
|
*/
|
||||||
|
'keep_daily_backups_for_days' => 16,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* After the "keep_daily_backups_for_days" period is over, the most recent backup
|
||||||
|
* of that week will be kept. Older backups within the same week will be removed.
|
||||||
|
* If you create backups only once a week, no backups will be removed yet.
|
||||||
|
*/
|
||||||
|
'keep_weekly_backups_for_weeks' => 8,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* After the "keep_weekly_backups_for_weeks" period is over, the most recent backup
|
||||||
|
* of that month will be kept. Older backups within the same month will be removed.
|
||||||
|
*/
|
||||||
|
'keep_monthly_backups_for_months' => 4,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* After the "keep_monthly_backups_for_months" period is over, the most recent backup
|
||||||
|
* of that year will be kept. Older backups within the same year will be removed.
|
||||||
|
*/
|
||||||
|
'keep_yearly_backups_for_years' => 2,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* After cleaning up the backups remove the oldest backup until
|
||||||
|
* this amount of megabytes has been reached.
|
||||||
|
*/
|
||||||
|
'delete_oldest_backups_when_using_more_megabytes_than' => 5000,
|
||||||
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of attempts, in case the cleanup command encounters an exception
|
||||||
|
*/
|
||||||
|
'tries' => 1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of seconds to wait before attempting a new cleanup if the previous try failed
|
||||||
|
* Set to `0` for none
|
||||||
|
*/
|
||||||
|
'retry_delay' => 0,
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
18
config/nova-backup-tool.php
Normal file
18
config/nova-backup-tool.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
/*
|
||||||
|
* Enable or disable backup tool polling.
|
||||||
|
*/
|
||||||
|
'polling' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Interval seconds between polling requests.
|
||||||
|
*/
|
||||||
|
'polling_interval' => 1,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Queue to use for the jobs to run through.
|
||||||
|
*/
|
||||||
|
'queue' => null,
|
||||||
|
];
|
||||||
@@ -225,5 +225,6 @@
|
|||||||
"Incorrect verification code": "Nädogry belgi",
|
"Incorrect verification code": "Nädogry belgi",
|
||||||
"Now you can set your password, but please make sure that you don't forget it!": "Indi açar sözüni täzeläp bilersiňiz, ýöne ýatdan çykarmaň!",
|
"Now you can set your password, but please make sure that you don't forget it!": "Indi açar sözüni täzeläp bilersiňiz, ýöne ýatdan çykarmaň!",
|
||||||
"Your password has been updated": "Siziň açar sözüňiz üýtgedildi",
|
"Your password has been updated": "Siziň açar sözüňiz üýtgedildi",
|
||||||
"We send you a verification code to": "Tassyklama belgini şu belgä ugratdyk"
|
"We send you a verification code to": "Tassyklama belgini şu belgä ugratdyk",
|
||||||
|
"Backups": "Bekaplar"
|
||||||
}
|
}
|
||||||
|
|||||||
45
lang/vendor/backup/en/notifications.php
vendored
Normal file
45
lang/vendor/backup/en/notifications.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'exception_message' => 'Exception message: :message',
|
||||||
|
'exception_trace' => 'Exception trace: :trace',
|
||||||
|
'exception_message_title' => 'Exception message',
|
||||||
|
'exception_trace_title' => 'Exception trace',
|
||||||
|
|
||||||
|
'backup_failed_subject' => 'Failed backup of :application_name',
|
||||||
|
'backup_failed_body' => 'Important: An error occurred while backing up :application_name',
|
||||||
|
|
||||||
|
'backup_successful_subject' => 'Successful new backup of :application_name',
|
||||||
|
'backup_successful_subject_title' => 'Successful new backup!',
|
||||||
|
'backup_successful_body' => 'Great news, a new backup of :application_name was successfully created on the disk named :disk_name.',
|
||||||
|
|
||||||
|
'cleanup_failed_subject' => 'Cleaning up the backups of :application_name failed.',
|
||||||
|
'cleanup_failed_body' => 'An error occurred while cleaning up the backups of :application_name',
|
||||||
|
|
||||||
|
'cleanup_successful_subject' => 'Clean up of :application_name backups successful',
|
||||||
|
'cleanup_successful_subject_title' => 'Clean up of backups successful!',
|
||||||
|
'cleanup_successful_body' => 'The clean up of the :application_name backups on the disk named :disk_name was successful.',
|
||||||
|
|
||||||
|
'healthy_backup_found_subject' => 'The backups for :application_name on disk :disk_name are healthy',
|
||||||
|
'healthy_backup_found_subject_title' => 'The backups for :application_name are healthy',
|
||||||
|
'healthy_backup_found_body' => 'The backups for :application_name are considered healthy. Good job!',
|
||||||
|
|
||||||
|
'unhealthy_backup_found_subject' => 'Important: The backups for :application_name are unhealthy',
|
||||||
|
'unhealthy_backup_found_subject_title' => 'Important: The backups for :application_name are unhealthy. :problem',
|
||||||
|
'unhealthy_backup_found_body' => 'The backups for :application_name on disk :disk_name are unhealthy.',
|
||||||
|
'unhealthy_backup_found_not_reachable' => 'The backup destination cannot be reached. :error',
|
||||||
|
'unhealthy_backup_found_empty' => 'There are no backups of this application at all.',
|
||||||
|
'unhealthy_backup_found_old' => 'The latest backup made on :date is considered too old.',
|
||||||
|
'unhealthy_backup_found_unknown' => 'Sorry, an exact reason cannot be determined.',
|
||||||
|
'unhealthy_backup_found_full' => 'The backups are using too much storage. Current usage is :disk_usage which is higher than the allowed limit of :disk_limit.',
|
||||||
|
|
||||||
|
'no_backups_info' => 'No backups were made yet',
|
||||||
|
'application_name' => 'Application name',
|
||||||
|
'backup_name' => 'Backup name',
|
||||||
|
'disk' => 'Disk',
|
||||||
|
'newest_backup_size' => 'Newest backup size',
|
||||||
|
'number_of_backups' => 'Number of backups',
|
||||||
|
'total_storage_used' => 'Total storage used',
|
||||||
|
'newest_backup_date' => 'Newest backup date',
|
||||||
|
'oldest_backup_date' => 'Oldest backup date',
|
||||||
|
];
|
||||||
45
lang/vendor/backup/ru/notifications.php
vendored
Normal file
45
lang/vendor/backup/ru/notifications.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'exception_message' => 'Сообщение об ошибке: :message',
|
||||||
|
'exception_trace' => 'Сведения об ошибке: :trace',
|
||||||
|
'exception_message_title' => 'Сообщение об ошибке',
|
||||||
|
'exception_trace_title' => 'Сведения об ошибке',
|
||||||
|
|
||||||
|
'backup_failed_subject' => 'Не удалось сделать резервную копию :application_name',
|
||||||
|
'backup_failed_body' => 'Внимание: Произошла ошибка во время резервного копирования :application_name',
|
||||||
|
|
||||||
|
'backup_successful_subject' => 'Успешно создана новая резервная копия :application_name',
|
||||||
|
'backup_successful_subject_title' => 'Успешно создана новая резервная копия!',
|
||||||
|
'backup_successful_body' => 'Отличная новость, новая резервная копия :application_name успешно создана и сохранена на диск :disk_name.',
|
||||||
|
|
||||||
|
'cleanup_failed_subject' => 'Не удалось очистить резервные копии :application_name',
|
||||||
|
'cleanup_failed_body' => 'Произошла ошибка при очистке резервных копий :application_name',
|
||||||
|
|
||||||
|
'cleanup_successful_subject' => 'Очистка от резервных копий :application_name прошла успешно',
|
||||||
|
'cleanup_successful_subject_title' => 'Очистка резервных копий прошла успешно!',
|
||||||
|
'cleanup_successful_body' => 'Очистка от старых резервных копий :application_name на диске :disk_name прошла успешно.',
|
||||||
|
|
||||||
|
'healthy_backup_found_subject' => 'Резервные копии :application_name с диска :disk_name исправны',
|
||||||
|
'healthy_backup_found_subject_title' => 'Резервные копии :application_name исправны',
|
||||||
|
'healthy_backup_found_body' => 'Резервные копии :application_name считаются исправными. Хорошая работа!',
|
||||||
|
|
||||||
|
'unhealthy_backup_found_subject' => 'Внимание: резервные копии :application_name неисправны',
|
||||||
|
'unhealthy_backup_found_subject_title' => 'Внимание: резервные копии для :application_name неисправны. :problem',
|
||||||
|
'unhealthy_backup_found_body' => 'Резервные копии для :application_name на диске :disk_name неисправны.',
|
||||||
|
'unhealthy_backup_found_not_reachable' => 'Не удается достичь места назначения резервной копии. :error',
|
||||||
|
'unhealthy_backup_found_empty' => 'Резервные копии для этого приложения отсутствуют.',
|
||||||
|
'unhealthy_backup_found_old' => 'Последнее резервное копирование созданное :date является устаревшим.',
|
||||||
|
'unhealthy_backup_found_unknown' => 'Извините, точная причина не может быть определена.',
|
||||||
|
'unhealthy_backup_found_full' => 'Резервные копии используют слишком много памяти. Используется :disk_usage что выше допустимого предела: :disk_limit.',
|
||||||
|
|
||||||
|
'no_backups_info' => 'Резервных копий еще не было',
|
||||||
|
'application_name' => 'Имя приложения',
|
||||||
|
'backup_name' => 'Имя резервной копии',
|
||||||
|
'disk' => 'Диск',
|
||||||
|
'newest_backup_size' => 'Размер последней резервной копии',
|
||||||
|
'number_of_backups' => 'Количество резервных копий',
|
||||||
|
'total_storage_used' => 'Общий объем используемого хранилища',
|
||||||
|
'newest_backup_date' => 'Дата последней резервной копии',
|
||||||
|
'oldest_backup_date' => 'Дата самой старой резервной копии',
|
||||||
|
];
|
||||||
Reference in New Issue
Block a user