![]() ![]() However, my immediate objective is to recreate the nmr user environment in a virtual host test bed, so I want to create a minimal VM that extracts only the essential features I need. With this system backup in hand, I believe I have captured everything I need to completely reconstruct the original system, as in disaster recovery. ![]() exclude '/opt/topspin/prog/curdir/*' From Backup to Virtual Machine I will only back up the Bruker installation in /opt/topspin and a couple of other small things. The user home directories do not need to be backed up. opt and /home are mounted as separate filesystems on Av301. ![]() So now I have the essentials that I need to reconstruct a bootable system: the grub boot block, the boot partition and the system root partition. Logical volume "rootsnapshot" successfully removed I am done with my LVM snapshot now, so remove backup]# lvremove /dev/vg_01/rootsnapshotĭo you really want to remove active logical volume vg_01/rootsnapshot? : y Tar -cf $MYTAR -null -files-from - backup]# popd I will, however, want to re-create the directory tree structure of the directories I excluded backup]# backup]# pushd backup]# find. To reduce the size of the backup, I will exclude some non-essential directories and backup]# tar -one-file-system -czf av301_root.tgz \ Logical volume "rootsnapshot" backup]#mkdir backup]# mount /dev/mapper/vg_01-rootsnapshot /mnt/rootsnapshot I use the LVM snapshot capability to freeze the system root partition, so that it will not be changing while I am backing it backup]# lvcreate -L5G -s /dev/mapper/vg_01-rootvol -n rootsnapshot If I need to recover the disk, I can use vgcfgrestore to replicate the LVM structures from this saved metadata, but only to a raw disk of the same size. Volume group "vg_01" successfully backed ~]# ls -l /etc/lvm/backup rwxr-xr-x 1 ketcham user 246300486 Aug 1 13:48 sda.dd.0-1.gz Backup of System (Root) Partition I prefer this method because I will only need to raw-copy (i.e., dd copy) this back to my target disk and be able to immediately boot up to kernel load on my new disk without needing to tinker with the boot system.įirst I zero-fill the remaining space of the BU]# cat /dev/zero >/boot/zerosĬat: write error: No space left on BU]# rm BU]# dd if=/dev/sda count=2074623 of=sda.dd.0-1ġ062206976 bytes (1.1 GB) copied, 5.40773 s, 196 BU]#īecause I zero filled the partition, the empty disk spaces compresses to a negligible BU]# df -h /bootįilesystem Size Used Avail Use% Mounted on I will make a raw disk backup from the begining of the hard drive to the end of the boot partition. dev/sdb4 : start= 0, size= 0, Id= 0 Raw Image Backup of the Boot Block /boot Saving the physical disk partition ~]# sfdisk -d >av301.sfdisk BackupĮxamining the disk structure, we have a physical boot partition followed by a physical partition containing an LVM “physical ~]# lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT We are working in a VirtualBox virtual host enviroment. We want to capture a backup of the current, production configuration, in a format that will serve as a backup in the conventional sense, but also can be used to construct virtual machine clones that take off from the current state of our production machine, and are safely hackable in a virtual-hosted development environment.ĪV301 is the target physical machine in this example. The CentOS 7 version of the NMR Console software configuration is currently installed in “production” mode on host named. Backing up a CentOS Physical Machine and Cloning it as a Virtual Machine ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |