Hi Jan,
do you get any error messages? What is inside your $INCRLOG file when
executing the commands you wrote manually? When I try your second script
everything is working fine:
TEST="/tmp/test.log"
./bconsole <<EOF
@output /dev/null
messages
@output $TEST
list volume pool=Full
EOF
more /tmp/test.log
+---------+----------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes
| VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType |
LastWritten |
+---------+----------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 1,216 | def.full.13041701 | Full | 1 | 23,622,298,745
| 5 | 31,536,000 | 1 | 0 | 0 | File | 2015-05-09
18:24:05 |
Best regards,
Daniel Heitepriem
Am 10.10.16 um 08:36 schrieb Jan Gazda:
Hello All,
I wanted to create a simple script to collect information about
volumes with cron but whatever I do not files are being created if the
script is executed by cron
I tried various modifications but neither of them work.
if [[ $(date +%u) -lt 5 ]]; then
# if week day, log incr only
echo "--------"$(date)"---------------" >> $INCRLOG
echo "list volume pool=LTO5-Incr-Pool" | bconsole |
grep $INCR >> $INCRLOG
else
# is weekend log, incr and full
echo "--------"$(date)"---------------" >> $INCRLOG
echo -e "list volume pool=LTO5-Incr-Pool" | bconsole |
grep $INCR 2>&1 >> $INCRLOG
fi
I also tried a script with but it also does not work
bconsole <<E_O_F
@output /dev/null
messages
@output $INCRLOG
list volume pool=LTO5-Incr-Pool
@output $FULLLOG
list volume pool=LTO5-Full-Pool
E_O_F
Sapienza Logo <http://www.sapienzaconsulting.com/> Jan Gazda
ECLIPSE & Office IT Support Technician
Sapienza Consulting
Kapteynstraat 1
2201 BB Noordwijk
Netherlands
Tel: +31 (0) 71 407 6518
Fax: +31 (0) 71 407 6536
Mob: +31 682607099
Follow us on:
Linkedin <http://www.linkedin.com/company/sapienza-consulting>Twitter
<https://twitter.com/sapienzajobs>YouTube
<https://www.youtube.com/channel/UCq2Pzj4-xGZYPtLQhPr7hzw>
The contents of this e-mail and any attachment are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email and/or any attachment
in error, please notify the sender immediately and then delete it. If
you are not the intended recipient, you must not distribute, disclose,
use, copy, print or rely on this e-mail.
Communicating by email is not 100% secure, error or virus free. It is
your responsibility to ensure that viruses do not adversely affect
your system. If you communicate with us by e-mail you agree to take
appropriate measures to minimise these risks when e-mailing us.
We may monitor, record, store and use any email communication with you
in order to check any instructions given to us, for training purposes,
for crime prevention, to improve the quality of our customer service
and to keep records of our business communications.
Sapienza Consulting Limited is a limited company registered in England
and Wales with its registered office at 61 Rodney Street, Liverpool,
Merseyside, L1 9ER and registered number 2986023
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users