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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm a newbie in Linux.
The background of the system I have is listed below.
CentoOS 7 with 4 processors and 8GB of RAM.
This is my test server to test out the "dd" command so that I can make an image of another physical Red Hat Linux machine.
The test server CentOS 7 has two partitions on it /dev/sda1 and /dev/sda2. Boot; /dev/sda1 and Linux LVM:/dev/sda2.
My question is how do I back up both partitions using the dd command to a USB drive or NAS/SAN server as a single .img file?
Just make sure your backup system has enough space available to hold the entire capacity of /dev/sda. Not just the used space, the entire space. You should also shut down the system while this is running. You can do the backup in a live session to make sure none of the files change during the copy, rendering the backup inconsistent.
Last edited by suicidaleggroll; 10-16-2014 at 11:27 AM.
dd will copy the entire drive including both partitions and all unused space, as well, to one file.
On the other hand, you can copy the first partition to one file, and copy the second partition to another file. So you would have 2 files instead of one.
Alternatively, you can run the gparted program in a live DVD or USB and use it almost like a file manager to Copy and Paste the partitions elsewhere. That is MUCH faster than dd.
It's better to back up the individual partitions IMO. As you can mount those backups and rsync the files as the restore option, or grab individual files as needed. Pros and cons and lots of options in terms of backups. A dd of the full drive might be less useful if the replacement drive is not that same size, or if you want to try "other" filesystems for a while.
Ok that is my second option but how do I convert all of the files that Clonezilla uses to an .img file?
Clonezilla handles all this for you, from copying a partition(s) and selecting the img file(s) you want to restore.
Watch some videos on youtube on clonezilla as it would be explained more clearly. In fact, watch several videos if you can, because some videos are not complete or clear. Make sure the video explains backing up and restoring the clone images.
PS: if clonezilla is still not clear to you, then use the dd methods above.
Last edited by OpensourceRulzs; 10-16-2014 at 03:04 PM.