LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 10-06-2010, 02:44 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 37
Is there any tool similar to norton ghost?


Hi guys i m finding a tool that is similar to working of norton ghost and acronis true image.

My basic purpose of doing this is to take full system level backup of my linux machine.

Will it work smooth considering different file types and distributions like debian and linux?

Do i need to download different files for different distributions?
 
Old 10-06-2010, 02:54 AM   #2
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Rep: Reputation: 37
I use cloneZilla for the purpose. It works for all distributions as far as i know. there is No need to download separate files for different distributions.
 
1 members found this post helpful.
Old 10-06-2010, 04:14 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Another project that you could take a look Ghost4Linux. The name also has ghost like in norton ghost.
 
Old 10-06-2010, 04:11 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I use G4U but if the system is new enough I simply use dd. dd can copy the entire hard drive as an exact copy. redobackup is like clonezilla that tries to use file based backup if it can and then does dd if it can't read the subject drive.
 
Old 10-06-2010, 05:08 PM   #5
RandyTech
Member
 
Registered: Oct 2010
Posts: 62

Rep: Reputation: 3
As mentioned above by jefro, you can use the 'dd' command. The following applies to RH9 and Centos (and likely any other 'NIX release over the past 10 years, give or take).

Example:
dd if=/dev/sda of=/dev/sdb bs=1024k

...BUT, after trying it, I have become a big fan of the 'cat' command instead.

Example:
cat /dev/sda > /dev/sdb

Older (small) drives may require 'bs=256k' or 'bs=512k' in that dd command line so you might experiment if dd fails. In both cases you will end up with (for all practical purposes) an identical clone. One BIG problem with the 'dd' command is it requires the target drive be absolutely identical to the source drive. I mean "identical"!!! Believe it or not, some "same make / same model" drives can have different physical geometry. If there is any difference at all then 'dd' will most assuredly fail. On the other hand, the 'cat' command operates on a completely different level. From my experience, the only caveat is target drive must be of "equal capacity, or larger". If the target drive is larger then the resulting copy will have available headroom left over.

Use the 'fdisk -l' command to compare "total bytes" on each drive before you begin. If they are same make, same model and the total bytes are "exaclty" the same then you can use the 'dd'command. Otherwise, just disregard the make/model and compare only the total bytes. If they are equal or greater on your target drive then use the 'cat' command.

Regarding free space after "cat cloning" to your larger target drive. You can use that free space to add a partition. You can also use the following recipe to extend the "last" partition to include the remaining free space. In either case, I suggest you research the 'fdisk' command for details.

>>The long of it is explained in detail at the following web address but all you need to do
is follow the procedure outlined below.
( http://www.howtoforge.com/linux_resi..._partitions_p2 )

>>This entire procedure requires root login. Start by simply cloning the smaller drive onto the
larger drive using a simple "cat" command. You will need to boot the system with the new
drive connected as slave (i.e. hdb, hdd, sdb or whatever). The new drive will inheret the same
partition parameters and data by using the following command, but we reclaim the additional
space later. (Be sure to adjust the /dev/<names> accordingly when running this command ! ! )

cat /dev/sda > /dev/sdb

Pretty simple, huh?. When root system prompt returns, you will have a bootable clone. Next
I suppose you will want to take full advantage of the unpartitioned space on your new larger
hard drive. The following steps will accomplish exactly that, and at the same time "should"
also preserve any existing data. Specifically, you began with a drive that was already
partitioned -- each partition already formatted to a specific size. The only one we want to
change is the /u partition to gain full use of the entire drive. Fortunately for us, /u is the last
partition on the hard drive so that makes this task very simple too. We do not need to concern
ourselves with any leading partitions.

(THIS ASSUMES "sdb5" IS "/u" PARTITION ON 2ND DRIVE ! ! ! ADJUST AS NEEDED)
******(Get a preview of current partitons and drive specs: )
Linux: 1# df
Linux: 2# df -B 4k
Linux: 3# df -h
Linux: 4# fdisk -l
Linux: 5# fdisk -s /dev/sdb5

******(Verify filesystem is in tact so you don't begin with garbage drive: )
Linux: 6# fsck -n /dev/sdb5

******(Convert to ext2 partition: )
Linux: 7# tune2fs -O ^has_journal /dev/sdb5

******(Launch the partition utility: )
Linux: 8# fdisk /dev/sdb

(List fdisk menu options as reference: )
Command (m for help): m
******(Review your current format: )
Command (m for help): p

******(Remove sdb5 partition: )
Command (m for help): d
Partition number (1-5): 5

******(Verify sdb5 is gone: )
Command (m for help): p

******(Remove sdb4 partition: )
Command (m for help): d
Partition number (1-5): 4

******(Verify sdb4 is gone: )
Command (m for help): p

******(Recreate new larger extended partition: )
Command (m for help): n
Command action
e extended
p primary partition (1-4)
******(Select the e option)

******(Just press enter to take default: )
First cylinder (3826-30394, default 3826):

******(Just press enter to take default: )
Last cylinder or +size or +sizeM or +sizeK (3826-30394, default 30394):

******(Review your current format: )
Command (m for help): p

******(Recreate new larger Linux partition: )
Command (m for help): n

******(Just press enter to take default: )
First cylinder (3826-30394, default 3826):

******(Just press enter to take default: )
Last cylinder or +size or +sizeM or +sizeK (3826-30394, default 30394):

******(Review your current format: )
Command (m for help): p

******(Commit to above changes and exit fdisk utility: )
Command (m for help): w

******(Verify filesystem is in tact: )
Linux: 9# e2fsck -f /dev/sdb5

******(Resize filesystem table: )
Linux: 10# resize2fs /dev/sdb5

******(Verify filesystem is in tact: )
Linux: 11# fsck -n /dev/sdb5

******(Convert partiton journel back to ext3: )
Linux: 12# tune2fs -j /dev/sdb5

******(Verify filesystem is in tact: )
Linux: 13# fdisk -l

******(You're done so you can shutdown: )
Linux: 14# shutdown -h now

Last edited by RandyTech; 10-07-2010 at 05:44 AM.
 
1 members found this post helpful.
Old 10-06-2010, 10:02 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
You can also use dd to a ftp server. I forget where I copied this but it works.

"Requirements:

Bootable Linux CD (I like (edited out bad url, consider debian live instead) that has dhcpcd, coreutils, and ftp.

A FTP Server (with a valid username and password). Lots of free disk space.
Warning: This is relatively safe if used correctly. I accept no responsibility for damage to your system!

Step 1. Boot your system using the bootable CD.

Step 2. Verify your system is on the network. # ifconfig

Step 3. Connect to your FTP server and upload the image. # ftp 10.131.8.102 Connected to 10.131.8.102 (10.131.8.102). Name : install Password: XXXXXXXXXX 230 Login successful. Using binary mode to transfer files.


ftp> put |"dd if=/dev/hda bs=1M|gzip -1" diskimage.gz


Now you just wait for the image to finish processing. This could take some time depending on the speed of you CPU, disk, or netowork.
"
Step one could be current OS.
Gzip level could be from 1 to 9 also or no number if you want default compression. 9 being the most compression and 1 would be almost none.

Last edited by jefro; 10-06-2010 at 10:04 PM.
 
1 members found this post helpful.
Old 10-10-2010, 11:25 PM   #7
pinga123
Member
 
Registered: Sep 2009
Posts: 684

Original Poster
Blog Entries: 2

Rep: Reputation: 37
sorry for the late reply but i dont want to copy entire partition instead only usable data.

for example if 8 gb out of 80gb is usable space then i would only like to take backup of 8 gb and not 80 gb.

Will tool help doing this effectively?
what will be the size of backup data?
Will it compress the data?
 
Old 10-10-2010, 11:43 PM   #8
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
Hi,

Try rsync.

Refer this link.
 
Old 10-11-2010, 12:56 AM   #9
elperrillo
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Hi Pinga, nice name by the way...

I use clonezilla for everything, to me it is the best software ever invented, try it and you will see.
 
Old 10-11-2010, 09:17 PM   #10
marquisor
Member
 
Registered: Sep 2010
Location: Germany
Distribution: Debian
Posts: 53

Rep: Reputation: 3
clonezilla is awesome!

unfortunately i cannot use FTP for saving my image?! so i had to SSH it to another linux machine.
there's a manual setup, anyone?
 
Old 10-12-2010, 06:51 AM   #11
RandyTech
Member
 
Registered: Oct 2010
Posts: 62

Rep: Reputation: 3
The rsync commamd is very powerful. Can be used for backup to local 2nd drive or to remote server. It will probably render that fastest results over any cloning method (dd, cat, clonezilla, etc,etc,etc) even going to network backup server.

Examples:

This line will copy contents of /u onto path you mounted as /mnt:
/usr/bin/rsync -a /u/ /mnt

This line will copy contents of /u/hds to update the hds tree for the mounted drive:
/usr/bin/rsync -a /u/hds/ /mnt/u/hds

The shopt commands can be used to insure all hidden dot files are not overlooked:
shopt -s dotglob
/usr/bin/rsync -a /u/hds/ /mnt/u/hds
shopt -u dotglob

The nice command can be used to insure your copy process yeilds to live store operations:
nice -n 15 /usr/bin/rsync -a /u/ /mnt

>>Remote file update from host to backup server can be performed as follows:
(This command updates all of /u/data onto back server.)
rsync -azv -e ssh /u/data/ hds@10.255.255.252:/u/data

(This will insure any files deleted on the source are also deleted from the target):
rsync --delete -azv -e ssh /u/data/ 192.168.0.251:/u/data
 
Old 10-12-2010, 01:31 PM   #12
RandyTech
Member
 
Registered: Oct 2010
Posts: 62

Rep: Reputation: 3
Couple other notes on rsync. First, I really should have suggested you begin with 'man rsync' -- RTFM to learn what all the switches do. The -v means verbose so it posts every file to your screen as it copies, and consequently slows the copy process. Also, because rsync over the network uses ssh protocol, you can (do more research to learn how to) setup a passwordless ssh login account so you can let cron do scheduled rsync backups for you. Sorry I can't offer any details on that. Know its possible but never tried.
 
Old 10-12-2010, 02:25 PM   #13
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
I've test quite all of these solutions and they work for sure. But if you're using dd, before cloning, on all different partitions you'd better to "cat /dev/zero > $PATH_TO_MOUNTING_POINT/all_zero && rm PATH_TO_MOUNTING_POINT/all_zero". By doing this you'll be able to gzip the clone and then won a looooot of space... Then cloning and gziping with:
"dd if=/dev/sdX | gzip > $CLONE_FILE_GZ"
to install the image:
"gzip -dc $CLONE_FILE_GZ | dd of=/dev/sdY"
But this is useful only if you want to keep the clone file, or if you're short if space to keep it beetween transfer, but I think it takes a big amount of time to gzipping and unzipping a big file (i've never compare time it takes with and without gzip)

To all, one functionality provided by norton-ghost I'd like to found for the linux world is the possibility to create bootable dvds that re-install a clone image on a system, does anybody know a tool like that?
 
Old 10-13-2010, 10:45 PM   #14
RandyTech
Member
 
Registered: Oct 2010
Posts: 62

Rep: Reputation: 3
Quote:
Originally Posted by jf.argentino View Post
To all, one functionality provided by norton-ghost I'd like to found for the linux world is the possibility to create bootable dvds that re-install a clone image on a system, does anybody know a tool like that?
I haven't tried it, but I expect you could cat your drive to a file, put the file onto the bootable DVD, boot off the DVD and then cat the file back onto a replacement hard drive (of equal or larger size). Probably some way to pipe the file into tar format as you proposed above. I fully expect it would work if you can work out the syntax.
 
Old 10-14-2010, 01:54 AM   #15
pinga123
Member
 
Registered: Sep 2009
Posts: 684

Original Poster
Blog Entries: 2

Rep: Reputation: 37
Tried Clonezilla Live.Thankfully it served the purpose.

apart from Creating image and restoring it it has many other features which i would like to mention here.

1)Only usable data image.(This has solved my disk space issue).
2)Options to store the image file over samba,nfs servers...
3)Easy restoration.


+1 for clonezilla you guys rock.
 
  


Reply



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
norton ghost 4 ubuntu johnh10000 Linux - Software 3 10-06-2009 05:32 PM
Linux program similar to Norton Ghost? ddc441 Linux - Software 1 06-21-2009 03:11 PM
Free Backup tool (Like Norton Ghost) Garibaldi3489 Linux - General 4 01-24-2005 07:30 PM
Linux and Norton Ghost jet192 Linux - General 1 08-17-2003 11:26 AM
Redhat 7 and Norton Ghost VKH Linux - General 1 08-17-2001 11:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:49 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
Open Source Consulting | Domain Registration