Sean Fulton <[EMAIL PROTECTED]> 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
_______________________________________________
Bug-cpio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cpio