On Sun, Aug 14, 2011 at 11:28 PM, Scott Ferguson <prettyfly.producti...@gmail.com> wrote:
> 4. use rsync to copy the files. eg.:- > # rsync -azr /media/source0/ /media/dest0 [rinse and repeat until all > partitions copied] Rsync does not replicate SELinux settings. And the way you are using it does not replicate hard links: you need the "-H" setting for hardlinks, and you need to use the "-x" setting to avoid descending to other partitions. And if you have to start over, consider using the "--delete" commands to flush partially completed files that are partially copied as ".filename.foo" files. And there's the "--acis" command as well, for replicating ACL settings. Really, it's worth reviewing ing the manual page for the "rsync" command before just blindly using this kind of "just run these commands" procedure. It's not that the basic procedure is bad, but little details will trip you up if you work with rsync rather than replicating the disk image with 'dd'. Mind you, I'm a *big* believer in replicating the contents of file systems efficiently, rather than simply replicating disk images: it's tremendously faster, especially if you old disk had swap partitions, funky partition layouts, or was only sparsely occupied, it can be used again after partial replication, and it's vastly superior for backing up live file systems than disk based operations like 'dd' and 'dump'. > 5. fix fstab and grub.cfg on the new drive eg.:- > # blkid >> /media/dest0/boot/grub/grub.cfg > # blkid >> /media/dest0/etc/fstab > Then use nano or whatever to edit the UUIDs in grub.cfg and fstab. The UUIDs > of the partitions of the new drive will be at the bottom of those files - > just copy and paste, remove the UUIDS at the bottom of the drives and save > the files. And it's tremendously useful for doing system backups and restoring from system backups. The whold "rsnapshot" backup tool is based on this sort of thing, using rsnapshot to efficiently take backups and preserve hardlinks among temporally separated snapshots. > 6. mark the new drive bootable eg.:- > # umount /media/dest* > # umount /media/source* > # fdisk /dev/destination_drive fdisk is *not* your friend here. parted is one heck of a lot more powerful for resizing and rebuilding file systems, and it's scriptabile operations are vastly superior to the weird interactions with fdisk's interface. fdisk is a powerful and venerable old tool, but it's so old that it has severe issues with modern, larger disks and file systems. In general, your procedure is good. It's these out of date details that are going to bite people if used without awareness of the limitations. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOCN9rz0AydukgY9p91ua=kkjr81lkbkdxfnux_qwoe7cqt...@mail.gmail.com