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
# 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