Re: Restore backup to KVM
- Date: Sun, 24 Sep 2017 11:14:28 +0200
- From: <tomas@xxxxxxxxxx>
- Subject: Re: Restore backup to KVM
-----BEGIN PGP SIGNED MESSAGE-----
On Sun, Sep 24, 2017 at 10:58:42AM +0200, solitone wrote:
> On 22/09/17 21:38, Reco wrote:
> >2) Your backup is made by rsync(1) or tar(1).
> >Make yourself a file representing virtual machine disk.
> >Apply parted/fdisk/whatever to make appropriate number of partitions
> >inside it. Create filesystems.
> >Mount these somewhere, invoke rsync(1)/tar(1) as needed.
> Ok, I've done all these steps.
> >Fix extended file attributes, capability labels, SELinux labels if any
> >etc. By hand, that is.
Note that rsync can be told to preserve extended file attributes (option
- -X). Whether that succeeds will depend, of course, on whether the target
file system can digest that.
Likewise, tar has an --xattrs option.
Capabilities and SELinux labels seem to be implemented on top of
xattrs (Disclaimer: I barely know what I'm talking about, but I
Looked It Up On The Internet(TM)). So all seems well here.
"By hand" sounds a bit sadomasochistic. I'd use -X resp. --xattrs
and sift carefully through warnings and errors. Plus perhaps check
one file or three to catch some systematic error.
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----