[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible to copy and resize at the same time?
From: |
sandy pond |
Subject: |
Re: Possible to copy and resize at the same time? |
Date: |
25 Mar 2001 11:16:57 -0800 |
Hi David,
You already have a problem if you use more than 9GB
on the 10GB disk. I would partition the 10GB disk into
a system software partition that doesn't need to be backed
up nightly (backup this partition image once on a spare
disk an store away). Then on the partition that is 9GB
or less do;
parted /dev/hdb cp /dev/hda FROM-NUM TO-NUM
nightly where FROM-NUM is the partition number to
copy and TO-NUM is the partition made ealier to hold
image.
Also see below for more comments;
Keith
>
> Hey Keith,
>
> Hmmm.. ok. What I'm trying to do is "dd" a 10GB
> disk to a 9gb disk mightly as a form of a warm
> spare (has benefits over RAID1).
>
> So I guess I'm stuck with a nightly:
>
> fdisk (make the resized partitions on the
> smaller disk)
Don't need to do above every night (actually shouldn't?)
> mke2fs (those new partitions)
> tar (copy over the files.. SLOW...)
This might be faster;
(cd DIR; find . -depth -mount -print | cpio -pdlmu DEST)
where DIR is the top of the partition you want to backup
and DEST is the newly formated and mounted filesystem
for the backup.
> mkswap (create swap)
Why mkswap? Purpose?
> dd boot (make the new disk bootable)
Probably won't work. Purpose?
>
> Any other ideas?
>
> --David
>
>
> >Only works for FAT filesystems though (I assumed FAT
> >because you mentioned Norton Ghost). See Andrew
> >Clausen's post concerning ext2. This is documented.
> >
> >I use parted to backup partitions all the time (even on
> >computers without Linux installed by using the boot
> >disk). Saves a lot of trouble if someone hoses a
> >partition. You can even backup the partition on the
> >same disk and then hide the partition from users.
> >
> >Keith
> >
> >> Hello Keith,
> >>
> >> Wow.. this is NOT conveyed in the docs! You should
> >> really get that updated.
> >>
> >> Anyway, is there a way to do this from a command
> >> line (not interactive)? What I need to do
> >> is do this command once a night as a offline
> >> backup from a 10GB disks to a 9GB disk.
> >>
> >> --David
> >>
> >>
> >>
> >> >This is exactly how it works!
> >> >
> >> >see http://www.gnu.org/software/parted/USER
> >> >
> >> >make new partition (big enough to hold the files on original);
> >> >
> >> >(parted) select DEVICE
> >> >(parted) print
> >> >(parted) mkpart PART-TYPE [FS-TYPE] START END
> >> >
> >> >copy original partition to new partition.
> >> >
> >> >(parted) cp [FROM-DEVICE] FROM-MINOR TO-MINOR
> >> >
> >> >copies and resizes at once.
> >> >
> >> >Keith
Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com