If there is any issue at setup or connection contact [email protected]
Overview of Unix
Activity Guide 6
[Edition 1]
[Last Update 130815]
For any issues/help contact : [email protected]
If there is any issue at setup or connection contact [email protected]
BACKUP AND RESTORE IN LINUX
In information Technology, a backup or the process of backing up is masking copies of data
which may be used to restore the original after a data loss event.
Backups have two district purposes.
The primary purpose is to recover data after its loss, be it by data deletion or corruption. Data
loss is a very common experience of computer users. 67% of Internet users have suffered
serious data loss.
The secondary purpose of backups is to recover data from an earlier time, according to a user-
defined data retention policy, typically configured within a backup application for how long
copies of data are required.
Backup is the most important job of a system administrator, as a system admin it is your duty to
take backup of the data every day.
Many companies have gone out of the market because of poor backup planning.
The easiest way to backup up your files is just copying. But if you have too many files to backup,
copying and restoring may take too long time and it is not convinient. If there is a tool that can
put many files into one file, the world will be better. Fortunetly, 'tar' is used to create archive
files. It can pack files or directories into a 'tar' file. It is like Winzip in windows, without much
compression.
The gzip program compress a single file. One important thing to remember about gzip is that,
unlike tar, it replaces your original file with a compressed version. (The amout of compression
varies with the type of data, but a typical text file will be reduced by 70 to 80 percent).
If there is any issue at setup or connection contact [email protected]
To backup the file using tar
To backup the file using tar Syntax is
#tar -cvf <destination and name to be > <source file>
Check the size of tar file by using du -h <filename> command #du -h /opt/etc.tar
Now apply gzip on tar file and check the size
To apply gzip on a tar file, the syntax is #gzip <file name>
#gzip /u02/etc.tar
Now check the size of the file
If there is any issue at setup or connection contact [email protected]
Transfer the file to other system and remove gzip and tar from it and check the size on every step
Let's Transfer the file to other computer using scp
#scp /u02/etc.tar.gz 192.168.2.10:/root/
Untar the file and check for the size of the file / directory
tar -xvf <file name>
If there is any issue at setup or connection contact [email protected]
If there is any issue at setup or connection contact [email protected]
=============End of the Activity 6 Guide========
Top Related