Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Note: this is also posted at stackoverflow by accident

Can someone give me a hand as to why my rsync command isn't working? I can't figure out what's wrong

#! /bin/bash


$RSYNC -avvvz -H --numeric-ids -e $SSH -i $KEY -p $PORT $RUSER@$RHOST:$RPATH $LPATH --delete

All I keep getting is the following error:

rsync: link_stat "/backup/Friday.tar.bz2" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1518) [Receiver=3.0.9]

EDIT: here is the output of ls /backup-test

ls -al /backup-test/
total 2402976
drwxr-xr-x.  2 root root       4096 May 17 12:27 ./
dr-xr-xr-x. 25 root root       4096 May 17 11:37 ../
-rw-r--r--.  1 root root 2460634814 May 17 12:58 Friday.tar.bz2

EDIT2: In case it helps, here is the tar script to originally create the archive

tar -cjvf /backuptest/archive/$(date '+%A').tar.bz2 /backup --overwrite
share|improve this question
Could /backup/Friday.tar.bz2 be a symlink to something that doesn't exist? – Flup May 17 '13 at 14:38
Where are your quotes? – Ignacio Vazquez-Abrams May 17 '13 at 14:40
What quotes Ignacio Vazquez-Abrams? Do you mean around the source? I have tried with and without - same result – kaipee May 17 '13 at 14:44
rsync: link_stat "/backup/Friday.tar.bz2" is not the same as ls -al /backup-test/ -- make sure your production/development names wind up checking out. I've made this kind of mistake a bunch of times. I notice it, and mention it because your output from your script doesn't match the posted script. – dougBTV May 17 '13 at 14:46
Thanks dougBTV I just noticed that too. The thing is, my script clearly says to connect to {host}:/backup-test .... but rsync is trying to download from /backup/ ?? Maybe it doesn't like directories with hyphen? – kaipee May 17 '13 at 14:50
up vote 0 down vote accepted

Test with Directly Rsync, without Bashscript?

share|improve this answer
Turns out my .bashrc alias was pointing to an older script in a different directory (ooops) - I have updated and the rsync is no connected....but bringing up a different error – kaipee May 17 '13 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.