On Wed, 2017-08-23 at 02:07 +0000, Iznogoud wrote:
> > 
> > Alternatively make an exact duplicate of your old HDD/SSD via:
> > 	# dd if=/dev/sda of=/dev/sdb bs=100M conv=notrunc
> > where /dev/sda is your original existing HDD/SSD
> > and /dev/sdb is your new blank HDD/SSD
> Some points to make here.
> 
> "dd" using this method is an excellent way of making backups if you
> do not
> want to deal with bootloaders and if everything is in one partition,
> in this
The dd command will make an exact copy of the input disk onto the
output disk regardless of the number of partitions, it copies boot
loaders and hidden partitions. it makes a bit-exact copy of the input
hard disk, which is why I use it when I perform an upgrade, replace the
gronked disk with the backup disk, boot and go. 
About the only caveat is that the output disk needs to be *no smaller*
than the input disk.
> example it would be the /dev/sda _drive_. This is how I make backups of Windows
> machines or anything I do not feel like getting my hands really dirty with.
> (Windows maintainers look no further.)
> 
> With a Linux, even a running system, you can make a tarball of the relevant
> directories, skipping /proc /sys /srv and /tmp, and simply dropping the
> contents of the tarball on any partition one wants. The final trick would be
> to get GRUB or LILO dropped in the boot loader. But the tarball is very small
> compared to an image drawn with dd. I do this. I install tarballs by PXE-booting
> and dropping GRUB from the "thinly-booted client."
> 
> Another real issue is fragmentation... With a good filesystem, say XFS, which
> can go through a swift defragmentation and re-arrangement or sizing of the file
> system, you can pull the first, say, 100MBs of the partition. Not in general.
> 
> You can also mount an extrnal or internal filesystem, or even a remotely
> mounted one over a fast network, and either do the tarball trick or use dd
> like so: 'dd if=/dev/sda1 of=/mnt/remote_mount_file' I always prefer a tarball.
> 
> Expert users can pull files (say the /etc/ crucial parts from the old install)
> by mounting the image (drawn with dd) over a loop-back block device or a
> straight file-mount at a mount-point, and dig in there. (I do not expect this
> kind of action from anyone but a Slackware nerd.)
> 
> 
> Bonus. I sometimes put image-files together and encrypt them.
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> 
tclug-list at mn-linux.org> 
http://mailman.mn-linux.org/mailman/listinfo/tclug-list


Usinig the tar command also enables you to split and merge parts of
filesystems - things us old-fart sysadmins needed to do when production
SCSI HDDs were 9GB or less each - each partition could reside on a
separate HDD - i.e. /, /var, /home, etc... could each reside on their
own HDD as space or inode tables filled up.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20170824/07c89889/attachment.html>