Setup dual boot for alternative Centos 7 configurations

General support questions
Post Reply
BGood
Posts: 18
Joined: 2016/12/25 02:40:14

Setup dual boot for alternative Centos 7 configurations

Post by BGood » 2018/02/23 20:47:05

Because I know just enough about Linux to be dangerous, I configured a dedicated and relatively isolated Centos 7 development server as a development platform for a Drupal 6 to Drupal 7 migration.

As my software migration has progressed, I have been making periodic Clonezilla backup images to a local NAS so I can restore to a working image if (when) I screw things up. This backup process is simple but very cumbersome because it restores everything, and is not very useful if I need to reference only limited data from an earlier image.

I was wondering if there is a way I could use grub2 to maintain separate two separate development environments, and decide at boot time which environment to boot into. Ideally, I would like to be able to mount the non-booted environment to quickly copy and replace missing components into the booted environment, and vice-versa.

Is this approach a worthwhile idea and something that is simple to do? Can anyone provide some simple references or alternative suggestions?

Thanks!

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Setup dual boot for alternative Centos 7 configurations

Post by desertcat » 2018/02/26 09:49:45

BGood wrote:Because I know just enough about Linux to be dangerous, I configured a dedicated and relatively isolated Centos 7 development server as a development platform for a Drupal 6 to Drupal 7 migration.

As my software migration has progressed, I have been making periodic Clonezilla backup images to a local NAS so I can restore to a working image if (when) I screw things up. This backup process is simple but very cumbersome because it restores everything, and is not very useful if I need to reference only limited data from an earlier image.

I was wondering if there is a way I could use grub2 to maintain separate two separate development environments, and decide at boot time which environment to boot into. Ideally, I would like to be able to mount the non-booted environment to quickly copy and replace missing components into the booted environment, and vice-versa.

Is this approach a worthwhile idea and something that is simple to do? Can anyone provide some simple references or alternative suggestions?

Thanks!
There is a couple of answers to your question as I have --sort of -- been where you are. The way I finally got around the problem was during the install phase was to partition the entire drive rather than to use the default LVM. That way I could back up any single partition which could then be restored if (when) I do something "clever" (NOT). I also make a single giant restore file using the dd command... just in case I toast the entire disk. The problem is both procedures are time consuming and a giant PITA.

Lately I have discovered a SIMPLE backup system called Backupninja. It is very flexible and you can backup 95% of the drive either as a giant BIG UGLY thing, down to single partitions, and even down to single directories. It has the ability to backup to remote servers, and even do incremental backups. All automated. One other thing: It is available for CentOS 7, simply issue yum install backupninja. I'll probably combine this with a single backup of the entire system one or twice per year or point release using the dd command and maybe a "snapshot" of the entire disk. I am trying to develop a cohesive backup up plan that is done more frequently than once or twice a year. Currently I have have set it so all the individual partitions with the exception of two very large partitions (one being the one that holds all my Virtual Machines) are backed up WEEKLY and the two very large partitions MONTHLY and they are backuped to a 2TB HDD. You can set it up so it will back things up daily or even hourly if you so choose. In your case if you know in advance what directories are likely to be toasted back those single directories up frequently, and then back up the system monthly with Backupninja and combine it with your snapshots just in case you toast the entire drive.

One final point: Can you use Grub2..... Hummmmm. Maybe. The way you might be able to do it is if you could somehow duplicate the drive on the fly, copy it to /etc/grub.d/40_custom, which would then be available at bootup time. That is way beyond my skill set, but in theory possible. The simplest procedure would skip messing with Grub2, and to simply use Backupninja and depending on your configuration and backup frequency, if you screw up simply roll back to that to that single directory or partition.

Best of Luck

Post Reply