当前位置:网站首页>Laravel 8 realizes database backup through task scheduling
Laravel 8 realizes database backup through task scheduling
2022-06-11 16:07:00 【Chenqing Nuo language】
The article only comes from the practice summary , Share with you , There is a problem , Welcome to point out
composer install
composer require spatie/laravel-backupPublish profile , produce config/backup.php
php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"stay App\Console\Kernel Write code
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')->hourly();
// Execute every minute
$schedule->command('backup:run --disable-notifications')->everyMinute();
}stay config/filesystems.php Modify the backup save location ( Save to public Under the zip Next )
'disks' => [
'local' => [
'driver' => 'local',
'root' => public_path('zip'),
],Perform backup tasks
php artisan schedule:work边栏推荐
- List和Dict数据类型作用详解
- 09-最小生成树 公路村村通
- 前沿科技探究之AI在索引推荐的应用
- Learn automatic testing of postman interface from 0 to 1
- 电脑下面的任务栏怎么显示打开的程序
- 3000 words to teach you how to use mot
- 轻松上手使用gs_dump和gs_dumpall命令导出数据
- 【愚公系列】2022年06月 .NET架构班 076-分布式中间件 ScheduleMaster的执行原理
- GO语言-值类型和引用类型
- Detailed explanation of MySQL binlog log and master-slave replication
猜你喜欢

Opengauss database ODBC environment connection configuration (Windows)

How the autorunner automated test tool creates a project -alltesting | Zezhong cloud test

Princeton Dengjia student's personal account: must I have a doctorate? No, I can also be an applied scientist in a large factory as an undergraduate

From digital twinning to digital immortality, the "three-stage theory" of the development of the meta universe

Code farming essential SQL tuning (Part 2)

Cloud data management will break the island of storage and the island of team

使用Cloud DB构建APP 快速入门-快应用篇

Why are bugs changing more and more?

前沿科技探究之AI工具:Anomaly-detection

Learn how to parse SQL from kernel code
随机推荐
Application of AI in index recommendation
Learn automatic testing of postman interface from 0 to 1
Understand the dense support functions / stored procedures of opengauss
泰雷兹云安全报告显示,云端数据泄露和复杂程度呈上升趋势
Go language - value types and reference types
Opengauss database JDBC environment connection configuration (eclipse)
postgresql源码编译
PostgreSQL create table
项目工作区创建步骤-泽众AR自动化测试工具
DHCP protocol instantiation analysis
CLP information - No. 1 central document on Strengthening Rural Revitalization financial services
如何优化 Compose 的性能?通过「底层原理」寻找答案 | 开发者说·DTalk
postgresql创建数据库
Analysis of breadcrumb usage scenarios on websites
Collect | thoroughly understand the meaning and calculation of receptive field
使用Cloud DB构建APP 快速入门-快应用篇
Talk about data center network again
Code farming essential SQL tuning (Part 2)
Opengauss database ODBC environment connection configuration (Windows)
This "invisible" robot may be your future colleague