[Libguestfs] getting guestfs_rsync_out to work

Richard W.M. Jones rjones at redhat.com
Sun Feb 8 11:05:44 UTC 2015


On Sat, Feb 07, 2015 at 05:19:42PM -0600, Jeff Brower wrote:
> All-
> 
> Per this page
> 
>   https://rwmj.wordpress.com/2013/04/22/using-rsync-with-libguestfs/
> 
> We are trying to get the libguestfs API guestfs_rsync_out to work.  We’ve tried combinations similar to:
> 
>   guestfs_rsync_out(g, “/HostShared”, “rsync://root@10.0.1.90:2999/backup/ -av”, -1)
> 
> surrounding it with APIs as in the recipe examples, for example replacing libguestfs_cat(), with no luck. In the above
> example the "backup" rsync module name matches the script on Richard's wordpress.com blog page (above link). 
> Typically in the rsync daemon log we see something like:
> 
>   receiving file list
>   sent 17 bytes received 24 bytes total size 0
> 
> but no data is transferred. We are successful using rsync from the Linux command line, and we can get libguestfs APIs
> like guestfs_cat() to work fine. But we’ve had zero luck with rsync_out over the last week.

I think it's really hard to diagnose problems without turning on
debugging in libguestfs:

http://libguestfs.org/guestfs-faq.1.html#how-do-i-debug-when-using-the-api

> Unfortunately there are no actual API examples online, no
> “recipes” on the libguestfs.org site, etc.  Does anyone know
> where there are some actual libguestfs_rsync_out() working examples?

The only example I can point to is this test:

https://github.com/libguestfs/libguestfs/blob/master/tests/rsync/test-rsync.sh

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list