On Friday, 29 March 2024 at 10:48, Aurélien Bompard 
<abomp...@fedoraproject.org> wrote:
> 
> Hey folks!
> 
> Yesterday the os-control01.stg machine was reinstalled as RHEL9.
> Unfortunately there was a script on there that I forgot to backup. I
> would like, if possible, to retreive it.
> The old VM disk is still on the VM server as
> /dev/vg_guests/os-control01.stg.iad2.fedoraproject.org-el7.
> I tried to naively mount it but it's a block device, not a partition. I
> tried to mount it with the offset that fdisk gives me for the root
> partition:
> # mount -o offset=$((512*5244928)),other,options,here
> /dev/vg_guests/os-control01.stg.iad2.fedoraproject.org-el7 /mnt/tmpextract/
> mount: /mnt/tmpextract: unknown filesystem type 'LVM2_member'.
> But as you can see it's an LVM volume so I can't use it directly.
> I don't want to risk polluting the main LVM setup on the machine, so if
> know of a way to read files from old VM disks I'm interested.
> The file I'd like to get is /usr/local/bin/jobs-summary. It's not a huge
> loss but it's still a few hours of work.
> And if we find a good way of doing this we may want to add it to our

Try guestfish, that should do the job.

# guestfish --ro -a /dev/vg_guests/os-control01.stg.iad2.fedoraproject.org-el7 
-i

><fs> ll /usr/local/bin/jobs-summary
><fs> copy-out /usr/local/bin/jobs-summary /tmp



--
_______________________________________________
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to