ikechukwukalu / databasebackup
A laravel package for backing up database with local and remote connection.
Installs: 4 478
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- php: >=7.3
- illuminate/console: ^8.0|^9.0|^10.0|^11.0
- illuminate/database: ^8.0|^9.0|^10.0|^11.0
- illuminate/http: ^8.0|^9.0|^10.0|^11.0
- illuminate/routing: ^8.0|^9.0|^10.0|^11.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
- php-parallel-lint/php-parallel-lint: dev-develop
- phpunit/phpunit: ^9.0|^10.0|^11.0
README
A laravel package for backing up database with local and remote connection.
REQUIREMENTS
- PHP 7.3+
- Laravel 8+
STEPS TO INSTALL
composer require ikechukwukalu/databasebackup
BACKUP DATABASE
Set the following parameters in your .env
file and run sudo php artisan database:backup
to backup database.
DB_BACKUP_PATH="/db/backup/${APP_NAME}" DB_BACKUP_COMMAND="sudo mysqldump --user=${DB_USERNAME} --password=${DB_PASSWORD} --host=${DB_HOST} ${DB_DATABASE} | gzip > " DB_BACKUP_SSH_USER=root DB_BACKUP_SSH_HOST=127.0.0.1 DB_BACKUP_FILE="backup-${APP_NAME}-db" DB_BACKUP_FILE_EXT=".gz" DB_REMOTE_ACCESS=false
Or this
DB_BACKUP_PATH="/db/backup/${APP_NAME}" DB_BACKUP_COMMAND="sudo mysqldump --user=${DB_USERNAME} --password=${DB_PASSWORD} --host=${DB_HOST} ${DB_DATABASE} > " DB_BACKUP_SSH_USER=root DB_BACKUP_SSH_HOST=127.0.0.1 DB_BACKUP_FILE="backup-${APP_NAME}-db" DB_BACKUP_FILE_EXT=".sql" DB_REMOTE_ACCESS=false
PUBLISH CONFIG
php artisan vendor:publish --tag=db-config
LICENSE
The DB package is an open-sourced software licensed under the MIT license.