How to retreive a file from an old VM?
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 SOPs in case it happens again in the future :-) Thanks! Aurélien -- ___ 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
Re: How to retreive a file from an old VM?
On Friday, 29 March 2024 at 10:48, Aurélien Bompard 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 > ll /usr/local/bin/jobs-summary > 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
Re: How to retreive a file from an old VM?
I've extracted the file for you on vmhost-x86-11 in /tmp -rw-r--r--. 1 root root 4499 Mar 29 10:33 /tmp/jobs-summary -- ___ 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
Re: How to retreive a file from an old VM?
I've extracted the file for you on vmhost-x86-11 in /tmp -rw-r--r--. 1 root root 4499 Mar 29 10:33 /tmp/jobs-summary -- Thanks so much!! -- ___ 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