Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I currently have many of these commands running in a .sh file that looks like this:

rsync -avz -e ssh --rsh='ssh -p1337' --bwlimit=10000 root@DestinationIP:/home/backup /home/localbackup
rsync -avz -e ssh --rsh='ssh -p1337' --bwlimit=10000 root@DestinationIP:/home/backup2 /home/localbackup2

When I go to run this, it goes through to the destination correctly, but adds a "?" to the beginning of the directory locally, which prompty fills up the hard drive to the brim.

Have I done a flag incorrectly? I thought rsync was supposed to sync the directories, not duplicate them.

share|improve this question
    
At the beginning? It doesn't (seem to) create directories called /home/localbackup?/backup and /home/localbackup2?/backup2? –  Gilles Mar 18 '13 at 18:33
    
If running the commands manually works fine, what does your .sh file actually look like? And are you using bash or another shell? –  depquid Mar 18 '13 at 18:52
    
the -e ssh --rsh=... seems strange - -e is a synonym for --rsh. –  peterph Mar 19 '13 at 23:01

1 Answer 1

You may want to look at the man pages for rsync.

There is a section in there that has the following:

The file-types that replace the X are: f for a file, a d for a directory, an L for a symlink, a D for a device, and a S for a special file (e.g. named sockets and fifos).

          The  other  letters  in  the string above are the actual letters
          that will be output if the associated attribute for the item  is
          being  updated or a "." for no change.  Three exceptions to this
          are: (1) a newly created item replaces each letter with  a  "+",
          (2)  an identical item replaces the dots with spaces, and (3) an
          unknown attribute replaces each letter with a "?" (this can hap-
          pen when talking to an older rsync).

Start there and report back!

share|improve this answer
    
What's odd is that when I perform the commands in turn, they work out fine, am I doing something wrong in the .sh? –  mobile Mar 18 '13 at 18:30
    
Im not certain, is what you posted (the two lines of rsync) your .sh file? If so, then yes, you have some problems in there. If you just copied two lines out of your .sh, then I can't answer that I'd have to see the entire thing. –  Justin Carroll Mar 18 '13 at 18:52

Your Answer

 
discard

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.