- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Getting only SAVESET Header Info
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
тАО05-18-2010 07:53 AM
тАО05-18-2010 07:53 AM
So far, I've tried various backup list cmds but can't find a combination that does not include the file names.
I've looked at parsing the output from a DUMP saveset/BLOCK=END:1, but I'm not certain of the format/offsets of each field.
Any suggestions?
TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 08:08 AM
тАО05-18-2010 08:08 AM
SolutionYou can pipe the BACKUP output through SEARCH.
Or build a database that manages and keys off the tape label, or that maintains the contents from the BACKUP journal.
Or tweak the code here:
http://labs.hoffmanlabs.com/node/817
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 08:17 AM
тАО05-18-2010 08:17 AM
Re: Getting only SAVESET Header Info
First block of the BACKUP saveset contains the summary record. Summary record basically contains the summary information of the saveset, i.e. saveset name, BACKUP command, OS version, user name, account from which the BACKUP was written, block size used etc├в ┬ж.
>> Is there any way to display only this "header" info?
Saveset is like any other file in the disk/tape. To display the header information you need to use the DUMP command as shown below.
$ dump/header/block=count=0
Hope this helps.
Regards,
Ketan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 08:34 AM
тАО05-18-2010 08:34 AM
Re: Getting only SAVESET Header Info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 08:46 AM
тАО05-18-2010 08:46 AM
Re: Getting only SAVESET Header Info
$ BACK/LIST=filename saveset.bck/save
$ search/wind=(8,9) filename "Command:"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 09:13 AM
тАО05-18-2010 09:13 AM
Re: Getting only SAVESET Header Info
What I've posted is a link to vmsbackup; some (portable) C code which reads BACKUP savesets on Mac OS X and other Unix boxes, on Linux and on Solaris. Within that C code, you'll find everything that you will need to do here to fetch (just) the BACKUP headers as that code can parse and can display the saveset headers. And see the undocumented BACKUP /ANALYZE qualifier.
If you want to go after the headers yourself, directly, and with DCL (shudder), then you'll be looking at the BCKDEF stuff IIRC.
You could probably SPAWN the BACKUP command and then (after some number of I/O calls or a couple of minutes time) delete the process and rewind the tape. This being a massive hack for a timeout; a way to get just the first part of the tape without having to read the whole thing. And this won't work if there's more than one saveset on the tape. Or punt, and just process the first dozen or so lines of BACKUP /FULL/LIST=file for the tape. I haven't tried this, but BACKUP /FULL /LIST=mbx might work, in conjunction with CREATE /MAILBOX and friends.
Or tweak the provided C code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 09:52 AM
тАО05-18-2010 09:52 AM
Re: Getting only SAVESET Header Info
BACKUP/LIST/ANALYZE together with DUMP/BLOCK=COUNT=1 of the saveset should give you enough information about the layout of the 'BACKUP SUMMARY' record.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 09:56 AM
тАО05-18-2010 09:56 AM
Re: Getting only SAVESET Header Info
also see SYS$EXAMPLES:BACKDEF.*
for structure definitions in your preferred programming language...
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 05:11 PM
тАО05-18-2010 05:11 PM
Re: Getting only SAVESET Header Info
>> So far, I've tried various backup list cmds but can't find a combination
>> that does not include the file names.
The BACKUP/LIST command will display the summary information followed
by the listing of the files present within the saveset.
I dont think there is any existing qualifier which would give only the summary
information and not the listing of files within the saveset.
Is the concern that the savesets on tape contain lot of files in it and hence
taking more time to complete the BACKUP/LIST operation?
Regards,
Murali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 06:08 PM
тАО05-18-2010 06:08 PM
Re: Getting only SAVESET Header Info
As others have said, backup itself doesn't (currently at least) provide a way to list only the non-file records. Perhaps you should make a formal request, it should be a relatively easy modification.
As far as parsing the output of the beginning block of the save set, I will only say that the backup header can span more than a single block, especially in the case of image backups. All backup save sets have a SUMMARY record, which has the basic info at the beginning of the listing. In an image backup there is additional volume information saved in the header (record type = VOLUME) and possibly many FID records.
For more detail about what is in the backup save set, use the undocumented, unsupported /ANALYZE switch with /LIST. This will give you a formatted dump of what is in the save set.
The disadvantage of listing is that it can take a long time for large save sets. For examples, an LTO3 filled with many small files can generate a listing file > 1 GB and take more than an hour to generate.
The advantage of listing the save set is that it will provide the totals for files and blocks contained in the save set, computed while backup lists the save set contents. This is similar to what directory/total/size=used gives. It also verifies the readability and consistency of the backup save set. In other words, if you do a complete listing, you will know that the save set is readable, and how much data is in the save set.
One possible way to exclude the file names from a listing of a backup save set is with VMS 8.3+ search /wild
$ search/nowin/wild saveset_listing "[*]*;"," %%%%%%%%%% %%-%%%-%%%% %%:%%"/mat=nor
This excludes strings that are found in the "file" listing lines. The first "[*]*;" excludes the lines that appear to be file specifications, the second is to exclude the date stamps that may have been wrapped to a separate line. The above works only for /brief listings. A perl or awk script could be made more general, but that is left as an exercise for the user.
Letting backup do the work, and filtering the output is the easy way. It works with pipe too.
$ pipe backup/list login.sav; /save | search/nowin/wild/match=nor sys$pipe "[*]*;"," %%%%%%%%%% %%-%%%-%%%% %%:%%"
Listing of save set(s)
Save set: LOGIN.SAV
Written by: JON
UIC: [000002,000016]
Date: 8-APR-2007 02:00:05.15
Command: BACKUP SYS$LOGIN:LOGIN.COM;* LOGIN.SAV/SAV
Operating system: OpenVMS Alpha version V7.2
BACKUP version: AXP72R001
CPU ID register: 80000000
Node name: _SIGMA::
Written on: _$4$DKA200:
Block size: 32256
Group size: 10
Buffer count: 1239
Total of 160 files, 2321 blocks
End of save set
$
If you don't want to wait for the complete listing, then Hoff's source would be the place to start.
Jon