sadm_rear_backup.sh (Documentation in progress)

Updated: 2019/10/10
O/S : Linux

 
NAME

sadm_rear_backup.sh   -   Perform a Rear image backup to a NFS server, ready for a disaster recovery.

 
SYNOPSIS

sadm_rear_backup.sh     [  -v -h -n  ]    [ -d   0-9  ]   

 
DESCRIPTION
  • This script is use to create a backup that can be later use to recover your system in case of a disk crash.

  • Rear backup Section in the SADMin configuration file ($SADMIN/cfg/sadmin.cfg)
            #----------------------------------------------------------------------------
            # NFS Server name where the Rear Backup are Stored
            # NFS mount point where the Rear Backup are stored on the NFS Server
            # Number of Rear Backup to keep at all time.
            #----------------------------------------------------------------------------
            SADM_REAR_NFS_SERVER        = batnas.maison.ca
            SADM_REAR_NFS_MOUNT_POINT   = /volume1/Linux_DR
            SADM_REAR_BACKUP_TO_KEEP    = 3
        


  • The Rear default configuration files (/etc/rear/os.conf and /etc/rear/local.conf), should not be modified as they can overwritten by future update of the package.
  • All your changes (if any), should be done to the site file (/etc/rear/site.conf), this file will not be touch by future update.

  •             # cat /etc/rear/site.conf 
    
                # Create a bootable ISO9660 image on disk as rear-holmes.maison.ca.iso
                OUTPUT=ISO
                
                # Internal backup method used to create a simple backup (tar archive).
                BACKUP=NETFS
                
                # Directory within mount point where iso and tgz will be stored
                NETFS_PREFIX="$HOSTNAME"
                
                # To backup to NFS disk, use BACKUP_URL=nfs://nfs-server-name/share/path
                BACKUP_URL="nfs://batnas.maison.ca//volume1/Linux_DR"
                
                # Disable SELinux while the backup is running.
                BACKUP_SELINUX_DISABLE=1
                
                # Prefix name for ISO images without the .iso suffix (rear_HOSTNAME.iso)
                ISO_PREFIX="rear_$HOSTNAME"
                
                # Name of Backup (tar.gz) File
                BACKUP_PROG_ARCHIVE="rear_${HOSTNAME}"
                
                ONLY_INCLUDE_VG=( "rootvg" ) 
                # EXCLUDE_VG=( datavg ) 
    
                EXCLUDE_MOUNTPOINTS=( '/backups' '/archives' '/install/iso' )
    
                BACKUP_PROG_EXCLUDE=( ${BACKUP_PROG_EXCLUDE[@]} '/tmp/*' '/backups' '/archives' '/install/iso' )
    
                # Exclude components from being backed up,recreation information is active
                #EXCLUDE_BACKUP=()
    
                # Exclude components during the backup restore phase.
                # Only used to exclude files from the restore. 
                #EXCLUDE_RESTORE=()
        

 
OPTIONS

-n
Do not compress backup file(s).
-d
Specify debug level (0-9).
Value of 0 indicate that no debug information is to be displayed.
-h
Display this help and exit.
-v
Output version information and exit.



REQUIREMENTS
  • Environment variable 'SADMIN', specify the root directory of the SADMIN tools.
    Define by setup script in /etc/profile.d/sadmin.sh and in /etc/environment .
  • SADMIN main configuration file, "$SADMIN/cfg/sadmin.cfg"
  • SADMIN Tools Shell Library, "$SADMIN/lib/sadmlib.sh".
  • Rear site configuration file (/etc/rear/site.conf).

 
EXIT STATUS
[0]    An exit status of zero indicates success
[1]    Failure is indicated by a nonzero value, typically ‘1’.

 
AUTHOR
Jacques Duplessis (jacques.duplessis@sadmin.ca.).
Any suggestions or bug report can be sent at http://www.sadmin.ca/support.php

 
COPYRIGHT
Copyright © 2018 Free Software Foundation, Inc. License GPLv3+:
    - GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software, you are free to change and redistribute it.
There is NO WARRANTY to the extent permitted by law.

 
SEE ALSO
sadm_backup.sh   (Do a backup of the files and directories you choose.)
sadm_backupdb.sh   (Backup MariaDB/MySQL Databases)


 
INDEX
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
REQUIREMENTS
EXIT STATUS
AUTHOR
COPYRIGHT
SEE ALSO

Copyright © 2015-2019 - www.sadmin.ca - Suggestions, Questions or Report a problem at support@sadmin.ca