Backup in Linux:

Backup using dump:

# Make the two partitions of 100MB e.g.hda11, hda12
partprobe /dev/hda

# Formmat the partitions
mke2fs -j /dev/hda11
mke2fs -j /dev/hda12

# Then mount the partition on which you are performing restore.
mkdir /restore
mount /dev/hda12 /restore

# Take the back up of /boot partition on hda11
dump -0uf /dev/hda11 /boot   where 0: level0 (Incremental)
u: upgrade
f: full backup
# Then in case of restoration of backup,
cd /restore
rm -rf *
restore -rf /dev/hda11
# Backup using tar:
cd /
mkdir /dir
cp -R /boot/* /dir
# Perform the backup utility
tar -cvf dir.tar dir -create,verbose,file(tar)
rm -rf dir
# Perform the restore utility
tar -xvf dir.tar -extract,verbose,file(tar)
--------------------------------------
# Compression & Decompression of files
--------------------------------------
mkdir /dir
vim /dir/file1
cd /dir
# Compress the file
gzip -v file1
# Decompress the file
gunzip -v file1

Comments

Popular Posts

Install and configure rsyslog Centralized logging server in CentOS

How to fix postfix/smtp Network is unreachable error

Could not join realm: Necessary packages are not installed: sssd-tools sssd libnss-sss libpam-sss adcli