btrfs-sync icon indicating copy to clipboard operation
btrfs-sync copied to clipboard

Potential bug with "detect remote dst argument" logic

Open opacey opened this issue 3 years ago • 1 comments

Hi, on line 118:

# detect remote dst argument
[[ "$DST" =~ : ]] && {
  NET="$( sed 's|:.*||' <<<"$DST" )"
  DST="$( sed 's|.*:||' <<<"$DST" )"
  SSH=( ssh -p "$PORT" -o ServerAliveInterval=5 -o ConnectTimeout=1 -o BatchMode=yes "$NET" )
}

The $SSH variable is left just with the value "ssh", which then causes the subsequent block of code to throw the error, ""SSH access error to $NET. Do you have passwordless login setup, and adequate permissions for $DST?" when I call btrfs in the following way. I believe my formatting is correct. Any idea what could be wrong?

$ sudo btrfs-sync --verbose -p 22 ~/datadir-snapshots/ed726c [email protected]:/volume12/chainSnapshotBackups/.

opacey avatar Dec 06 '21 16:12 opacey

sudo is the problem. i have a file cat /etc/sudoers.d/90_btrfs-sync with

btrfs ALL=(root:nobody) NOPASSWD:NOEXEC: /bin/btrfs root ALL=(root:nobody) NOPASSWD:NOEXEC: /bin/btrfs

traxanos avatar Apr 03 '22 07:04 traxanos