- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Veritas Script
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
Forums
Discussions
Discussions
Discussions
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
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
08-19-2005 05:07 AM
08-19-2005 05:07 AM
Veritas Script
I use veritas netbackup to backup my filesystems. I want to copy 10-15 policies in a new name with a change in storage unit ( Say STU_1) and I want to change the backup selections for that newly created policies.
My backup selections in the original policies starts with /snap
I want to copy all the policies where backup selection starts with /snap and copy to a new policy removing "snap" and also with a change in storage unit as mentioned above..
Can we have a script to do this operation. This will save my 3-4 hours job if successful. Points to all inputs.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 05:43 AM
08-19-2005 05:43 AM
Re: Veritas Script
It had perhaps been easier if you had attached an example.
Is a "policy" a file ? to copy files, containing a specific string you can use "grep -l".
for file in $(grep -l /snap *)
do
cp $file
done
then you can use sed on the files for editing
for file in *
do
sed '/s/snap//' >${file}1
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 05:45 AM
08-19-2005 05:45 AM
Re: Veritas Script
It should be:
sed '/s/snap//' $file >${file}1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 06:18 AM
08-19-2005 06:18 AM
Re: Veritas Script
Thanks for your replies. I am sorry but I dont know which is the file where the policy name, attributes, backup selections and schedules are stored. I myself consider veritas as an elephat as it is very complicated in the command line level.
I am still in search for the answers of above questions. If any one can point out / give clues ..will be a great help.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 08:46 AM
08-19-2005 08:46 AM
Re: Veritas Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 10:20 AM
08-19-2005 10:20 AM
Re: Veritas Script
There are many ways to do this if you could at least provide a sample input then that would help.
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 02:18 PM
08-19-2005 02:18 PM
Re: Veritas Script
Each policy is having individual folders under /usr/openv/netbackup/db/class.
As mentioned above I have a policy called Bkp_Server1_Snap_d00.
the directory structure is as follows.
astersvr:root-/tmp/Bkp_Server1_Snap_d00>ls -lR
total 6
-rw------- 1 root sys 106 Aug 20 07:28 clients
-rw------- 1 root sys 9 Jul 3 02:36 includes
-rw------- 1 root sys 777 Aug 20 07:30 info
drw-r-xr-x 3 root sys 96 Jul 10 13:22 schedule
./schedule:
total 0
drw-r-xr-x 2 root sys 96 Jul 10 13:22 Manual
./schedule/Manual:
total 4
-rw------- 1 root sys 42 Jul 10 13:22 days
-rw------- 1 root sys 339 Jul 10 13:22 info
mastersvr:root-/tmp/Bkp_Server1_Snap_d00>
mastersvr:root-/tmp/Bkp_Server1_Snap_d00>
mastersvr:root-/tmp/Bkp_Server1_Snap_d00>
I want few changes in the newly created policies.
Copy the policy to a new name removing the string "Snap_" as shown above.
2. Change the stu name from test1_stu to test2_stu
3. Change the backup selection by just removing the string "snap".
How can I achieve all these in a script.
Attached the policy folder in a winzip format. You can get all the required inputs from that.
Regards,
Syam