Download the PHP package ajaxray/laravel-server-sync without Composer
On this page you can find all versions of the php package ajaxray/laravel-server-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ajaxray/laravel-server-sync
More information about ajaxray/laravel-server-sync
Files in ajaxray/laravel-server-sync
Package laravel-server-sync
Short Description A Laravel package to easily sync your production database and files to your local environment
License MIT
Informations about the package laravel-server-sync
Laravel Server Sync
A Laravel package to easily sync your production/staging database and storage files to your local environment. Perfect for debugging production issues or keeping your local environment up to date with production data.
Note: This package is now stable and ready for production use. It supports Laravel 10.x and 11.x.
Features
- 🔄 One-command sync of both database and files
- 🔒 Secure SSH-based file transfer
- 📁 Smart file syncing with rsync
- 🗄️ Database dump and restore
- ⚡ Progress indicators for long operations
- 🛠️ Highly configurable
Requirements
- PHP 8.1 or higher
- Laravel 10.0 or higher
- SSH access to production server
- MySQL/MariaDB client installed locally
- rsync installed on both local and production servers
Installation
To install for dev environments
After installation, publish the configuration file:
Configuration
Environment Variables
Add these to your .env
file:
Configuration File
The published config file config/server-sync.php
allows you to:
- Configure default server settings
- Exclude specific tables from database sync
- Configure file sync paths and exclusions
- Customize dump location
Usage
Basic Usage
Sync both database and files:
Database Sync Options
File Sync Options
Server Configuration Options
By default, it'll take host, user, path etc. from the production server definition in config file.
Also we can specify which remote server definition to use (see config file), if we have defined multiple servers. If any config is specified as inline option, it'll get precidence over config values.
Safety Features
Note: The
--force
option should be used with extreme caution as it overrides the production environment safety check.
Security
- Uses SSH for secure file transfer
- Requires key-based authentication
- Temporary files are automatically cleaned up
- Database credentials are never stored locally
Troubleshooting
SSH Connection Issues
- Verify SSH key-based authentication is set up
- Check if you can manually SSH into the server
- Ensure proper permissions for the SSH user
Database Sync Issues
- Verify MySQL client installation
- Check database credentials in both environments
- Ensure sufficient privileges for database operations
File Sync Issues
- Verify rsync installation
- Check storage directory permissions
- Use stable internet connection for large files
Contributing
Please see CONTRIBUTING for details.
Credits
- Anis Uddin Ahmad
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-server-sync with dependencies
illuminate/support Version ^10.0|^11.0
illuminate/console Version ^10.0|^11.0
spatie/laravel-package-tools Version ^1.16