- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron&make_tape_recovery&redirect to afile
Operating System - HP-UX
1753808
Members
7370
Online
108805
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2004 05:20 AM
тАО03-13-2004 05:20 AM
hi Gurusd,
i want to run with the command " make_tape_recovery -Av " from cron every 2 weks in a month so when this command runs also
want to generate a log file year_month_date_systemname.log at the same time to check what make_tape_recovery did..so i have written a script and put it to cron below
#!/usr/bin/ksh
sys_name=`hostname`
log_file=`date +"%y_%d_%m"
./opt/ignite/bin/make_tape_recovery|tee -a /tmp/$sysname$log_file.log
so norrmally script run on time and make_tape_recovery start but can not create the log file in /tmp directory...
only i see a file name .log and size=0
Please share your precious suggestions..
Greetings,
i want to run with the command " make_tape_recovery -Av " from cron every 2 weks in a month so when this command runs also
want to generate a log file year_month_date_systemname.log at the same time to check what make_tape_recovery did..so i have written a script and put it to cron below
#!/usr/bin/ksh
sys_name=`hostname`
log_file=`date +"%y_%d_%m"
./opt/ignite/bin/make_tape_recovery|tee -a /tmp/$sysname$log_file.log
so norrmally script run on time and make_tape_recovery start but can not create the log file in /tmp directory...
only i see a file name .log and size=0
Please share your precious suggestions..
Greetings,
Our greatest duty in this life is to help others. And please, if you can't
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2004 05:54 AM
тАО03-13-2004 05:54 AM
Re: cron&make_tape_recovery&redirect to afile
Hi,
Check this link.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=469277
Regards,
Robert-Jan
Check this link.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=469277
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2004 06:10 AM
тАО03-13-2004 06:10 AM
Solution
A complete logfile with all the details you need is located in /var/opt/ignite/recovery/latest/recovery.log so all you need to do is copy that log someplace else if you need a history. make_tape_recovery doesn't work well with stdout and stderr redirects--there are some items that are missing, but are included in the above logfile. NOTE: The directory /var/opt/ignite/recovery/ contains the last 2 backup file history. The 'latest' directory is actually a symbolic link that will always point to the latest backup.
I'm concerned about your options though. Have you tried one of your Ignite tapes on a test machine? I would reommend using:
make_tape_recovery -I -v -x inc_entire=vg00 -a /dev/rmt/some-tape
You may also want to add -d "$(hostname) VG00 backup" and -t "Ignite backup for $(hostname) on $(date)" for complete documentation. In my Ignite backup script, I also test for a real tape (hint: mt -f /dev/rmt/some-tape status) and whether it is write-enabled (same command). i also test for a successful exit code, but this too is tricky. It will produce a non-zero exit if you exclude anything (including /cdrom for example) and will also complain if anything in /etc/fstab is not mounted. I modify fstab temporarily to remove the mountpoint for /cdrom (it uses the noauto option so it doesn't mount on reboot). And I email the result to the sysadmin mailbox when it runs.
After describing all this, maybe it would be easier just to look at the enclosed script.
Bill Hassell, sysadmin
I'm concerned about your options though. Have you tried one of your Ignite tapes on a test machine? I would reommend using:
make_tape_recovery -I -v -x inc_entire=vg00 -a /dev/rmt/some-tape
You may also want to add -d "$(hostname) VG00 backup" and -t "Ignite backup for $(hostname) on $(date)" for complete documentation. In my Ignite backup script, I also test for a real tape (hint: mt -f /dev/rmt/some-tape status) and whether it is write-enabled (same command). i also test for a successful exit code, but this too is tricky. It will produce a non-zero exit if you exclude anything (including /cdrom for example) and will also complain if anything in /etc/fstab is not mounted. I modify fstab temporarily to remove the mountpoint for /cdrom (it uses the noauto option so it doesn't mount on reboot). And I email the result to the sysadmin mailbox when it runs.
After describing all this, maybe it would be easier just to look at the enclosed script.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2004 05:01 PM
тАО03-13-2004 05:01 PM
Re: cron&make_tape_recovery&redirect to afile
Hi,
Is this an exact copy-paste of your script?.
If so, there are syntax errors in your script.
log_file=`date +"%y_%d_%m"
Will give out errors as there is no closing 'tick'. It should have been
log_file=`date +"%y_%d_%m"`
The next line
./opt/ignite/bin/make_tape_recovery|tee -a /tmp/$sysname$log_file.log
This should have been
./opt/ignite/bin/make_tape_recovery|tee -a /tmp/${sys_name}${log_file}.log
as you used sys_name not sysname.
Since you are runnign it through cron, you may not want 'tee' in there. I would do
/opt/ignite/bin/make_tape_recovery -v -I -x inc_entire=vg00 -x exclude=/var/adm/crash -a /dev/rmt/0mn > /tmp/${sys_name}${log_file}.log 2>&1
to capture the standard error also.
-Sri
Is this an exact copy-paste of your script?.
If so, there are syntax errors in your script.
log_file=`date +"%y_%d_%m"
Will give out errors as there is no closing 'tick'. It should have been
log_file=`date +"%y_%d_%m"`
The next line
./opt/ignite/bin/make_tape_recovery|tee -a /tmp/$sysname$log_file.log
This should have been
./opt/ignite/bin/make_tape_recovery|tee -a /tmp/${sys_name}${log_file}.log
as you used sys_name not sysname.
Since you are runnign it through cron, you may not want 'tee' in there. I would do
/opt/ignite/bin/make_tape_recovery -v -I -x inc_entire=vg00 -x exclude=/var/adm/crash -a /dev/rmt/0mn > /tmp/${sys_name}${log_file}.log 2>&1
to capture the standard error also.
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP