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.
dd works on the raw device (or with a single file, which is an image of a divice), it will not really take care about filesystem, files and dirs on that device, tar can only work with files.
What kind of advice do you need?
dd creates partition or drive image (including bootloader, MBR, partition table, MFT, filesystems).
tar creates an archive that consists of files that belongs to filesystem, only files, without partition/drive/filesystem information, bootloader images at MBR.
Using dd you can restore system easily, but your partition layout should be the same as it was at dd image creation time. You shouldn't repartition your drive before restoring system from dd image.
With tar archive you can restore system to any partition that has enough space to fit unpacked filesystem.
However, you have to restore bootloader (if you changed partitions layout or if you restore a system to other drive).
In general using tar is faster than using dd because tar worsk at filesystem level.
In general tar works faster because it doesn't copy unused blocks or metadata blocks. It only copies data, with file identification (name+permissions+attributes). This makes the archive MUCH smaller than is possible with dd.
The fastest way to "recover" a system is to use PXE with a customized initrd.
The initrd can then create the partitions and filesystems needed, use an NFS mount to access the tar files, and restore the filesystems, reinstall the boot.... and if necessary, reboot/halt the system.
That way all you have to do is issue the pxe boot request.
dd of an entire disk (such as /dev/sda) will copy everything -boot block (if any), partition table, filesystems... everything.
When copied to another disk (same size or larger) everything is copied back exactly the same.
dd of a partition (such as /dev/sda1) will copy everything in /dev/sda1. It will NOT copy the boot block (if any) it will NOT copy the partition table. It WILL copy just the filesystem in /dev/sda1.
This means that before that copy can be restored, the target disk must be partitioned (the same size or larger than the original partition), then the backup can be copied to that partition. If the partition is LARGER than the original, the filesystem must be retuned to set the new larger size (see the manpage/google on growfs, and you may have add that utility to use it) or the filesystem will just not use the larger size.