[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HD copying in FreeBSD
- To: Maxim Kryachko <MKryachko(at-nospam)vcix.com>, linux-il(at-nospam)linux.org.il
- Subject: Re: HD copying in FreeBSD
- From: Omer Musaev <omerm(at-nospam)mercury.co.il>
- Date: Thu, 09 Nov 2000 12:08:29 +0200
- Delivered-To: linux.org.il-linux-il@linux.org.il
- Organization: Mercury Interactive
- References: <916F6AA112DAD311B4AB00508B8BED2C701AF7@XCHANGE>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
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 linux-il-request@linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request@linux.org.il
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il