Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Wednesday, 30 August 2017

Backup & Recovery Concept on RHEL / CentOS 5.X&6.X

Backup:-

                 
                 Data Backup is the physical copying of data files to a removable  storage device that allows the data to be stored in another location.  When needed, an individual data file or an entire set of data files,  can be restored to a computer system.


USERS OF  BACKUP & RECOVERY:

    1)To copy data to alternate media 
    2)To prevent data loss 
     
     Note: Only administrators can backup the data

Types of data:

      I)System generated data
      II)User generated data
Types of backup:
1)Full backup
      2)Incremental backup
      3)Differential backup

 1)Full backup :   complete backup of entire system

2)Incremental backup:  It includes all files that were changed since last backup. It always smaller than differential backup.



3)Differential backup:  It includes all the files that were changed since last full backup. As time increases since the last full backup the size of differential backup increases.

Commands for backup:

     1)tar (tape archieve)
     2)cpio (copy input/output)
     3)dump

1) tar:

#tar
Note:destination must be in .tar extension
options:
-c=create
-v=verbose
-f=file
-t=table of content
-x=extract to
-w=interactive
-z=zip

To take backup

#tar -cvf
ex:tar -cvf passwd.tar /etc/passwd 

To list the content of tar file
#tar -tvf
ex:tar -tvf passwd.tar 

To extract content of file

#tar -xvf
ex:tar -xvf passwd.tar

To take backup along with zip

#tar -cvzf

Note:file name must be with an extension of .tar.gz

example : #tar -cvzf passwd.tar.gz /etc/passwd

To extract zip file

#tar -xvzf
example : #tar -xvzf passwd.tar.gz

2) cpio(copy input/output):

Backup using cpio:

#ls | cpio -ov >
example:ls -l | cpio -ov > sun

To extract:

#cpio -iv
example:cpio -iv sun

3) dump  : 

Backup using dump:
#dump -Ouf
example:dump -Ouf /media/ sun
To extract:
#restore -f
example:restore -f sun

Remote backup:

#rsync -avz -e ssh :
example:rsync -avz mahesh -e ssh 192.168.1.20:/root/mahesh

#scp -r :
example:scp -r mahesh  192.168.1.20:/root/mahesh

No comments:

Post a Comment