Karl E. Jorgensen wrote: > Rule #1: Make backups. At least at file-level. If possible also at > disk-block level. > Rule #2: Verify the backups > Rule #3: Always obey rule 1 and 2. I figured copying everything to the second HD, and then verifying the copy, would be sufficient. > > 3. Copy all files from root partition to second HD. > > Beware of symbolic links... Ah, good point. cp would actually change all symlinks (and hard links) into separate copies, wouldn't it. So perhaps archiving to tar files would be better. tar understands both symlinks and hard links, right? > You may want to look into ext2resize, it claims to be able to resize a > filesystem (but you still have to resize the underlying partition > afterwards). If you reduce an X MB filesystem to Y MB (X > Y obviously), and the existing files aren't all in the first Y MB, will it move them? > Another way to do this could be to > - make a backup of /etc and /var > - save the output from "dpkg --get-selections" > - do a complete reinstall on the new root partition > - restore /etc (I'm not sure about /var...) > - make sure you install the same packages as you had before: > dpkg --set-selections < yourfile && apt-get dselect-upgrade That sounds like a lot more work. Copying files from one HD to another, and back again, seems simpler, as long as symlinks and hard links are respected. Will "find / -type l" and "find / -links +1" show me all the symlinks and all the files with hard links (other than the original directory entry), so that I could verify afterwards that everything was restored correctly, or fix by hand those that weren't? Thanks, Craig
Attachment:
pgpZ7gYEZjc3p.pgp
Description: PGP signature