Backing up system configurations and installed ports?

Hello

My HDD is failing and I still have access to it using FreeBSD 8.2

What I want to do is back up my system configurations as well as all the installed ports and data then just get a new HDD and setup a new installation on the new HDD with the option of restoring the whole settings and the ports I already have managed on the current failing drive.

Is this possible? the drive is working ok with some bad sectors, but when I try to install chromium 13 from ports it builds okay then when it starts installation the HDD starts to make these ticking noises and it reboots automatically, then I need to reboot using single user mode and run fsck command :\

Thanks in advance,
Draco
 
Copy /etc, /usr/local/etc, /var/db/pkg, and /var/db/ports to an external drive. net/rsync is useful, but cp -a is better than nothing.

% pkg_info > pkgs.txt
and save that file too. There are lots of things in /usr that might be important, like home directories. Maybe other stuff in /var.

Trying to save these things while the drive is failing is far more stressful than just having a recent backup of the whole drive.
 
If you are not in a whole lot of hurry, and have a few hours, you could mount the new disk somewhere, and search the forums for the rsync command line I've used that has the "bwlimit" parameter (search the forums for it)...
Code:
 #old drive / # rsync... --bwlimit=5000 /mnt
(repeating it for each filesystem in fstab, or .../pydf/ .../cdf/ ). One of the gotchas then would be making sure the resulting fstab can boot with the new drive configuration (a drop-in replacment test would probably work okay.) I'd also run smartmontools on the new drive just in case.
 
draco003 said:

Think about this for a second. The drive is failing, locking up when you try and install one port. (Most likely an error, then repeated retries by the drive and operating system.)

It's likely to have the same problem when you try to install any port. Get the important files off that drive immediately, avoid writing to it at all. Mount read-only if you can. Every second that thing is spinning there's a chance that another flake of oxide will peel off and slam into the heads.

In other words, backing up the data using tools already available should be the first priority.

Incidentally, I'm interested in what brand and model of drive it is.
 
Thanks very much for your help wblock@ and jb_fvm2 :)

regarding HDD: it's a Toshiba Satellite L300 Laptop HDD

I managed to make backups of my system and will make a clean install soon and restore my ports and packages

Thanks again.

Draco
 
Back
Top