System backups are important because you never know when a hard drive is going to strike or a disaster will come quietly. Here are some ways to back up.
Backing up from the command line
Using the TAR command
This method applies to the home folder of the backup user. Open the terminal and enter:
Tar CVFZ output input
Use the split command to split a compressed mirror into small chunks to be stored in a removable device. For more information please refer to: Backupyoursystem/tar
Creating a disk image using the DD command
This method is useful for backing up an entire disk. Open the terminal (in the example, replace the HDA with the partition you need to back up) create a disk image
DD if=/dev/hda1 Of=/home/hda1.bin
Create a compressed disk image
DD if=/dev/hda1 |. gzip >/home/hda1.bin.gz
I doubt if the above command will produce recursive compression, because the compressed file is placed in the filesystem directory, compressing the hard drive and then compressing itself until it fills up the entire hard drive. I used the above command with only more than 10 g data compressed more than 20 g did not stop backup MBR (Master boot Record)
DD If=/dev/hda of=/home/hda.boot.mbr bs=512 count=1
Recover MBR (from Live CD)
DD if=/mnt/hda1/home/hda.boot.mbr Of=/dev/hda bs=512 count=1
Backup from one disk to another
DD If=/dev/hda of=/dev/hdb Conv=noerror,sync bs=4k
Look at the following command.
dd-if/dev/hda1 > Partitionimage.dd
This command backs up "/DEV/HDA1" (the first partition on HDA1). The entire disk (including the MBR) can be backed up as an input "file" with only/dev/hda. Restore using the following command:
Dd-if partitionimage.dd-of/dev/hda1
You can use the loopback device (loopback device) to load this partition image to compare the file versions of the two without destroying the existing partitions.
Backup from desktop
Using the simple Backup Suite
The simple Backup Suite is a program created in Google Summer of Code 2005. You can choose when, where, and how to back up in a familiar GNOME environment. Simple backup Suite also can also do incremental backups. After the initial backup is created, only modified files are backed up.
Incremental backups
Rsync
Rsync updates only the files that have changed, or even only those parts of the file that were altered. This can effectively save bandwidth for network backups. For security purposes, the transmission between the two machines is done through SSH. Rsync performed well when backing up the user home folder. The command to transfer to a remote computer is:
sudo rsync--delete-azvv-e ssh/home remoteuser@remotehost.remotedomain:./backupdirectory
-Z Compresses data--delete deletes files that are not present on the backup system. Maybe you need it or you don't need it. -A maintains the file date (also available with-T), recursively enters the subfolder (also can use-R), copy only the soft connection itself (or-L), maintain file permissions (also with-p), maintain the user group (or use-g), maintain file ownership (or use-O), maintain device file properties (also available- D). VV echo rsync synchronization process