lyrasoft / backup
Installs: 1 298
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 1
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-10-10 17:19:22 UTC
README
Installation
Windwalker 4
Install from composer.
composer create-project lyrasoft/backup
Then run this command to publish routes.
php windwalker pkg:install lyrasoft/backup --tag=routes
The config file is in etc/packages/backup.php
Standalone
Install from composer
composer create-project lyrasoft/backup
Then the installation script will ask you some questions:
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.
If you want to register to portal, see Documentation
After installed, the config.php
file will be generated at backup
root folder, you can modify it if you want.
Commands
In windwalker, type
php windwalker backup:{command}
In standalone file, use:
php backup.php {command}
Command: run
This command will instantly output the zip stream to terminal.
If you want to output to a file, use:
backup:run > /path/to/file.zip
You can enter your own db info:
backup:run --host=localhost --db=sakura -u=root -p {pass} > /path/to/file.zip
In windwalker, you may choose backup profile
php windwalker backup:run {profile} > /path/to/file.zip
Command: token
If you want to get backup, use this command to print token string.
Command: register
Register this backup script to Portal, see Documentation