- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Backups on weekly basis
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО12-27-2005 06:58 PM
тАО12-27-2005 06:58 PM
I am looking forward to create a script where system should sugest me the tape number.
For eg I have 12 tapes .
1) Saturday to Wednesday = 5 tapes (TNO1 to TNO5)
2) Weekly backup tape = 1st Thursday(TNO6)
3) 2nd Saturday to 2nd Wednesday = 5 tapes(TNO7 to TNO11)
4)Weekly backup tape = 2nd Thursday(TNO12)
and backup to step 1
I Guess it can be done on weeks count
Like We have 52 weeks
1st week it should ask me
Saturday to Wednesday = 5 tapes (TNO1 to TNO5)
and 2nd week
2nd Saturday to 2nd Wednesday = 5 tapes(TNO7 to TNO11)
With EVEN and ODD combination
But i dont know how best i can write it in script.
Regards
Musaddaq
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-27-2005 07:05 PM
тАО12-27-2005 07:05 PM
Re: Backups on weekly basis
did you have a look at Data Protector?
this software make these tasks simple for you.
hope this helps
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-27-2005 07:10 PM
тАО12-27-2005 07:10 PM
Re: Backups on weekly basis
Dataprotector:
A scalable data management solution that automates high performance backup and recovery, from disk or tape, over unlimited distances, ensuring 24x7 business operations and maximized IT resources.
You can check this page for details:
http://h18006.www1.hp.com/products/storage/software/dataprotector/
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2005 01:57 AM
тАО12-28-2005 01:57 AM
SolutionA script can be written,
all you have to do it to check a file.
E.g
DAT.NUM will be increamented each time
The File DAT.NUM will have just
DAT01
once that backup is complete it will be
DAT02
ensure that your scripts changes each time and at 12th run puts to DAT01.
Else use dataprotector
007
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2005 08:47 AM
тАО12-28-2005 08:47 AM
Re: Backups on weekly basis
Here's a simple perl script. You can adapt it to your rules as needed. The script returns a three-item string denoting the day-of-the-week (1-7 where 1=Monday), the number of the week within the month (1-5) and the week-number (1-53) of the year.
#!/usr/bin/perl
use strict;
use warnings;
use Date::Calc qw( Decode_Date_US Day_of_Week Week_of_Year );
die "Usage: $0 MMDDYYYY\n" unless @ARGV;
my ($year, $month, $day);
if (($year, $month, $day) = Decode_Date_US($ARGV[0])) {
print Day_of_Week ($year, $month, $day), " ",
int (($day + Day_of_Week ($year, $month, 1) - 2) / 7) + 1, " ",
scalar Week_of_Year($year, $month, $day), "\n";
}
1;
Run the script by passing a US-format (MMDDYYYY) date either with or without delimiters:
# ./daynums 01/01/2005
6 1 53
...since 01/01/2005 was a Saturday (6) in the first (1) week of January but is reckoned as the LAST (53rd) week of the preceeding year, since no Monday had yet occured in 2005.
# ./daynums 12/28/2005
3 5 52
...a Wednesday (day-3) of the fifth (5) week of the month and the 52nd week of the year.
If you would prefer to work and think in European rathter than US formats, substitute "_EU" for "_US" and change the line beginning with "die" thusly:
use Date::Calc qw( Decode_Date_EU Day_of_Week Week_of_Year );
die "Usage: $0 DDMMYYYY\n" unless @ARGV;
my ($year, $month, $day);
if (($year, $month, $day) = Decode_Date_EU($ARGV[0])) {
Then for December 28, 2005 you would do:
# ./daynums 28/12/2005
3 5 52
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2005 04:26 PM
тАО12-28-2005 04:26 PM
Re: Backups on weekly basis
I will try making the script from your suggestions and will get back to you.
Regards
Musaddaq
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2005 06:51 PM
тАО12-28-2005 06:51 PM
Re: Backups on weekly basis
# cat device.sh
#!/bin/sh
if [[ `expr $(date +'%W') % 2` -ne 0 ]]
then
if [[ $(date +'%a') = "Sat" ]]
then
echo "Tape Device = TN01"
elif [[ $(date +'%a') = "Sun" ]]
then
echo "Tape Device = TN02"
elif [[ $(date +'%a') = "Mon" ]]
then
echo "Tape Device = TN03"
elif [[ $(date +'%a') = "Tue" ]]
then
echo "Tape Device = TN04"
elif [[ $(date +'%a') = "Wed" ]]
then
echo "Tape Device = TN05"
elif [[ $(date +'%a') = "Thu" ]]
then
echo "Tape Device = TN06"
fi
else
if [[ $(date +'%a') = "Sat" ]]
then
echo "Tape Device = TN07"
elif [[ $(date +'%a') = "Sun" ]]
then
echo "Tape Device = TN08"
elif [[ $(date +'%a') = "Mon" ]]
then
echo "Tape Device = TN09"
elif [[ $(date +'%a') = "Tue" ]]
then
echo "Tape Device = TN10"
elif [[ $(date +'%a') = "Wed" ]]
then
echo "Tape Device = TN11"
elif [[ $(date +'%a') = "Thu" ]]
then
echo "Tape Device = TN12"
fi
fi
# END
exit 0
########################
If you execute this every day, it will work based on date command.
-Muthu