Maybe not quite the worst, but I imagine there’s a good selection of better ones, something to keep in the back pocket though.
I originally wondered about this when I got to a customer site to do a full system save and their tape drive was acting up, fortunately I got it going again but it made me wonder how I’d go about doing it.
First thing to consider is obviously disk space, if you’re hoping to do a full system save to the same partition you’re saving then you’re not going to get far if you’re at 70% disk used. Depending on your exact requirements you might be able to cheat a little.
In my example, I have virtual images on the IFS of the IBM o/s disks along with the last set of group PTFs I installed. While these are useful to have lying around, I do have other copies of them so we’ll skip saving those using the CHGATR command:
CHGATR OBJ(‘/V7R3OS’) ATR(*ALWSAV) VALUE(*NO)
CHGATR OBJ(‘/V7R3PTFS’) ATR(*ALWSAV) VALUE(*NO)
The result is a not true “full” system save, but I’ll have everything I actually need.
Next you’ll want to set up a virtual tape drive, assuming you don’t have one already. As a side note I believe it’s only as of V5R4 that you can do this, so before that perhaps try to SAVE21 to a virtual CD?
CRTDEVTAP DEVD(VIRTAP01) RSRCNAME(*VRT) ONLINE(*YES) TEXT(text-description)
VRYCFG CFGOBJ(VIRTAP01) CFGTYPE(*DEV) STATUS(*ON)
Once you’ve created your virtual tape drive, you need something to put in it so we’ll set up a catalogue and an image within it:
CRTIMGCLG IMGCLG(SAVE21) DIR(/home/save21) TYPE(*TAP) CRTDIR(*YES) TEXT(MNIS Save21 Catalogue)
ADDIMGCLGE IMGCLG(SAVE21) FROMFILE(*NEW) TOFILE(*GEN) IMGSIZ(<x>MBs) VOLNAM(*GEN) TEXT(SAVE21 tape)
I normally leave TOFILE & VOLNAM as default, although you can set a custom one if you prefer. IMGSIZ will depend on how much space you need and/or what type of tape you’re hoping to use longer term.
Now you have a virtual tape and a drive for it, should probably load it.
LODIMGCLG IMGCLG(SAVE21) DEV(VIRTAP01) OPTION(*LOAD)
LODIMGCLGE IMGCLG(SAVE21) IMGCLGIDX(*FIRST) OPTION(*MOUNT)
You’ve now got a tape loaded in the drive and can do your system save as you normally would. By default any loaded image catalogue is excluded from the save, although personally I still prefer using another CHGATR here just in case I have multiple image catalogues.
In my experience of having tried this once the save took a lot longer than normal, could be I was unlucky although it makes sense that since we’re putting twice as much strain on the disk it might take longer?
Once you’ve done your save the question is what to do with the finished product? I’d personally recommend that as soon as possible you actually offload onto a tape if you’re hoping to use it for a restore21 at any point. In my example I’d do the save, fix the tape drive, then run a DUPTAP command between my virtual drive and the real one. You could also look at offloading the image catalogue when you’re done to another server, IBM or otherwise, if it’s purely as a backup.
There are other uses for the same sort of technique, for example the server I’ve tested this on hosts 3 other partitions and IBM support do talk about how you can use a virtual tape drive / image catalogue on another partition. So, again depending on exactly what I want to get out at the end, perhaps rather than saving each individual drive object (and thus the full size of it) I do a save21 on each partition separately? I could then, if I wanted everything on one tape, do my save21 of the primary partition and include those images but exclude the disks.