Bug 1001876

Summary: Update "rsync-out" helpout for using wildcard
Product: Red Hat Enterprise Linux 7 Reporter: bfan
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: leiwang, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.22.6-5.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:41:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description bfan 2013-08-28 02:57:37 UTC
Description of problem:
rsync-out dose not support wildcard, if customer want to use the wildcard, need use "glob rsync-out".
Now, Can not find this help in rsync-out helpout, need update it.


Version-Release number of selected component (if applicable):
libguestfs-1.22.6-4.el7.x86_64


How reproducible:
Always


Steps to Reproduce:
Step 1:
# cat /tmp/rsyncd.conf
port = 33335
pid file = rsyncd.pid
[src]
path = /tmp/hostsrc
comment = source
use chroot = false
read only = true
[dest]
path = /tmp/hostdest
comment = destination
use chroot = false
read only = false

Step 2:
# rsync --daemon --config=/tmp/rsyncd.conf

Step 3:
# guestfish --network -a test1.img -m /dev/sda1
><fs> touch /test.c

><fs> rsync-out /*.c rsync://root.85.205:33335/dest/ archive:true
libguestfs: error: rsync_out: '/*.c' to 'rsync://root.85.205:33335/dest/': rsync: link_stat "/sysroot/*.c" 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]

><fs> glob rsync-out /*.c rsync://root.85.205:33335/dest/ archive:true


Actual results:


Expected results:


Additional info:
Has same issue in RHEL, libguestfs-1.20.10-3.el6.x86_64

Comment 2 Richard W.M. Jones 2013-08-29 14:22:44 UTC
Fix also included in libguestfs-1.20.10-4.el6 (note
there is no separate bug for RHEL 6, I just included
the fix in the routine build).

Comment 4 bfan 2013-12-03 09:17:52 UTC
Verified with libguestfs-1.22.6-16.el7.x86_64

><fs> help rsync-out
    ...

    Globbing does not happen on the "src" parameter. In programs which use
    the API directly you have to expand wildcards yourself (see
    "glob_expand"). In guestfish you can use the "glob" command (see "glob"
    in guestfish(1)), for example:

     ><fs> glob rsync-out /* rsync://remote/


Help out is update.

Comment 5 Ludek Smid 2014-06-13 10:41:06 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.