Results 1 to 3 of 3

Thread: Issue with rsync on using wildcards

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    23
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Issue with rsync on using wildcards

    Hi all,

    It seems rsync won't like using wildcharacters.

    #!/bin/bash
    BACKUPLOC="/opt/apps/repobackup"
    for i in `cat /opt/apps/scripts/repos`; do cd $BACKUPLOC/$i; sleep 1; rsync -qauz --ignore-existing *.dump <server_name>:/opt/apps/backuptarget/$i; done

    One strange thing I observed is that, if the dump file name is a plain text without any wildcards/trailing slashes, it works pretty cool, but if I happen to have any ": -" it consider's that as a trailing character \.

    File name looks something like this,
    test27\:11.dump

    In this case, rsync fails to transfer the file, and throws the error which I mentioned in the last line.






    I am getting the below error, when i try to run my script,

    rsync: link_stat "/opt/apps/repobackup/test2/test2*" failed: No such file or directory (2)
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

  2. #2
    Junior Member
    Join Date
    Oct 2012
    Posts
    14
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Default

    hi,

    try using

    Code:
    rsync -qauz --ignore-existing ./*.dump ...
    and it should work. this is because wildcards are expanded by the shell

  3. #3
    Junior Member
    Join Date
    Mar 2009
    Posts
    23
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Oh yeah, I did it already. Thought of updating the same, but I failed to update it.

    Vijay.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. incrond and rsync (log says OK, but no rsync occurs)
    By KTC in forum CentOS / RHEL / Fedora
    Replies: 4
    Last Post: 5th February 2012, 02:11 AM
  2. Do you need an ssh server to use rsync
    By chinalinix in forum Networking, Firewalls and Security
    Replies: 2
    Last Post: 8th July 2010, 02:50 PM
  3. rsync over ssh.
    By nishith in forum CentOS / RHEL / Fedora
    Replies: 3
    Last Post: 25th September 2009, 01:33 PM
  4. how to tar using rsync
    By Rahul.Kolan in forum File Servers
    Replies: 2
    Last Post: 12th August 2009, 08:09 PM
  5. rsync pls help
    By linuxmanjusha in forum Web servers
    Replies: 1
    Last Post: 23rd October 2007, 12:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •