[ale] Best command to copy a mounted filesystem?
Joe
jknapka at earthlink.net
Sun Apr 13 10:08:40 EDT 2003
Joe <jknapka at earthlink.net> writes:
> David Corbin <dcorbin at machturtle.com> writes:
>
> > I want an image because I'm putting it on an identical disk....
>
> "cp -a /mntpoint1/* /mntpoint2/*" seems to work OK. I've used it
> to copy a filesystem when installing a new disk drive.
> Alternatively, you can do the tar-and-untar-on-the-fly trick:
>
> cd /mntpoint 1 ; tar -P -c * | tar -C /mntpoint2 -P -xvf -
Bleh. Make that:
cd /src ; tar -P -c * | tar -C /dest -P -xvf -
> This creates a tarfile to standard output and then immediately
> untars it into the dest dir. You may want some additional
> options in order to fully preserve all file attributes;
> -P does permissions, but you might want other options too.
> man tar.
>
> Cheers,
>
> -- Joe
>
> > Robert L. Harris wrote:
> >
> > >You want an image of the filesystem/partition or the contents such with
> > >permissions, etc? If you go with the image you may be sorry, what if
> > >you can't get an identicle replacement disk? You'll loose out.
> > >
> > >Use tar or cpio. If you don't want a tarball but want to copy /usr to
> > >/mnt/backups/usr then my prefered method is:
> > >
> > >"find /usr -mount -print | cpio -pdmu /mnt/backups/usr"
> > >
> > >
> > >Robert
> > >
> > >
> > >Thus spake David Corbin (dcorbin at machturtle.com):
> > >
> > >
> > >> I want to copy (as in "mirror") a mounted file system for the
> > >> purposes of backup. I can think of a handful of approaches (my
> > >> first, dd, doesn't seem to work). What's the best way to do this.
> > >> Note: I'm not talking about make a .tar file or anything of the
> > >> sort. I want to duplicate the filesystem. True mirroring is not
> > >> an an acceptable solution.
> > >>
> > >>
> > >>_______________________________________________
> > >>Ale mailing list
> > >>Ale at ale.org
> > >>http://www.ale.org/mailman/listinfo/ale
> > >>
> > >
> > >:wq!
> > >---------------------------------------------------------------------------
> > >Robert L. Harris | PGP Key ID: E344DA3B
> > > @ x-hkp://pgp.mit.edu
> > > DISCLAIMER:
> > > These are MY OPINIONS ALONE. I speak for no-one else.
> > >
> > >Diagnosis: witzelsucht
> > >
> > >IPv6 = robert at ipv6.rdlg.net http://ipv6.rdlg.net
> > >IPv4 = robert at mail.rdlg.net http://www.rdlg.net
> > >
> >
> >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
> >
>
> --
> "I'd rather chew my leg off than maintain Java code, which
> sucks, 'cause I have a lot of Java code to maintain and
> the leg surgery is starting to get expensive." - Me
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
--
"I'd rather chew my leg off than maintain Java code, which
sucks, 'cause I have a lot of Java code to maintain and
the leg surgery is starting to get expensive." - Me
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list