Maxim Kryachko wrote:
> Hi people.
> My problem is not directly related to Linux, but to BSD instead.
> I need to copy all the contents of a hard-drive which contains root
> partition onto another one as is, preserving all the file structure and
> links. I need to do it ASAP, so I'm terrible sorry, but I have no time to
> look for documentation (only man on machine itself will be available), and I
> don't have any experience with FreeBSD. I need just a command line which
> does it and if there are possible problems.
> Any help will be greately appreciated.
Those examples use bourne shell:
Assuming you have gnu tar:
> mount /dev/whatever_you_call_it_under_bsd /target_partition
> (cd / && tar --exclude target_partition cf - . ) | (cd /target_partition &&
tar xf - )
Assuming you have bsd dump/restore and made new partitons on new hard drive
> echo \
/dev/old_partition_1 /dev/new_partition_1\
/dev/old_partition_2 /dev/new_partition_2 \
.... (etc).... \ | while read oldp newp ; do
dump $oldp -f - | ( newfs $newp && mount $newp /tmp/newp && cd
/tmp/newp && restore rf -)
done
Some flags may be nessesarry on BSD.
tar method is prefferred, IMHO.
> Thnx
> Max.
>
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]