jimsalterjrs / sanoid

These are policy-driven snapshot management and replication tools which use OpenZFS for underlying next-gen storage. (Btrfs support plans are shelved unless and until btrfs becomes reliable.)
http://www.openoid.net/products/
GNU General Public License v3.0
3.13k stars 308 forks source link

The way syncoid is built assumes Bash/POSIX shell #948

Open crabdancing opened 2 months ago

crabdancing commented 2 months ago
syncoid -r root@mymachine:rpool/data rpool/mymachine-backup/data                                                                                                                         ❌2 2024-08-27 (Aug, Tue) 00:50:09
Error: nu::parser::unknown_flag

  × The `echo` command doesn't have flag `-n`.
   ╭─[source:1:7]
 1 │ echo -n
   ·       ┬
   ·       ╰── unknown flag
   ╰────
  help: Available flags: --help(-h). Use `--help` for more information.

CRITICAL ERROR: ssh connection echo test failed for root@mymachine with exit code 1 at /nix/store/y291afvmzdmff6r02qnhi3c6mcqpws6j-sanoid-2.2.0/bin/.syncoid-wrapped line 1714.

It is clearly getting confused here because the nushell 'echo' command does not have a -n flag. Ideally, syncoid would make explicit the kind of shell it wants (e.g., running ssh command with bash as a command).

lckarssen commented 2 months ago

:warning: Linking to "a fix" in this way looks rather suspicious. If this is a true fix @ESMELSTEPHANE24, please link to the code in a proper repository like GitHub, GitLab or other so that users here can inspect it before downloading stuff from random websites. No longer relevant, the spam has been removed.