A lightweight, interactive Bash utility designed for high-performance file synchronization between Local and Remote environments. Built on the power of rsync with a user-friendly whiptail interface to streamline your DevOps workflow.
- ⚡ Bidirectional Sync: Seamlessly switch between PUSH (Local -> Remote) and PULL (Remote -> Local).
- 🎨 Interactive UI: No more memorizing complex flags. Uses high-fidelity terminal dialogs for a professional feel.
- 🛡️ Safety First: Includes a Dry Run mode to simulate transfers and verify paths before committing data.
- 📶 Resumable Transfers: Leverages
rsync's partial/progress flags to handle network interruptions gracefully. - 🔑 Secure Auth: Uses
sshpassvia environment variables to keep your credentials hidden from the system's process list. - 📦 Auto-Dependency Check: Automatically detects and installs
rsync,sshpass, andwhiptailon Debian-based systems.
- Scripting: Bash
- Engine:
rsync(Archive, Compress, Verbose, Partial) - Interface:
whiptail(Newt-based dialog boxes) - Security:
sshpass+ SSH (StrictHostKeyChecking automated)
For the best experience, run this on Linux, macOS, or Windows (via WSL2).
-
Clone the repository:
git clone https://github.com/ShaonPro/Server-Migrator.git cd server-migrator -
Make the script executable:
chmod +x migrator.sh
-
Launch the Migrator:
./migrator.sh
Follow these steps to migrate your files like a pro.
Upon running the script, the ShaonPro branded menu will appear.
- PUSH: Use this to send files TO a remote VPS (e.g., uploading a WordPress theme or Next.js build).
- PULL: Use this to download files FROM a remote VPS to your local machine (e.g., downloading database backups or logs).
You will be prompted for:
- Remote Username: Usually
rootor your sudo user. - Remote IP: The public IP address or hostname of your server.
- Remote Password: Your SSH password. (Characters are hidden while typing for security).
This is crucial for rsync behavior:
- Folder without slash (
/my-folder): Copies the folder itself into the destination. - Folder with slash (
/my-folder/): Copies only the contents of that folder. - Local Selection: Use arrow keys and
Tabto navigate the built-in file picker.
Before any data moves, you will be asked: "Would you like to perform a dry run first?"
- Select YES: The script simulates the transfer. Review the file list in the terminal to ensure paths are correct.
- Select NO: The script begins the actual transfer immediately.
The terminal will clear and show a real-time progress bar including:
- Transfer Speed: Current network throughput.
- Percentage: Progress of the current file.
- ETA: Estimated time remaining for the total sync.
