--- Begin Message ---
Tom Oehser wrote:

> It probably isn't cpio per se, but the options that yours was compiled
> with, although there may be changes to the program required, depending.
> You can read the LFS (large file support) FAQ.  On tomsrtbt, using the
> tomsrtbt cpio (which is somewhat different from the GNU one), you don't
> have the -F option, or the -H CRC one, for example.  Also, on tomsrtbt,
> the *only* program that supports reading/writing larger than 2 gigabytes
> is "dd-lfs", so what you would do *on tomsrtbt* is like:
>
>  find -xdev -depth | cpio -o | gzip -9 | dd-lfs of=output-file.cpio.gz
>
> letting dd-lfs do the actual file-over-2-gigabyte writing.
>
> The reason tomsrtbt is like this is because libc5 doesn't support lfs,
> but dd-lfs is written in assembly language with direct kernel calls, so
> it can support it even if libc5 doesn't.
>
> It is beyond the scope of this email to discuss the C compilation options
> and issues with recompiling your cpio to support large files, it might
> be possible just with CFLAGS, but there are complicated issues involved,
> so I recommend you try just seeing if your system's dd has lfs compiled,
> so that you could do the same thing (using "dd" instead of "dd-lfs").
>
> A simple test is something like:
>
>         dd if=/dev/zero of=test-file bs=100k count=30000
>
> And see if it chokes at 2 gigabytes...
>
> If you really want to get cpio working, the options you need to jigger are:
>
> -D_FILE_OFFSET_BITS=64
> -D__USE_LARGEFILE64
> -D_LARGEFILE64_SOURCE
> -D_LARGEFILE_SOURCE
>
> But I recommend you read a lot about them first.
>
> -Tom
>
> On Fri, 17 Jan 2003, Angelini Giuseppe wrote:
>
> > Date: Fri, 17 Jan 2003 12:30:18 +0100
> > From: Angelini Giuseppe <[EMAIL PROTECTED]>
> > To: Tom Oehser <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> > Subject: Re: [tomsrtbt] ssystem recovery strategy
> >
> > Tom Oehser wrote:
> >
> > > First, the programs "pax" "tar" and "cpio" are all the same executable
> > > on tomsrtbt, and the "pax" syntax can produce either "tar" or "cpio"
> > > archive formats.
> > >
> > > Tomsrtbt includes the "manual" page for cpio.
> > >
> > > You can type:
> > >
> > >         man cpio
> > >
> > > To read about it.
> > >
> > > Cpio has a better archive format than tar in my opinion, but its options
> > > are somewhat cryptic.
> > >
> > > Common would be something along the lines of:
> > >
> > > find -xdev -depth / /boot /export | cpio -o | gzip > file.gz
> > >
> > > gzip -d < file.gz | cpio -iuvmd
> > >
> > > -Tom
> > >
> > > On Thu, 16 Jan 2003, Angelini Giuseppe wrote:
> > >
> > > > Date: Thu, 16 Jan 2003 16:05:16 +0100
> > > > From: Angelini Giuseppe <[EMAIL PROTECTED]>
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [tomsrtbt] ssystem recovery strategy
> > > >
> > > >
> > > > Hello,
> > > >
> > > >
> > > > I would like to setup a system recovery strategy on our linux system
> > > > (RedHat 7.2).
> > > > I am really familar with dump/restore but apparently it is not
> > > > recommended with linux.
> > > > My idea was to put a dedicated local IDE disk and run a script invoking
> > > > CPIO to save the system
> > > > (/ /boot /export) every week on this disk.
> > > > The problem is that I do'nt know CPIO enough.
> > > > Can somebody advice me or send me an example of CPIO for doing both
> > > > backup and restore.
> > > >
> > > > Any other suggestion will be welcome.
> > > >
> > > >
> > > > Best Regards.
> > > >
> > > > Giuseppe Angelini
> > > >
> >
> > Hello,
> >
> > Thanks everybody for this interesting mails.
> > I have now a more technical question concerning the cpio.
> > In fact, I would like to save peridocally my system disk with cpio
> > while  the system is running.
> >
> > Here is my cpio command:
> > find / -xdev -depth | cpio -o -H crc -F  /mydisk/root.cpio
> > find / -xdev -depth | cpio -o -H crc -F  /mydisk/export.cpio
> >
> > here is the corresponding  ls of the cpio produced from which you can see
> > that
> > the archives created have the same size:
> > -rw-rw-rw-    1 root     root     2147483647 Jan 17 11:39 export.cpio
> > -rw-rw-rw-    1 root     root     2147483647 Jan 17 11:35 root.cpio
> >
> > here is the corresponding  df  of / and /export from which you can see that
> > / and /export have different size::
> >
> > df -k / /export
> > Filesystem           1k-blocks      Used Available Use% Mounted on
> > /dev/sda2              4127108   3837028     80432  98% /
> > /dev/sda5             13274688   2862228   9738136  23% /export
> >
> >
> > The problem is that when I try to read it as follow, I have a premature eof:
> >
> > cpio -tvF export_frontend-0.cpio
> > cpio: premature end of file
> >
> > I have the filling that the output of cpio is limited by by default to
> > 2147483647 bytes. Is there a way to exceed this limitation ?
> >
> >
> > Thanks in advance for your help.
> >
> >
> > Giuseppe Angelini
> >

Hello,

I have finaly found some time to make some more tests.
Here are the commands I used:

1) I have saved my sytem whith the following command:
cd /boot
find . -xdev -depth | cpio -o -H crc | dd of=boot_myhost-cpio.ddcd /
cd /
find . -xdev -depth | cpio -o -H crc | dd of=root_myhost-cpio.dd
cd /export
find . -xdev -depth | cpio -o -H crc | dd of=export_myhost-cpio.dd

2) I have booted from the last version of tom's floppy and restored my system
successfully
with the following command:

dd if=/a/boot_myhost-cpio.dd | cpio -iumd
dd if=/a/root_myhost-cpio.dd | cpio -iumd
dd if=/a/export_myhost-cpio.dd | cpio -iumd


while restoring I have got the following kind of error messages:

dev/pts: No such a file or directory
var/lib/xdm/authdir: No such a file or directory
usr/src/redhat/RPMS/athlon: No such a file or directory

This is pointing to an empty directory on my system.
I have tryied to boot after having done the lilo stuff ...

It seems that it is finding my boot and the boot program starts but
after a while I have got the following error message while checking the file
system:

fsck.ext3: Exec format error

Can you help me please.

Thanks.

Giuseppe Angelini















--- End Message ---

Reply via email to