How to do backup and restore with rsync on linux?
Posted on 2010-09-14
I got a linux machine running SLES9 with rsync available.
I would like to back up the whole system in 2 or 3 steps using rsync
to an exernal usb 2TB drive which has been formatted to FAT32.
(I know, it is not the best practice to have big drive like that
in FAT32, but I'm not too good in linux.)
How do I run rsync to back up the system with minimum files and
restore the system? I assume it is possible when I mess up the machine,
I can restore the system from a different machine with backup drive
(external usb 2TB) and a SATA hard drive.
The display of df command is below.
linux2:/tmp # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 30969600 28556508 839928 98% /
tmpfs 2024720 12 2024708 1% /dev/shm
/dev/sda1 101105 11301 84583 12% /boot
/dev/sda7 53028292 49499092 835504 99% /home
/dev/sda6 20641788 14549688 5043460 75% /opt
/dev/sda5 5162828 2759284 2141284 57% /var
/dev/sdb1 961195208 857966920 54402340 95% /data
/dev/sdc1 1953035168 32 1953035136 1% /mnt/usbdrive
1. /mnt/usbdrive is the 2TB external usb drive.
2. /data is another hard drive which only has data files. (I think rsync command
and handle this drive separately.)
3. OS has a RAID1 setting.
Any opinion is very much appreciated.