1

I have a need to move a number of files from a snapshot of a LUKS encrypted virtual machine (CentOS) to another one on a different hypervisor. I can mount the partition in the guestfish interactive shell and use copy-out to move the files to a local directory, but I'd like to find a way to do the move in fewer steps than:

copy-out to local > rsync to remote hypervisor > copy-in to remote VM

Has anyone done this by piping the output of copy out or something? Any suggestions would be appreciated!

Thanks, Bob

0

You can use tar-out to get a tar file (or virt-tar-out which is the equivalent command). This can be piped into ssh to copy it across. I guess that reduces the complexity by one step. Something like:

virt-tar-out -a disk.img / - | ssh remote "cat > /tmp/remote.tar"
| improve this answer | |
  • Thanks, that looks like it might do what I need - like you say, it reduces complexity, which should mean I can get it done faster which is my main concern. – Bob Mar 31 '17 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.