#762 Issue closed: Rear not backin up all the partitions

Labels: support / question

suaveyosi opened issue at 2016-02-04 15:48:

Hello,

first of all thank you for your work, this is just what I was looking for. I am testing rear at a machine, changing its configuration and playing with rear options to perform backup & recovery.

So far it works as expected , but there has been an issue with one of my test.
My environment is Red Hat Enterprise Linux Server release 7.1 (Maipo)
Linux hlrhvmkstest01 3.10.0-229.7.2.el7.x86_64

Here is my config file, I make backup of my machine over a different machine called hlrhvmksitx01:
OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL="nfs://hlrhvmksitx01/rear_isos"
GRUB_RESCUE=1
GRUB_RESCUE_PASSWORD="..password properly encrypted...."

I have two disks at my machine /dev/sda and /dev/sdb.
/dev/sda is parted, sda1 contains grub and /boot and sda2 contains vg00 and all the FS with the OS.
/dev/sdb is parted in three. /dev/sdb1, /dev/sdb2 and /dev/sdb3, each of them contains a FS and is mounted on /test1 /test2 and /test3 respectively.

If I perform rear backup and rear recover over all of them it works fine as expected. Lets assume that we are not interested in /dev/sdb3 so I add this line at config file:
EXCLUDE_RECREATE=( "${EXCLUDE_RECREATE[@]}" "/dev/sdb3" )

I execute rear mkbackup and as result the disklayout.conf file contains the following lines commented:
**_#part /dev/sdb 268435456 1048576 primary none /dev/sdb1

part /dev/sdb 268435456 269484032 primary none /dev/sdb2

part /dev/sdb 535822336 537919488 primary none /dev/sdb3

....
_fs /dev/sdb1 /test1 ext4 uuid=9b044fc7-bc28-4d2d-9fb8-8d1a615cda68 label= blocksize=1024 reserved_blocks=3% max_mounts=-1 check_interval=0d bytes_per_inode=4096 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/sdb2 /test2 ext4 uuid=1eb92ec5-56b4-46ea-85bf-2d2f0f056b15 label= blocksize=1024 reserved_blocks=3% max_mounts=-1 check_interval=0d bytes_per_inode=4096 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered

fs /dev/sdb3 /test3 ext4 uuid=85b25f10-d14b-45fb-b2b8-a449449d2028 label= blocksize=1024 reserved_blocks=3% max_mounts=-1 check_interval=0d bytes_per_inode=4088 default__mount_options=user_xattr,acl options_=rw,relatime,data=ordered__**

I think that there is some kind of mistake, I am telling at the config file that I am not interested only in /dev/sdb3, but as consequence all the partitions are automatically marked as not necessaries, despite its FS keep uncomented. Obviously, when I try to make "rear recover" after that I am getting the following errors:

_**"No code has been generated to restore device fs:/test1 (fs).
Please add code to /var/lib/rear/layout/diskrestore.sh to manually install it or choose abort.

  1. Continue
  2. Abort "**_

If I choose to continue, all the information at /dev/sdb is erased.

I have performed other test where I manually excluded an lvol and it worked fine, the problem seems to be only with physical partitions of the same disk.

Thanks in advance! Regards.

gdha commented at 2016-02-04 16:00:

The usage is more in the trend of:

./examples/SLE12-SP1-btrfs-example.conf:# matching entries in EXCLUDE_RECREATE like "fs:/tmp" would result
./examples/SLE12-SP1-btrfs-example.conf:EXCLUDE_RECREATE=( "${EXCLUDE_RECREATE[@]}" 'fs:/var/tmp' 'fs:/srv' 'fs:/var/lib/pgsql' 'fs:/var/spool' 'fs:/var/lib/libvirt/images' 'fs:/var/opt' 'fs:/tmp' 'fs:/.snapshots' 'fs:/var/lib/named' 'fs:/var/log' 'fs:/boot/grub2/i386' 'fs:/var/lib/mariadb' 'fs:/home' 'fs:/var/crash' 'fs:/var/lib/mailman' 'fs:/opt' 'fs:/usr/local' 'fs:/boot/grub2/x86_64' )

Excluding a partition is IMHO not coded in rear.

suaveyosi commented at 2016-02-04 17:19:

Thank you for the quick response. I have tested and it worked as expected, my problem is now solved!

Excuse me because I am pretty novice at Github (I have just registered myself) I have a different question, but I'm not sure if I should ask it here or in a different post.

My question is, I am saving my backup files in a different server over NFS, but, if at my server the grub becomes corrupted, I have no way to access to rear in order to perform the restore, which will also fix my Grub. What would be the simplest way to accomplish that (access rear even tough the grub is corrupted to perform recover task)?

Thanks again!

jsmeix commented at 2016-02-05 09:12:

@suaveyosi
in general for separated issues create separated issues at GitHub.

To recover any system regardless what got corrupted or broken, you boot the rear recovery system (i.e. the rear ISO image) either on the same hardware if the hardware is still o.k. or on new compatible replacement hardware if the hardware got damaged.

Basically rear recovery is a re-installation from scratch.

For some background information you may have a look at
https://en.opensuse.org/SDB:Disaster_Recovery


[Export of Github issue for rear/rear.]