From: Jeff M. <in...@bi...> - 2004-02-12 14:41:24
|
Yeah, I tried something along those lines.. I took the "ssh" line and plunked it into a file then ran it.. ie: here is the content of the file ssh -l backup bilbo.mydomain.ca cd "/usr/home" && sudo find -E . -depth ! -fstype nfs ! -fsty pe smbfs ! -fstype bind ! -fstype proc ! -fstype devpts ! -fstype devfs ! -fstype tmpfs ! -ty pe s -print0 | sudo tar --create --null --files-from=- --ignore-failed-read --same-permission s --no-recursion --totals --label "level 0 bilbo.mydomain.ca:/usr/home Thu Feb 12 10:39:02 20 04 tar+gzip from gollum.mydomain.ca" --verbose --sparse -b 20 --file - | sudo gzip -4; x=(${P IPESTATUS[@]}); i=0; while [ $i -lt ${#x[@]} ]; do [ ${x[$i]} -eq 0 ] || exit ${x[$i]}; i=$(( $i+1)); done Then i ran it "sh foo.sh" and got -su-2.05b$ sh foo.sh foo.sh: 1: Syntax error: Bad substitution Soooo I took out the first part [the ssh command] and just started the script with the "sudo tar" line. I put this modified version on bilbo and tried to run it and got the exact same error. So i tink the error must be that chunk in the end, but i don't know shell scripting very well so i'm kinda lost. Jeff. John Reynolds wrote: > Jeff MacDOnald wrote: > >> i think i found it. tar on freebsd does not support --no-recursion yet >> it does support -norecurse >> >> are these intended to be the same thing ? >> > > What version of FreeBSD are you using? In FreeBSD 5.1-current (I'm too > lazy to upgrade to 5.2 just yet) I see: > > -n, --norecurse > --no-recursion avoid descending automatically in directories > > Seems to be the same thing. > > All I can offer as advice to debug is try logging into bilbo as "backup" > and try running the find command itself. That's about the only thing you > can do is try to isolate what is dying piece-meal. > > -Jr > > |