PDA

View Full Version : [ubuntu] How to take Hard Disk backup into external USB drive ?



honey_bee
August 28th, 2012, 08:04 AM
hi,
I am using squid server on my Ubuntu box. I want to take full backup of my hard disk (All partitions & Data) into the externel usb drive.The reason is in case of crash of data I just roolback my ubuntu with its partitions and data.

Is there any builtin command in linux ?

Thanks,
honey

darkod
August 28th, 2012, 09:38 AM
You can use fsarchiver for example. It's in the repositories so you can install it with apt-get.

For more details about the program you can see here:
http://www.fsarchiver.org/Main_Page

coldraven
August 28th, 2012, 11:17 AM
I have not used it for quite a while but Clonezilla might be worth a look.
http://clonezilla.org/

You boot Clonezilla up from CD or USB and clone your drive to an image.
Remember that an external USB drive is normally formatted FAT32 and you cannot create files bigger than 4GB.
You may need to reformat it to NTFS or EXT4.

Moif_Murphy
August 28th, 2012, 11:18 AM
There's a Help page which describes your options here:

https://help.ubuntu.com/community/BackupYourSystem

:)

darkod
August 28th, 2012, 11:25 AM
I forgot to mention that fsarchiver backs up unmounted partitions. Clonezilla is similar since to boot with the clonezilla cd you need to power off the system. So, if downtime of the server is a problem, you will need to look for different solution like maybe rsync, etc.

honey_bee
August 28th, 2012, 02:36 PM
thanks for the replies. Well what do say about dd command ? Some one told me that with dd command i can take backup ! is it correct ?

darkod
August 28th, 2012, 03:34 PM
thanks for the replies. Well what do say about dd command ? Some one told me that with dd command i can take backup ! is it correct ?

Yes, but you have to be very careful with it, and what i don't like about dd is that it copies all sectors, even empty ones. So your backup will take longer and take much more space. dd will copy the whole partition including the empty space.

honey_bee
August 28th, 2012, 05:59 PM
thanks for the reply. Well can you write the the complete command of "dd"by which i may take backup.

dd if=/dev/hdx of=/dev/hdy

and if i use "rsync" command with dd command then it will be the affect ?

thanks,
honey