0% found this document useful (0 votes)
16 views

SOP For Creating Image-Rear-Mkbackup

Uploaded by

faeem
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

SOP For Creating Image-Rear-Mkbackup

Uploaded by

faeem
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

How to Create and Image

----------------------------------------------------

Install rear genisoimage syslinux through YUM

Login as root
And run below

# yum install rear genisoimage syslinux -y

1. Create directory with name reariso in /root

# mkdir /root/reariso

2. Create configuration file local.con in /etc/rear/


And add below lines and save the file

# vi /etc/rear/local.conf
# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in /usr/share/rear/conf/default.conf
#
# This file (local.conf) is intended for manual configuration. For configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it is.
# Our packages will never ship with a site.conf.
OUTPUT=ISO
OUTPUT_URL=file:///root/reariso
BACKUP=NETFS
BACKUP_URL=iso:///root/reariso

:wq!
#
3. Verify the added contents to local.conf

# cat /etc/rear/local.conf
# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in /usr/share/rear/conf/default.conf
#
# This file (local.conf) is intended for manual configuration. For configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it is.
# Our packages will never ship with a site.conf.
OUTPUT=ISO
OUTPUT_URL=file:///root/reariso
BACKUP=NETFS
BACKUP_URL=iso:///root/reariso
#

4. Change the hostname to localhost and exit and login again to check.

# hostnamectl set-hostname localhost


# exit
logout
Connection to xxxxxxx closed.
[root@xxxxxx ~]# ssh localhost (IPaddress of the server on which we are creating
the image)

[root@localhost ~]#

5. Run the rear mkbackup utility for creating the image.

[root@localhost ~]# rear -v mkbackup


Relax-and-Recover 2.4 / Git
Using log file: /var/log/rear/rear-localhost.log
Using backup archive
'/tmp/rear.aiOt6S4DZxFcNYo/tmp/isofs/root/reariso/backup.tar.gz'
Creating disk layout
Using guessed bootloader 'GRUB' (found in first bytes on /dev/sda)
Creating root filesystem layout
Copying logfile /var/log/rear/rear-localhost.log into initramfs as '/tmp/rear-
localhost-partial-2020-09-09T23:07:08-0700.log'
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Copying all files in /lib*/firmware/
Creating recovery/rescue system initramfs/initrd initrd.cgz with gzip default
compression
Created initrd.cgz with gzip default compression (246425761 bytes) in 28 seconds
Creating tar archive
'/tmp/rear.aiOt6S4DZxFcNYo/tmp/isofs/root/reariso/backup.tar.gz'
Archived 2975 MiB [avg 4157 KiB/sec] OK
WARNING: tar ended with return code 1 and below output:
---snip---
tar: /var/spool/postfix/public/showq: socket ignored
tar: syncvault: Warning: Cannot flistxattr: Operation not supported
tar: home_old: Warning: Cannot flistxattr: Operation not supported
----------
This means that files have been modified during the archiving
process. As a result the backup may not be completely consistent
or may not be a perfect copy of the system. Relax-and-Recover
will continue, however it is highly advisable to verify the
backup in order to be sure to safely recover this system.

Archived 2975 MiB in 734 seconds [avg 4151 KiB/sec]


Making ISO image
Wrote ISO image: /var/lib/rear/output/rear-localhost.iso (3.2G)
Copying resulting files to file location
Saving /var/log/rear/rear-localhost.log as rear-localhost.log to file location
Exiting rear mkbackup (PID 10664) and its descendant processes
Running exit tasks
[root@localhost ~]#

8. Copy the iso image rear-localhost.iso to jumphost or on nfs share


(/home/fpatel01) to mount it on the targeted server where we want to restore the
image.

a. Change the permission to 777 of iso file and copy it to nfs share
(/home/fpatel01) or to jumphost.

[root@localhost layout]# chmod 777 /var/lib/rear/output/rear-localhost.iso

[root@localhost layout]# cp /var/lib/rear/output/rear-localhost.iso


/home/fpatel01/ldc-eod06/
9. Copy the log and disklayout.conf file to jumphost or on nfs share
like(/home/fpatel)

[root@localhost ~]# cp /var/log/rear/rear-localhost.log /home/fpatel01/ldc-eod06/

[root@localhost ~]# cp /var/lib/rear/layout/disklayout.conf /home/fpatel01/ldc-


eod06
[root@localhost ~]#

10. We have done with the image creation and ready to restore it.

-------------------------------------------------------------------------

You might also like