6.19.2.4 Restoring and Recovering Guests from Snapshot Backups

This procedure can be used to restore lost or damaged files of a KVM guest using a snapshot-based backup of the guest taken from inside the guest.

Use this procedure to restore lost/damaged files of a KVM guest by using a snapshot-based backup created from within the guest as described in section Method 3: Back Up a Guest Internally .
Log in to the KVM guest as the root user.
  1. Mount the backup NFS server to restore the damaged or lost files.
    # mkdir -p /root/mnt
    # mount -t nfs -o ro,intr,soft,proto=tcp,nolock nfs_ip:/location_of_backup /root/mnt
  2. Extract the damaged or lost files from the backup to a staging area.
    1. Prepare a staging area to hold the extracted files. The backup logical volume LVDbSys2 may be used for this:
      # mkdir /backup-LVM 
      # mount /dev/mapper/VGExaDb-LVDbSys2 /backup-LVM
      # mkdir /backup-LVM/tmp_restore 
    2. Extract the needed files.
      # tar --acls --xattrs --xattrs-include=* --format=pax -pjxvf /root/mnt/tar_file_name -C /backup-LVM/tmp_restore absolute_path_of_file_to_be_restored
  3. Restore the damaged or lost files from the temporary staging area as needed.
  4. Restart the KVM guest if needed.