Linux Newbie help
 help / color / mirror / Atom feed
* copying file systems ...
@ 2003-01-29 17:35 Jamie Risk
  2003-01-30 13:58 ` whitnl73
  0 siblings, 1 reply; 3+ messages in thread
From: Jamie Risk @ 2003-01-29 17:35 UTC (permalink / raw)
  To: linux-newbie

How do I copy an entire file system, symlinks and all, to a temporarily
mounted partition? (what are the pertinent 'cp' switches?)

I've got an extra harddrive (&PC) and I want to mirror my original system
with as little work as possible.

I put the third harddrive in my system, and mounted it at "/mnt/new". Thus,
the mounts are:

/dev/hda2   /         ext2
/dev/hda1   /boot     ext2
/dev/hda3   /usr      ext3
/dev/hda4   /home     ext3
/dev/hdb1   /usr/doc  ext2
/dev/hdb2   /usr/src  ext2
/dev/hdc1   /mnt/new  ext2

Can I simply use the following command?

[bash-2.05]# cp -r / /mnt/new

- Jamie
p.s. (I'd then test the output using 'chroot')





-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* copying file systems ...
@ 2003-01-30  0:10 BEN RITCHEY
  0 siblings, 0 replies; 3+ messages in thread
From: BEN RITCHEY @ 2003-01-30  0:10 UTC (permalink / raw)
  To: linux-newbie

Originally to: JAMIE RISK

* An ongoing debate between Jamie Risk and All rages on ...

 JR: > How do I copy an entire file system, symlinks and all, to a
 JR: > temporarily mounted partition? (what are the pertinent 'cp' switches?)
 JR: > I've got an extra harddrive (&PC) and I want to mirror my original
 JR: > system with as little work as possible.

I use cp for backups as "cp -av /dir1/ /mnt/backup", etc. Just skip /proc <g>

--
Keep the faith,

 : Ben        http://bellsouthpwp.net/c/m/cmech617/
 :         ICQ #32457590  AIM/Yahoo:benritchey  Jabber:cMech
 :
 + WildCat! Board 24/7  (337) 232-4155  33.6kBps 8,N,1  Free Software!

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: copying file systems ...
  2003-01-29 17:35 copying file systems Jamie Risk
@ 2003-01-30 13:58 ` whitnl73
  0 siblings, 0 replies; 3+ messages in thread
From: whitnl73 @ 2003-01-30 13:58 UTC (permalink / raw)
  To: jamie_risk; +Cc: linux-newbie

[-- Attachment #1: Type: TEXT/PLAIN, Size: 954 bytes --]

On Wed, 29 Jan 2003, Jamie Risk wrote:

> How do I copy an entire file system, symlinks and all, to a temporarily
> mounted partition? (what are the pertinent 'cp' switches?)
>
> I've got an extra harddrive (&PC) and I want to mirror my original system
> with as little work as possible.
>
> I put the third harddrive in my system, and mounted it at "/mnt/new". Thus,
> the mounts are:
>
> /dev/hda2   /         ext2
> /dev/hda1   /boot     ext2
> /dev/hda3   /usr      ext3
> /dev/hda4   /home     ext3
> /dev/hdb1   /usr/doc  ext2
> /dev/hdb2   /usr/src  ext2
> /dev/hdc1   /mnt/new  ext2
>
> Can I simply use the following command?
>
> [bash-2.05]# cp -r / /mnt/new
>
> - Jamie
> p.s. (I'd then test the output using 'chroot')
>
I use this little thing I call tartar.  Note that it will copy all of a
partition if you ask it, but won't copy all of a multi-partition VFS.

mkdir /mnt/new/boot
tartar /boot /mnt/new/boot

and so on.

Lawson

---oops---

[-- Attachment #2: Type: TEXT/PLAIN, Size: 87 bytes --]

#!/bin/bash
##copy a directory or partition
tar -C "$1" -cOl . | tar -C "$2" -xpf -

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-30 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-29 17:35 copying file systems Jamie Risk
2003-01-30 13:58 ` whitnl73
  -- strict thread matches above, loose matches on Subject: below --
2003-01-30  0:10 BEN RITCHEY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox