Results 1 to 5 of 5

Thread: Restore an entire system?

  1. #1
    Join Date
    Jan 2017
    Posts
    2

    Default Restore an entire system?

    I've restored entire machines with amrecover several times using Red Hat Enterprise Linux 6 and AMANDA 2.6.1. I've followed the same basic steps each time, based on notes I took when I first worked out the process.

    1. Kickstart install the machine
    2. Install AMANDA
    3. Copy AMANDA client configuration files
    4. Run amrecover from the root of the filesystem:

      > setdisk /
      > add *
      > delete /proc
      > delete /sys
      > delete /dev
      > delete /boot
      > extract
      > lcd /boot
      > setdisk /boot
      > add *
      > extract

    5. Fix-up grub
    6. Fix-up filesystem UUIDs
    7. Fix-up network interfaces
    8. Reboot

    I'm trying to use a similar process on Centos 7 with AMANDA 3.3.3, but I'm running into a problem. When I start the extract for the root filesystem, the first thing amrecover does is delete most of the directories in the root of the filesystem, including /usr. This prevents amrecover from running /usr/lib64/amanda/application/amgtar to actually restore the files.

    All clients are using amgtar. The Red Hat 6 clients have tar version 1.23, and the Centos 7 clients have version 1.26.

    I would like to understand why this restore worked with RHEL 6, and how I can change my Centos 7 AMANDA configuration, so it will work the same way. I want the restore to overwrite files first and delete the extra files that aren't included in the backup last. At least I think that's how it worked before.

  2. #2
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    1,045

    Default

    From your post, it is not clear which process remove the file.

    amrecover warn you about the fact that files can be removed.

    It might be a difference in the way gnutar works.

    Do the extract in an empty directory, and move the files.

  3. #3
    Join Date
    Jan 2017
    Posts
    2

    Default

    Quote Originally Posted by martineau View Post
    From your post, it is not clear which process remove the file.
    amrecover warn you about the fact that files can be removed.
    Yes, amrecover warns me that it's going to remove the directories. After I give the extract command, I get several messages like the following:

    WARNING: All existing files in //etc will be deleted.

    I got similar warnings on RHEL 6. My notes indicate that it's safe to ignore them.

    If AMANDA only creates one tar process to restore each file system, I would assume that amrecover is deleting the directories. The error I was getting indicated that amgtar couldn't be run, because the file had already been deleted.

    Do the extract in an empty directory, and move the files.
    I tried that too. I restored everything under a /r directory, but I couldn't figure out how to overwrite the existing directories from the initial system installation in the root of the filesystem.

    I need to figure out how I can run a restore that includes important parts of the system like /lib and /usr in a way that gets the files back in their original locations. Restoring /usr in particular seems to require removing most of the AMANDA software, before the restore operation can really get started.

  4. #4
    Join Date
    Feb 2017
    Location
    heaven
    Posts
    1

    Default

    From your post, it is not clear which process remove the file. Iam recover warn you about the fact that files can be removed. It might be a difference in the way gnutar works.

  5. #5
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    1,045

    Default

    amrecover can erase some file (a few), but tar can remove all files, it try to recreate an exact image of the filesystem at the time of the backup.
    tar remove all files that are not in the backup.

    You can try a manual restore, and tar will not remove files:
    amfetchdump CONF -p HOST DISK DATE | tar xvf -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •