Skip to content

ShaonPro/Server-Migrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

🚀 Server Migrator — By ShaonPro

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.


✨ Key Features

  • ⚡ 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 sshpass via environment variables to keep your credentials hidden from the system's process list.
  • 📦 Auto-Dependency Check: Automatically detects and installs rsync, sshpass, and whiptail on Debian-based systems.

🛠️ Tech Stack

  • Scripting: Bash
  • Engine: rsync (Archive, Compress, Verbose, Partial)
  • Interface: whiptail (Newt-based dialog boxes)
  • Security: sshpass + SSH (StrictHostKeyChecking automated)

🚀 Getting Started

Prerequisites

For the best experience, run this on Linux, macOS, or Windows (via WSL2).

Quick Installation

  1. Clone the repository:

    git clone https://github.com/ShaonPro/Server-Migrator.git
    cd server-migrator
  2. Make the script executable:

    chmod +x migrator.sh
  3. Launch the Migrator:

    ./migrator.sh

step-01

📖 Step-by-Step How-to-Guide

Follow these steps to migrate your files like a pro.

1. Launch & Direction

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).

2. Authentication

You will be prompted for:

  • Remote Username: Usually root or 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).

3. Path Selection (The "Slash" Rule)

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 Tab to navigate the built-in file picker.

4. The Safety Check (Dry Run)

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.

5. Monitoring Progress

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.

About

A lightweight, interactive Bash utility for seamless file synchronization between Local and Remote environments. Built on the power of `rsync` with a user-friendly `whiptail` interface.

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages