Skip to content

KJ7PPK/DiskHopper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DiskHopper 🐇💽

A Fast, Safe Disk Partition Migration Tool for Linux

DiskHopper is a robust, interactive Bash script designed to safely migrate data between disk partitions on Linux systems. It verifies every transfer before deleting source files, cleans up after itself, and provides clear feedback throughout the process. Whether you're shuffling media libraries or prepping disks for offsite storage, DiskHopper makes the job fast and painless.

🚀 Features

✅ Interactive partition selection (sources & destinations)
✅ Displays SMART health, connection type (SATA/USB/NVMe), and usage
✅ Auto-mounts unmounted partitions to /mnt/migratetemp
✅ Uses rsync with verification before deleting source files
✅ Cleans up temp mounts and warns if manual intervention is needed
✅ Optional logging for audits or reviews
✅ Pure Bash—no extra dependencies besides standard Linux tools

📦 What DiskHopper Isn't

❌ It doesn't clone full partitions block-by-block (file-level migration only)
❌ It doesn't add redundancy or backup logic (this is for migration)
❌ No automatic scheduling or concurrency—keep it manual and safe.

🛠️ Requirements

  • bash
  • rsync
  • smartmontools (smartctl)
  • lsblk (comes with util-linux)
  • sudo (required to mount/unmount partitions)

⚙️ How It Works

  1. Lists all partitions (excluding your OS disk) with SMART status and disk info.
  2. Lets you select multiple sources and destinations interactively.
  3. Auto-mounts partitions to temp folders if unmounted.
  4. Copies files using rsync, verifies them, and deletes files from the source only after a successful transfer.
  5. Cleans up temp mounts and warns you if something needs manual cleanup.
  6. Optional logs save the session for reference.

📝 Usage Example

git clone https://github.com/yourusername/DiskHopper.git
cd DiskHopper
chmod +x DiskHopper.sh
./DiskHopper.sh

🔒 Safety Features

  • No files are deleted from the source until they've been fully copied and verified.
  • Identical files already present at the destination are skipped and safely removed from the source.
  • Automatic cleanup of mounts and temporary directories, with warnings if manual cleanup is needed.

✨ Credits

Originally built for moving bulk media between drives being replaced in my homelab's mergerfs pool.
Refined and tested through trial and error and trying to convince myself that SKYNET (gpt4) isn't completely useless on a T480S with my N100 Debian server. Free to use, tweak, share—just don't sue me.

🔗 License

MIT License. See LICENSE.

About

Created to streamline the process of migrating files from one or more source drives to one or more replacement drives.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages