bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cpio] cpio can't read large files


From: Sergey Poznyakoff
Subject: Re: [Bug-cpio] cpio can't read large files
Date: Sat, 14 Jan 2006 19:20:32 EET

Sean Fulton <address@hidden> wrote:

> We also had an issue with tar/find combination as follows:
> 
> the index list is:
> /directory
> /directory/file1
> /directory/file2
> 
> Cpio just backs up the directory, tar would back up the contents of the 
> directory (/directory/file1, /directory/file2), then the files,

Oh, yes, I've forgotten to mention this. By default, if tar encounters a
directory in the file list, it will recursively descend to this
directory and back up its contents. So, if you simply pipe the find
output to tar, you'll get each file added twice. To avoid this, use
--no-recursion option to tar. So, the corrected invocation from my
previous post will be: 


find $filesys -mount $SKIPSTRING -print |
tee $LISTFILE |
tar --rsh-command=/usr/bin/ssh \
    --one-file-system \
    -c -z -f $BU_HOST:/backups/$MYHOST/$DAY/$c_filesys.cpio.gz \
    -P -T - \
    --no-recursion \ 
    $filesys

> Also, as I mentioned previously, if /directory had no contents, tar 
> would skip it, which caused a lot of problems on restore because upload 
> and temp directories weren't on the archive. Does it currently address that?

Tar archives every file or directory name it is given, no matter what its
contents is.
 
Regards,
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]