laemmi / sync-tools
Installs: 1 667
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^7.4|^8.0
- symfony/console: ^5.2
- symfony/yaml: ^5.2
Requires (Dev)
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.5
README
Description
Synchronisation & Backup von Mysql-Datenbanken & Dateien.
Installation
composer require laemmi/sync-tools
Configuration
Create config/lst-config.yml
. You can use template from vendor/laemmi/sync-tools/lst-config.yml.dist
.
Add your credentials.
ssh_force_transfer (bool) Default: true
If set to false mysql dump would be transfer with rsync. It is better on slow internet connections.
Usage
Backup local database.
./vendor/lst database:backup
Dump database from remote to local destination.
./vendor/lst database:dump
Import Databasedump to local database. import_dump is optional name of database for import.
./vendor/lst database:import import_dump
Sync remote database to local database.
./vendor/lst database:sync
Sync files from remote or local to local destination.
./vendor/lst file:sync
Backup local files
./vendor/lst file:backup
Test locally with docker
docker-compose up -d
Database backup (local)
docker-compose exec php ./bin/lst database:backup
Database dump
docker-compose exec php ./bin/lst database:dump
Database import
docker-compose exec php ./bin/lst database:import
Database synchronisation
docker-compose exec php ./bin/lst database:sync
File synchronisation
docker-compose exec php ./bin/lst file:sync
File backup (local)
docker-compose exec php ./bin/lst file:backup