当前位置:网站首页>laravel 8 通过 任务调度 实现 数据库备份
laravel 8 通过 任务调度 实现 数据库备份
2022-06-11 15:55:00 【陈卿诺语】
文章仅源于实践总结,分享给大家,有问题,欢迎指出
composer 安装
composer require spatie/laravel-backup发布配置文件,产生 config/backup.php
php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"在 App\Console\Kernel 写代码
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')->hourly();
//每分钟执行一次
$schedule->command('backup:run --disable-notifications')->everyMinute();
}在 config/filesystems.php 修改备份保存位置(保存至 public 下的 zip 下)
'disks' => [
'local' => [
'driver' => 'local',
'root' => public_path('zip'),
],执行备份任务
php artisan schedule:work边栏推荐
- 无心剑英汉双语诗001. 《春游》
- postgresql启动过程
- GO语言-值类型和引用类型
- High concurrency pseudo sharing and cache line filling (cache line alignment) (@contained)
- Toolbar details of user interface - autorunner automated test tool
- Opengauss AI capability upgrade to create a new AI native database
- 从屡遭拒稿到90后助理教授,罗格斯大学王灏:好奇心驱使我不断探索
- The third generation Pentium B70 won the C-NCAP five-star safety performance again
- I have used 20K for 5 years and met all major manufacturers. These high-frequency interview questions have helped you figure out
- 书籍《阅读的方法》读后感
猜你喜欢

How to optimize the performance of compose? Find the answer through "underlying principles" | developers say · dtalk

What if you can't access the desktop after the computer is turned on

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

【愚公系列】2022年06月 .NET架构班 079-分布式中间件 ScheduleMaster的集群原理

Open the door of the hybrid cloud market, Lenovo xcloud's way to break the situation

泰雷兹云安全报告显示,云端数据泄露和复杂程度呈上升趋势

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

Opengauss database JDBC environment connection configuration (eclipse)

openGauss并行解码浅谈

Opengauss enterprise installation
随机推荐
Cloud data management will break the island of storage and the island of team
Frontier technology exploration deepsql: in Library AI algorithm
Thales cloud security report shows that cloud data leakage and complexity are on the rise
GO语言-Slice切片
Docker uses redis image
Opengauss database JDBC environment connection configuration (eclipse)
Yiwenjiaohui your database system tuning
从屡遭拒稿到90后助理教授,罗格斯大学王灏:好奇心驱使我不断探索
网站上的 breadcrumb 使用场景浅析
Go language - array
Nat Common | le Modèle linguistique peut apprendre des distributions moléculaires complexes
Understand the dense support functions / stored procedures of opengauss
Yef 2022 opened yesterday. The whole process of free live broadcast on multiple network platforms opened an online technology feast!
干掉 Swagger UI,这款神器更好用、更高效!
TC8:UDP_ MessageFormat_ 01-02
Classmate, have you heard of mot?
Nat Commun|語言模型可以學習複雜的分子分布
With an average annual salary of 20W, automated test engineers are so popular?
What is the future of software testing in 2022? Do you need to understand the code?
项目工作区创建步骤-泽众AR自动化测试工具