LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2007, 11:55 PM   #1
jacatone
Member
 
Registered: Mar 2004
Posts: 280

Rep: Reputation: 30
What's the best way to backup an entire Linux install?


In XP Pro, I use Acronis True Image to create a complete backup of my C drive, which has come in handy more than once. How would I achieve the same result with Linux. I've posted several questions on this topic, but haven't really gotten an answer. Does anyone have one? Thanks.

Last edited by jacatone; 05-22-2007 at 11:57 PM.
 
Old 05-23-2007, 12:09 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
You can use dd to make an image file of the root partition. You can also pipe the output through bzip2 or gzip to reduce it's size.

You can also use tar, or dar or kdar to backup the files in the system. This will allow incremental backups down the road.
 
Old 05-23-2007, 01:21 AM   #3
jacatone
Member
 
Registered: Mar 2004
Posts: 280

Original Poster
Rep: Reputation: 30
What is dd? Is it a program I can install using Synaptic? Thanks.
 
Old 05-23-2007, 01:28 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
It is a program that you probably have already. It copies the standard input to the standard output, with options like "if=" for the input file that could be the device and "of=" for the output file which could be the image file to save. You can also set the block size and count as well.

On a unix system, due to it's everything is a file philosophy, you can even cat the device to an image file:
sudo cat /dev/hda1 /mnt/backup/hda1.iso

There is another program called ddrescue that can be used to create an image file if there are bad blocks on the device.
 
Old 05-23-2007, 01:42 AM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
dd comes standard with any Linux as a base tool. I use bootitng, which is similar to acronis, all my partitions are made with it, then I make a compressed image of the partition and store it to my ntfs data partition, then all data in that partition is also backed up on a external USB drive. Bootitng can put the image wherever you want such as: CD's, DVD, USB drives, other partition, network drives, etc. My Fedora takes up about 5.8GB of it's partition, the image is 1.5GB in size. I don't have a separate /home partition as my shared data drive is ntfs (unlimited file size), there's no need to image the swap.
These images have came in handy more often with Linux than with Windows for me, (Windows rarely sees action). But on my system, when imaging a 10GB Linux partition, it takes a couple minutes. When I screw one up, I use bootitng to zero the partition, make a new one in it's place and load an image of a fresh updated installation in about 8 minutes for all those steps.
dd can zero a drive/partition also, but dd does not omit free/unallocated space like bootitng that only copies files, so dd images will be bigger even with compression. The images of any OS can be installed in any partition anywhere on the drive, and as many copies of the same OS image as you want at the same time and bootitng will boot it, they don't need to be in the exact same spot on the drive if bootitng is installed and managing the drive/drives.
Below is a useful link to dd:
http://www.linuxquestions.org/questi...d.php?t=362506
 
Old 05-23-2007, 02:00 AM   #6
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
cd /
tar -cpf /dev/(whatever) --label "full backup-`date '+%d-%B-%Y'`" --directory /
 
Old 05-23-2007, 05:13 AM   #7
lein
Member
 
Registered: Jul 2006
Location: Australia
Distribution: Mint 14/16 & Raspbian
Posts: 73

Rep: Reputation: 23
If you are already running Acronis you should be able to create an Acronis boot CD that allows you to back up a partition without actually booting into any of them. I am assuming that this should hold true for a *nix partition as it does for a Windows one.

I'll just go check that.

edit: ***10 minutes later***
Yep. Works fine. Use Acronis True Image to create an Acronis boot disk and that will load the program entirely into ram (like a live distro) then you can select your partition and create a backup. The backup can be created directly into one of your partitions, a network device, another HDD even. Just like using the program through windows.

If you are looking for an open source solution then there is BootItNG and G4L (ghost 4 linux), that offer similar abilities.

Last edited by lein; 05-23-2007 at 05:24 AM.
 
Old 05-23-2007, 08:54 AM   #8
Earthling2
LQ Newbie
 
Registered: Aug 2006
Location: Solihull
Distribution: Mandriva 2007 Spring One
Posts: 24

Rep: Reputation: 16
Quote:
Originally Posted by jacatone
In XP Pro, I use Acronis True Image to create a complete backup of my C drive, which has come in handy more than once. How would I achieve the same result with Linux. I've posted several questions on this topic, but haven't really gotten an answer. Does anyone have one? Thanks.
As a recent Linux newbie (Mandriva) this was one of the first questions I asked myself - how can I do in Mandriva what I routinely do in XP with Ghost?

The simple answer lies in a bootable cd called SystemRescueCD, which has a utility called partimage (along with several other useful utils), and this morning I have proved that it does indeed do what it says on the tin. Having damaged my Mandriva somehow I was able to restore it from external drive within 10 minutes. It also offers compression, which AFAIK dd does not, and also only backs up sectors used, so the image is a lot smaller than dd's.

http://www.sysresccd.org/Main_Page
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a backup of the entire LINUX OS cr9c1 Linux - General 9 11-30-2006 07:45 PM
How to backup an entire install -- Resize ext3(now ext2) smaller 1veedo Linux - Hardware 8 08-14-2006 02:46 PM
how to backup the entire linux os to the dat tape drive cwng76 Linux - Software 1 07-12-2006 03:41 AM
How can I backup my entire system? TheDirtyPenguin Linux - Software 5 03-16-2004 09:48 AM
Can u backup entire LFS in such way ?? sapilas Linux From Scratch 1 05-02-2002 02:26 PM


All times are GMT -5. The time now is 06:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration