Improve script robustness, fix edge cases, and pass shellcheck#11
Open
zbcoding wants to merge 6 commits intoGeczy:mainfrom
Open
Improve script robustness, fix edge cases, and pass shellcheck#11zbcoding wants to merge 6 commits intoGeczy:mainfrom
zbcoding wants to merge 6 commits intoGeczy:mainfrom
Conversation
Added support for parallel compression and decompression using pigz if available.
Pull in changes from Cristy94/coolify-migration
- Add early pigz detection with auto-install option and OS detection - Add interactive prompts for sshKeyPath and destinationHost if defaults are used - Fix missing quotes around variables to prevent word splitting - Add comprehensive error handling for Docker commands - Add error handling for authorized_keys operations - Add fallback for nproc command - Fix OS detection patterns for consistency - Improve error messages and validation - Fix syntax issues and indentation problems
- Add detailed overview and features section - Include prerequisites and installation instructions - Document configuration options and usage - Add troubleshooting guide for common issues - Include safety considerations and best practices - Document supported operating systems - Add contributing guidelines - Include table of contents for easy navigation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR builds on the great work in #10 by @rogerb831 (and earlier contributions from @Cristy94 ), which added pigz support, interactive prompts, multi-distro detection, and comprehensive documentation. Those are really nice additions to the migration script.
This PR layers on some additional hardening and fixes a few edge cases discovered
while testing:
set -euo pipefailto catch errors early instead of silently continuing${answer#[Yy]}) with clearercasestatements for y/n prompts
$(id -u)instead of$EUIDfor better POSIX compatibilityStrictHostKeyChecking notoStrictHostKeyChecking accept-new(avoidssilently accepting changed host keys — a potential security concern)
~/.ssh/authorized_keysexists locally before including it in the tararchive
mkdir -p ~/.sshon the remote server before writing keys</dev/nullredirects for remote package-install commands to prevent them from consuming the backup stream piped over stdinafter migration
authorized_keys_backuptemp file and set proper permissions on~/.sshTest plan
🤖 Generated with Claude Code