Skip to main content

Automating Bare Metal Restores

Thread needs solution

Hi, we have an environment which often requires one of our servers be cloned to a separate server. All of our servers are physical hardware, no virtual machines. What I am wondering is whether we can automate our tasks with some type of a pre and post restore script similar to a Red Hat kickstart where you can define things that should be done before the restore and other things which must take place after the restore.

For example, I would like to script the sfdisk partitioning, lvm volume creation and partition formatting (which may or may not be required come to think of it) before the restore kicks off, then once the restore is completed I would like to have grub-install install the mbr to the first disk and update the hosts file and ifcfg-eth* files and some other similar post restore tasks which must be done manually according to our current procedure.

We have looked into other solutions which offer this so I figured it may be something Acronis can do, we just need to find out how.

Thank you.

0 Users found this helpful

Hi

I assume that you will clone the servers using the following workflow:

  1. back up source server
  2. boot target server using bootable media
  3. recover target server using source server backup

In this case you can customize bootable media by injecting to it the script that:

  1. will prepare target machine (sfdisk partitioning, lvm volume creation, etc.)
  2. start recovery using "acrocmd"
  3. after recovery copy post_recovery script into recovered OS and registers it in start-up scripts (to start the post_recovery script after reboot into OS)

To customize media use media_tools

Thanks, I began following your instructions but I must have done something wrong because when I try to do a restore with the custom disk I get an error that says "The license is invalid. The recovery task will fail." Our license is valid and it works fine with the bootable media. Any idea what I could have done wrong?

Thank you.

Hi

I've checked the instructions (done all steps) - everything is working (backup, recovery).

Did you copy "agent_ramdisk64.dat" into "C:\Program Files (x86)\Common Files\Acronis\BackupAndRecoveryAgent - on a 64 bit Windows machine" and create bootable media using Media Builder on that machine?

Anyway, I can give you my "abr64ram.dat" file which already has "autostart" file. You will just need to copy it to USB root folder and put your "autostart.sh" on the USB root.

Ok, I will give that a try. Where can I obtain the dat file.

I did copy our agent_ramdisk64.dat file to the appropriate folder and then copies the one from the output folder into its place. I burned this onto a cd, not usb. Could that be my problem? Also, could the kernel append parameters be what is causing the license error? I have this on my append line:
append initrd=agent_ramdisk64.dat /s mbcrcs=on vga=0x316 quiet media_for_linux

Also if you could please point me towards a reference for what these options mean. I copied them from a source I found on google on how to make a custom acronis cd.

Thank you.

> Could that be my problem? Also, could the kernel append parameters be what is causing the license error?

CD and kernel parameters should not be a problem.

> Also if you could please point me towards a reference for what these options mean. I copied them from a source I found on google on how to make a custom acronis cd.

As far as I know, to create custom CD you should not change kernel parameters.

I think the error is in "append initrd=agent_ramdisk64.dat" - this means that the wrong dat file will be used. Just avoid adding any custom (found over internet) kernel parameters (unless you know what they are intended for).