How to use exclude in extra options

Help
2013-02-26
2013-04-29
  • Gerard Vanderveken

    Hi,
    I.m using grsync on the parted magic cd to rescue a crashed windows disk to another server.
    Problem start when I want to exclude a directory which contains spaces, by adding a line in the extra option field.
    It seems the command before passing on to rsync needs escaping or something.
    The source is /media/sda1 which is in fact the former Windows C: drive.
    I wanted to exclude the Documents and Settings directory
    I tried some variations of the switch, but none give the desired result of skipping the directory
    Some complains about non-existing directores like and and Settings or unable to stat them.
    -exclude Documents and Settings
    -exclude 'Documents and Settings'
    -exclude "'"Documents and Settings"'"
    -exclude "'"Documents" "and" "Settings"'"
    -exclude '/media/sda1/Documents and Settings'

    Could you please advise for the correct switch?

     
  • Piero Orsoni

    Piero Orsoni - 2013-02-27

    Hello,

    Did you try the "protect remote args" (-s) option? It should be in the advanced tab.

     
  • Gerard Vanderveken

    Yes It is on by the default configuration and I did not change it.

     
  • Piero Orsoni

    Piero Orsoni - 2013-03-07

    probably a more complex escaping is needed because the command passes thru the remote shell.
    anyway I'd also try with -exclude-from=FILE

     
  • Gerard Vanderveken

    Why does the command pass to the remote?
    Is the exclusion not done locally were also the source directory is located?
    I assume the problem lies in the hand-over for the string with the command from grsync to the executing program rsync.

     
  • Piero Orsoni

    Piero Orsoni - 2013-03-07

    the fact that -exclude is related to the source doesn't mean that the argument is not passed along (and thus generate a false additional argument).
    could you please post the full command line that grsync is generating? or a link to a pastebin or something with the full log.

     

Log in to post a comment.