Can I create an image of my hdd and store on another computer as a backup?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can I create an image of my hdd and store on another computer as a backup?
I Acer aspire 3620 and would like to backup whole system.
My laptop has a 40Gig hdd. Is there a way I can either create an image or copy(clone) to another computer just in case I need it. If it matters I have a spare 40 gig drive on the other computer.
The reason for doing this is so that I can try a system restore and if anything goes wrong I want to be able to transfer back.
Also if it is posible how could I put it back and be bootable.
Any help would be appreciated.
The computer that I want to store it on would be the AMD
Click here to see the post LQ members have rated as the most helpful post in this thread.
Clonezilla and partimage are good suggestions, but I am not sure if they can backup the whole drive or just the single partitions, May you should have a look at the dd-command. It is able to backup the whole disk, so that you are ready to boot if you recover your drive from the image.
I use partimage for that kind of backup. My preference is to back up to another host on the network, or to a spare drive in the same host. partimage allows you to break the image into CD or DVD sized chunks, which can then be burned for archival. The compression of a partition usually saves about 50% of the storage requirements compared to a raw dd image (depending on data types and disk usage patterns). I find it better to do partition oriented backups, as it provides more flexibility for restoring. Most often, I will want to backup prior to OS upgrades, and I can then restore only the '/home' partition (which I always keep as a separate partition for this reason). This allows me to retain data without interfering with system files following an upgrade. Before doing a backup, I make copies of certain key system files (the full '/etc' tree, in particular) into the '/home' directory. A lot of configuration data can be recovered easily from that backup. In order to backup the system partitions, partimage needs to be run from a live CD or other OS, as it will not back up mounted partitions.
Having said this, for the most recent backup & restore that I did, I simply used a compressed tar archive to a network share, and the restore to the newly installed OS went perfectly, and was a bit less hassle.
A dd image of a small partition, especially the '/boot' partition makes sense to me. At the same time, an image of the master boot record can't be a bad idea. dd works well for that, too.
I just want to say that theNbomr's post was extremely helpful. I'd like to add something too:
Clonezilla, which uses a combination of partimage and dd i believe, also makes far smaller images -- because it ignores anything that is empty. So you can image a 500G drive, and only end up with, for example, a 40G image.
Where as dd will make a 500G file out of a 500G drive no matter the space that is used.
I would definately use CloneZilla, I use it for my personal computer once a month.
Clonezilla can certainly do whole drives, but you need to be careful when using it to ensure it has actually done the job! Don't rely on any "successfly completed" messages. Navigate to the target partition/disk and look inside the 'zilla directory the program created. Can you see your image, or portions adding up to it, in there?
I have known it happen with some versions that actually nothing but an empty shell directory gets written, which is pretty damned alarming. On the plus side, if 'zilla has actually written your backup image, I have never had a problem with its integrity.
The other thing I hate about 'zilla is if you press the wrong choice and need to go back, the dang thing will ignore you and keep pressing on regardless. They really need to fix that!
I have a designated drive on the AMD machine for this operation also I have a usb inclosure that I can put the drive that I want to copy in. About how long does it take to do an operation like this?
I have a designated drive on the AMD machine for this operation also I have a usb inclosure that I can put the drive that I want to copy in. About how long does it take to do an operation like this?
How long is a piece of string?
Clonezilla is "pretty fast" depending on the settings you opt for and the compression etc. When I image my regular laptop (50Gb partition with around 15Gb used) it takes around 15 minutes, and my laptop is slower than your AMD.
I haven't done anything as of yet but I do have a few more related questions.
1. If I just want to save an image of my hdd, does it have to have it's own partition or can I somehow save it to file in user space?.
2. Most of the clonezilla documentation shows that clonezilla, either needs to be live-cd or have it's own partition.
What are my options of installing clonezilla to drive as I'm not trying to clone the AMD, but to use it as the tool.
Just to be more clear I really want to save an image for backup as opposed to using the spare 40Gig drive.
I'm just storing in the case something goes wrong.
An image created with dd can be written to another block device (a drive or a partititon) or to a disk file. An image backup created with dedicated backup software will normally write to a disk file or file(s). These will then require a companion restore tool to turn the backup file(s) back into a useful partition or filesystem. In all but the case of dd writing to another device, you can send the backup data file(s) to another host filesystem using a network share.
THe clonezilla documentation is probably referring to the hazard of trying to backup a mounted partition, especially an image-style backup. If you are making an image oriented backup, just don't do it if the source device is mounted. A file-oriented backup is probably safe to make while the source device is mounted, although some of the files may be out of sync with each other. For most things, this is not important.
I have a usb enclosure to put the source drive into, so it won't be mounted.
I have clonzilla-live-cd, but was wondering if I could install clozilla to Debian os as it is the host machine. Or would it be simpler to use live-cd?
I want to clarify a couple things. DD does not have to create equal sized image files. If you make your image with dd almost any live-linux cd will be able to restore your images. You may be able to restore your dd images with a windows box if it has cygwin or putty installed on it.
It takes my hp dv9000 /w amd 64x2 about 2 hours to create an image of my 160g drive running from a live cd and writing to an external usb drive. I use the 'System Rescue' cd.
Arggghhh - that last sentence !!!.
Up till then, I was o.k with everything you'd said. Can't agree with that. A (system) restore image has to have point-in-time consistency.
That is why I like the snapshot products - been available in my usual world for many years. In Linux (only) environments, LVM and now btrfs offer this - take a snap, then back that up. Doesn't matter how long it takes.
Last edited by syg00; 12-08-2010 at 06:45 PM.
Reason: Added quote for clarity
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.