Hi
I am running Adabas 71.1.9 On Linux REHL9.
Is there a way to compare Adabas asset size to free space on disk?
Example: Lets assume I want to back an Adabas file, and I want to check if I have sufficient disk storage on my disk (before running backup of course)
Size of Adabas files on disk:
/adabas/db001 > du -ch ASSO* DATA*
64G ASSO1.001
16M ASSO2.001
108G DATA1.001
4.1M DATA2.001
171G total
The “total” will be the approximate size of the backup.
For free space, you can use “df -h” and look in the “Avail” column for an area large enough to hold your backup.
Hi
I meant running an adabas fnr backup, not the actual adabas containers.
Ex: I have run dbid=1 with fnr:1-10, I want just before run a backup on fnr=1 the size, in order to check if I have enough disk space
Hi Hezi,
you can use a named pipe together with the wc
command.
See also Adabas Basics → Using Utilities → Using Named Pipes
# create a named pipe
mkfifo /tmp/bckpipe
# let ADABCK write to the pipe
export BCK001=/tmp/bckpipe
# since the pipe is blocked until someone reads from it
# start it as a background process and discard the output
adabck dbid=1 dump=1 > /dev/null &
# let wc read from the named pipe and count the bytes
wc -c $BCK001
The output contains the number of bytes and the file/pipe name:
7242088 /tmp/bckpipe