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.
I am running Mint 17.2 and wish to clone my harddrive. I am trying to follow a paper entitled "Clone a Hard Drive Using an Ubuntu Live CD" which is actually instructions for using dd.
My problem is that when I run the command "sudo fdisk -1" I get an error message that "-1" is invalid. The command is supposed to display all connected harddrives and is vital for correct identification of source and destination drives.
How do I proceed? The goal is to clone my 500GB HDD so I have a bootable backup.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
If you reverse the intended source and target, which is kind of like accidentally shooting yourself in the head instead of your intended target, you'll run into trouble with "dd". But if you think you could avoid that, dd is a good tool for cloning.
Keep in mind your clone will only contain whatever was on the disk as of the moment you cloned it. Cloning takes some time, and really isn't suitable for day-to-day backup, unless you can afford to shut down your system and boot a live distro daily/hourly
I do dd disk clones often, usually as:
1. An archive snapshot of a system at some time (like quarterly/yearly)
2. When replacing the hard drive in a system
3. When I'd like to have instant access to a system contents (as of clone date) from the image (system may be not on the network).
As Jefro said, any backup plan is better than none. For myself, I do cron jobs that rsync over my network to backup servers for regular backups.
It's faster than dd for supported file systems(all linux file systems are supported) and more flexible - you can clone to a smaller disk if the data on the larger disk is small enough to fit on the smaller disk. For example, if you had a 1TB disk with only 100GB of data on it, to clone with dd you would need a target disk 1TB or larger to do the clone. With Clonezilla, you could clone to a target disk of 100GB or larger.
Once you have a cloned copy of your hard drive, I'd just use rsync to keep the cloned drive in sync. It would be a lot faster than periodically rerunning your clone with Clonezilla or dd.
Last edited by kilgoretrout; 07-01-2017 at 10:46 AM.
It's faster than dd for supported file systems(all linux file systems are supported) and more flexible - you can clone to a smaller disk if the data on the larger disk is small enough to fit on the smaller disk. For example, if you had a 1TB disk with only 100GB of data on it, to clone with dd you would need a target disk 1TB or larger to do the clone. With Clonezilla, you could clone to a target disk of 100GB or larger.
Once you have a cloned copy of your hard drive, I'd just use rsync to keep the cloned drive in sync. It would be a lot faster than periodically rerunning your clone with Clonezilla or dd.
Thanks to all for fast responses!!
I understood that the instructions were somewhat in doubt since the first line had a "1" (number) and the next line had an "l" (ell) but neither worked. When I went back and re-tried with the "ell" I got a readout of the drives. But dd refuses to execute the clone command. No error message, it just doesn't respond.
Same kind of problem with password. In the Terminal, when I execute a command I am sometimes asked again for the password (as I am already logged in on reboot) and sometimes not. Sometimes I enter the password and press "enter" and it is ignored. Other times it isn't. What's going on with this?
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
Dd doesn't have a clone command. Did you see the link I posted above. And, you can run dd on a live system. You don't have to boot with a live CD. Drives can be mounted or not. It doesn't matter with dd. But with the size of today's drives, dd can be slow.
Dd doesn't have a clone command. Did you see the link I posted above. And, you can run dd on a live system. You don't have to boot with a live CD. Drives can be mounted or not. It doesn't matter with dd. But with the size of today's drives, dd can be slow.
I have made several attempts to run CloneZilla without success; IO am using an article from the CloneZilla website as my guide but it leads to nothingness.
Can someone give the simple steps for cloning the internal HDD to an external HDD on my Mint 17.2 machine? I tried Clonezilla in Beginner mode and it did not understand that the destination drive was external--it expected both drives to be internal which is not possible ( I think) on this machine. So I tried the "Expert" mode but not I cannot get into the CMD mode because it apparently needs some password or something to authenticate "user@zesty:~$" about which I know nothing.
Likewise the Expert mode seems to want to clone partition by partition instead of disk by disk.
This whole process is dirt simple in Windows using the Apricorn Easy Gig IV CD and hardware. But Easy Gig doesn't seem to like Linux.
I have made several attempts to run CloneZilla without success; IO am using an article from the CloneZilla website as my guide but it leads to nothingness.
Could you provide a link to that article?
I have just booted to a clonezilla USB with a 2TB USB disk attached (at boot), Clonezilla saw both my 1TB internal drive and my 2TB external drive and offered them up as source and/or target options. What size is your source drive and what size is your target drive? The target drive has to be as big or bigger than the source drive. If the external drive is not being seen, then that needs to be solved. Also the clonezilla I'm using is "clonezilla-live-20161004-yakkety-amd64".
I use clonezilla at least 2 to 3 times each week. However I always image and/or restore a partition, I've never cloned a drive to another drive.
I have just booted to a clonezilla USB with a 2TB USB disk attached (at boot), Clonezilla saw both my 1TB internal drive and my 2TB external drive and offered them up as source and/or target options. What size is your source drive and what size is your target drive? The target drive has to be as big or bigger than the source drive. If the external drive is not being seen, then that needs to be solved. Also the clonezilla I'm using is "clonezilla-live-20161004-yakkety-amd64".
I use clonezilla at least 2 to 3 times each week. However I always image and/or restore a partition, I've never cloned a drive to another drive.
The article came from "clonezilla.org/show-live-doc-content.php?topic=clonezilla-liv" and at this point the URL ran off the printout so I do not have all of it.
Attached is a screenshot showing that Clonezilla found both drives and also the final error message with no further explanation of what goes wrong.
The source and destination drives are both 500GB.
I have also used images as backups but why not just clone onto a new drive? They are inexpensive and this avoids the problem of an invalid image (of which I have encountered many)--I test the cloned drive immediately to be sure it is good, then store it until the next clone session, perhaps two months later.
Last edited by yankeenewbie; 07-02-2017 at 06:34 PM.
I don't like clonezilla, it makes it difficult to do some of the things I require with a disk image. Because storage space is pretty cheap, I want my images to be easily mountable. I store images on external hard drives, and if I need something retrieved from any image all I have to do is use the mount command on the image. Plus, dd full disk images are mountable in windows, I use VirtualCloneDrive to mount image files into the windows filesystem.
As far as I know, you have to do an extra step involving extra storate to turn a clonezilla image into a raw image .iso before you can use mount. This is an extra step in the process to extract something from an image.
I'll stick with dd, it's simple and fast. As long as you do a couple double-checks on what you've picked for input and output, and if you don't mind the size of the resulting image being uncompressed, dd works great.
The article came from "clonezilla.org/show-live-doc-content.php?topic=clonezilla-liv" and at this point the URL ran off the printout so I do not have all of it.
Attached is a screenshot showing that Clonezilla found both drives and also the final error message with no further explanation of what goes wrong.
The source and destination drives are both 500GB.
I have also used images as backups but why not just clone onto a new drive? They are inexpensive and this avoids the problem of an invalid image (of which I have encountered many)--I test the cloned drive immediately to be sure it is good, then store it until the next clone session, perhaps two months later.
That image doesn't look like a clonezilla window. This part really doesn't look like a clonezilla window:
"sudo dd if=/dev/sda of=/dev/sdb"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.