lyrasoft / backup
2.0.3
2024-07-10 16:51 UTC
Requires
- php: >=8.0
- firebase/php-jwt: ^5.0||^6.0
- maennchen/zipstream-php: ^2.0||^3.0
- symfony/console: ^5.0||^6.0||^7.0
- symfony/process: ^5.0||^6.0||^7.0
- windwalker/data: ^4.0
- windwalker/http: ^4.0
This package is auto-updated.
Last update: 2024-09-10 17:12:57 UTC
README
安装
Windwalker 4
使用composer安装。
composer create-project lyrasoft/backup
然后运行以下命令发布路由。
php windwalker pkg:install lyrasoft/backup --tag=routes
配置文件位于etc/packages/backup.php
独立
使用composer安装
composer create-project lyrasoft/backup
然后安装脚本将询问您一些问题
Project Name: # Your Site Name, this will be the backup title Do you want to dump Files? [y/N] # Mostly we can choose N. Backup Root[.]: # Type the absolute or relative path to site root Do you want to dump DB? [Y/n] # y Host[localhost]: # DB host DB Name: # DB name User[root]: # DB user Password: # DB password Success install backup.php file. # If you want to register to portal instantly, type "Y" Register backup to portal? [Y/n] Site URL: # Enter site URL, that portal can fetch backup file Please fill XXX-XXX to Portal. Open https://portal.simular.co/device/login from your local browser.
如果您想注册门户,请参阅文档
安装后,config.php
文件将在backup
根目录中生成,您可以根据需要修改它。
命令
在Windwalker中,键入
php windwalker backup:{command}
在独立文件中使用
php backup.php {command}
命令:run
此命令将立即将zip流输出到终端。
如果您想输出到文件,请使用
backup:run > /path/to/file.zip
您可以输入自己的数据库信息
backup:run --host=localhost --db=sakura -u=root -p {pass} > /path/to/file.zip
在Windwalker中,您可以选择备份配置文件
php windwalker backup:run {profile} > /path/to/file.zip
命令:token
如果您想获取备份,请使用此命令打印令牌字符串。
命令:register
将此备份脚本注册到门户,请参阅文档