Operating System - OpenVMS
1826489 Members
4233 Online
109692 Solutions
New Discussion

Re: backup directory tree with aliasses

 
SOLVED
Go to solution
Jansen_8
Regular Advisor

backup directory tree with aliasses

Hi all,

I would like to copy a whole diractory tree from one place to another. The directory tree contains aliasses (set with "set file/enter") which should be preserved. I'm not able to this with backup since
1) BACKUP just puts the files twice on the new location.
2) BACKUP/NOALIAS just does not copy the alias

How can this be done without the tededious manual fix on all aliasses?

Jouk
8 REPLIES 8
labadie_1
Honored Contributor

Re: backup directory tree with aliasses

I would use backup/image and then remove the unnecessary stuff.
Jan van den Ende
Honored Contributor

Re: backup directory tree with aliasses

Jouk,

I agree with Gerard Labadie:
$ BACKUP/IMAGE _does_ preserve aliasses.
However, it can ONLY be used to backup entire volumes. And to get the aliasses back upon restore, again it has to be /IMAGE, which requires an entire volume, mounted /FOREIGN.
Whether this within the reach of your available hardware, and next, removing any unwanted data (by hand) again is less work than adding the aliasses, is for you to decide.
It is certainly less sensitive to oversight and typos.

fwiw,

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Jansen_8
Regular Advisor

Re: backup directory tree with aliasses

But backup/image is no option if:
1) only a small part of the disk should be copied. too much effort to remove the unwanted things. Maybe the location is not alrge enough. maybe file protections prevent the operation on the unwanted part.

Jouk
Jon Pinkley
Honored Contributor
Solution

Re: backup directory tree with aliasses

Backup /image is the only thing that preserves aliases, since it copies directory files as is.

So your options are:

1. As previously stated, a complete image backup restored to a fresh disk, then deleting the stuff you don't want and possibly copying other stuff (that doesn't have aliases) onto the new disks.

2. backup/noalias followed by entry of all the aliases.

If you are going to reenter the aliases, you can get a good start at a command file to do it with the output from

$ DFU directory /alias

You will need to edit the output and use a learn sequence in an editor to change the output into the appropriate set file/enter commands. But it will be a lot easier than starting from scratch.

Perhaps someone already has a perl or awk script to reformat the output.

DFU is on the Freeware discs.

I would recommend an analyze/disk/repair on the source disk before the backup or dfu directory/alias so the aliases consistent.

I would also recommend doing the backup from a batch file with a log file and using backup/log so you can verify what files have been considered aliases, and comparing that to the output of DFU directory/alias

One more note, if you are using a rooted directory as the source of the backup, it may not work with /alias. When I tried it here on 7.2-2, it gave me the following

$ backup/noalias root$users:[jon.aliastest...]*.*;* disk$scrwrk2:[*...]/own=jon/log/trun
%BACKUP-W-ADNOTSAVED, alias directory ROOT$USERS:[000000]000000.DIR;1 and its directory tree not saved
%BACKUP-W-NOFILES, no files selected from ROOT$USERS:[JON.ALIASTEST...]*.*;*

Using the standard names did work.

$ backup/noalias disk$user1:[users.jon.aliastest]*.*;* disk$scrwrk2:[jon.aliastest]/own=jon/log/trun
%BACKUP-W-AFNOTSAVED, alias file DISK$USER1:[USERS.JON.ALIASTEST]DEF.DAT;1 was not saved
%BACKUP-S-CREDIR, created directory DISK$SCRWRK2:[JON.ALIASTEST]
%BACKUP-S-CREATED, created DISK$SCRWRK2:[JON.ALIASTEST]ABC.DAT;1
$

$ dfu directory/alias disk$user1

Disk and File Utilities for OpenVMS DFU V2.7-A
Freeware version
Copyright © 2000 COMPAQ Computer Corporation

%DFU-I-INDSCAN, Making directory table for DISK$USER1: ($4$DKA200:)
%DFU-I-DIRSCAN, Scanning 4614 directories...
$4$DKA200:[USERS.JON.ALIASTEST]DEF.DAT;1 is alias for $4$DKA200:[USERS.JON.ALIASTEST]ABC.DAT;1

%DFU-S-DONE, Directories scanned : 4614
$

p.s. There may be a lot fewer aliases than you think, if they are aliases of directories. For examle, here what the output on a system disk looks like.

$ dfu dir /alias disk$ilsvms722/out=wrk:ilsvms722.alias

Disk and File Utilities for OpenVMS DFU V2.7-A
Freeware version
Copyright © 2000 COMPAQ Computer Corporation

%DFU-I-INDSCAN, Making directory table for DISK$ILSVMS722: ($4$DKA407:)
%DFU-I-DIRSCAN, Scanning 523 directories...
$4$DKA407:[SYS0]SYSCOMMON.DIR;1 is alias for $4$DKA407:[000000]VMS$COMMON.DIR;1
$4$DKA407:[SYS1]SYSCOMMON.DIR;1 is alias for $4$DKA407:[000000]VMS$COMMON.DIR;1
$4$DKA407:[SYS23]SYSCOMMON.DIR;1 is alias for $4$DKA407:[000000]VMS$COMMON.DIR;1
$4$DKA407:[SYS24]SYSCOMMON.DIR;1 is alias for $4$DKA407:[000000]VMS$COMMON.DIR;1

%DFU-S-DONE, Directories scanned : 523
$
it depends
Jansen_8
Regular Advisor

Re: backup directory tree with aliasses

Good tip Jon this DFU stuff. I'll try to make a DCL-procedure to do it automatically.

Jouk
Colin Butcher
Esteemed Contributor

Re: backup directory tree with aliasses

Can I also recommend that you use LDdriver. It can be a very useful tool to break large directory structures into smaller structures - which can make life much less difficult. In this case you could even do a disc to LD image backup (with /ignore=interlock provided that the stuff you need is not being accessed), then use DFU to trash the unnecessary trees. Finally create a smaller LD unit and put the resulting tree into that.

There's a VMS Technical Journal article about using LDdriver at www.digiater.nl - which is the home of both LD and DFU (thank's to Jur van der Burg).

Cheers, Colin (www.xdelta.co.uk).
Entia non sunt multiplicanda praeter necessitatem (Occam's razor).
Jansen_8
Regular Advisor

Re: backup directory tree with aliasses

Based on Jon's remark I created a small Fortran program which does the task for me.
I placed the tools "as-is" on my web page:
Toolname : ABAC
web-page : http://nchrem.tnw.tudelft.nl/openvms/software2.html

Note that is is just a rough sketch of o proof of principle and note that it can handle only a small subset of all cases and that error messages should be improved. But all that maybe a project for the future (if I'll find the time for it
Jansen_8
Regular Advisor

Re: backup directory tree with aliasses

Found a work-around