Operating System - HP-UX
1836412 Members
2723 Online
110100 Solutions
New Discussion

How to backup with compression files selected by criteria

 
Vassily Gorbounov_1
Occasional Advisor

How to backup with compression files selected by criteria

I have:
HP-UX 10.20

I need:
To backup and compress many files.
They are selected by find (actually I need to backup files newer then some TAG
file).
And I don't want to create intermediate tar file and then gzip it.
I would like to do "TARing" and then through pipe "GZIP" it.

The problem is that I have many files find by FIND.
And the string consisting of their names is greater than could be handled by
tar.

That is ,

tar cf - `find ` | gzip -c > result

doesn't work, cause `find ` produces excessively long string.

So the questions:
1. What is a limitation of such string length?
2. What would you advice?

Thanks a lot.
1 REPLY 1
Dan Hull
Regular Advisor

Re: How to backup with compression files selected by criteria

By default, the shell environment only allows an argument list of up to 20478
bytes. Try installing the following patches and then enable the kernel
parameter:

large_ncargs_enabled = 1

If the option already appears in your kernel, you probably have some version of
the required patch(es). This option increases the parameter list buffer by
ten-fold, which might be enough for your needs.

PHCO_16591 fsck_vxfs(1M) cumulative patch
PHKL_16751 SIG_IGN/SIGCLD,LVM,JFS,PCI/SCSI
PHKL_16957 Physical dump devices configuration
PHKL_17858 Fix for mount/access of disc
PHKL_18522 LOFS cumulative patch
PHCO_18563 LVM commands cumulative patch
PHKL_19159 Correct process hangs on ufs inodes
PHKL_19540 VxFS (JFS) mount,fsck cumulative
PHNE_19936 cumulative ARPA Transport patch