fbackup problem

Hi,

I have a fbackup step as below in HP-UX

/bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full

Now the errors that i will get in case of the fbackup step, I want to redirect them to a file. Please help me how to redirect to a file.

Thanks,

Avik.

Do you want to redirect the output (errors) that you would see from fbackup on the screen into a file?

If yes,

Just add 2 > /tmp/filename at the end of your command.

If you need more detailed information, use -v. We use 2 before redirection as fbackup sends the info to stderr rather than stdout. If you want detailed information on this, contact the guru below.

#man fbackup

-DB

Oh oh oh, Just read the other post!

:confused:

-DB

A few things puzzles me:
We dont know what kind of box nor OS version you are running, nor what type of device is your /dev/rmt/0m (dat dat2 dat3 dat4 or what?) or volumetry of what is backuped

Why would one use nice when doing backup?
More its going to take time and more chances you have to have reconnextions and files opened...

Dustbunny explained how to redirect... but in your other thread you said you wanted on the console and in a file, that means using the command tee

Additional from DustBunny

Example:
LOG_FILE=/temp/mylog.txt
/bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full > $LOG_FILE 2>&1
echo "Backup completed" >> $LOG_FILE 2>&1