New tool: virt-tar

I just posted a new libguestfs tool called virt-tar, a sort of general purpose archiving, backup, upload and snooping tool for virtual machines.

You can use this to extract or archive directories from a guest, like this:

# virt-tar -zx someguest /home home.tar.gz

which takes a copy of /home in the VM called someguest and saves it to a local file home.tar.gz.

Or upload to a guest, like this:

# virt-tar -zu someguest /tmp libguestfs-1.0.73.tar.gz

which would unpack the tarball into /tmp/libguestfs-1.0.73/ inside the guest called someguest. You can’t use the upload feature on live guests.

All of the above functionality is already available through guestfish, but having a separate tool to do it makes it easier to remember for the simpler cases.

About these ads

2 Comments

Filed under Uncategorized

2 responses to “New tool: virt-tar

  1. Oron Peled

    Just a usability remark. Maybe the
    arguments may be modified as
    follows:
    virt-tar -zx guest:/home home.tar.gz
    virt-tar -zu blah.tar.gz guset:/tmp

    1. The host:/directory notation is
    familiar from many contexts
    (rcp, scp, nfs, rsync…)
    2. Directionality is: from -> to
    Similar to most file handling
    tools.

    I hope it’s not too late to break the
    already “established” UI…

  2. rich

    Oron, thanks for commenting. Yes, we worried about argument ordering too.

    Unfortunately using “guest:” doesn’t work for several reasons.

    We could swap the directory and tarball name in the case of uploads, but I’ll discuss on the list.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s