Operating System - OpenVMS
1753267 Members
5151 Online
108792 Solutions
New Discussion юеВ

Re: Backup volume to subdirectory

 
SOLVED
Go to solution
Shriniketan Bhagwat
Trusted Contributor

Re: Backup volume to subdirectory

Hi,

[*...] only selects the directories which contains files and subdirectories and not the empty directories, where as [000000...]*.*;* selects all the files in the volume. You can feel the difference just issuing the $ dir on both the specifications. This is how the RMS wildcard operation works and hence BACKUP should also work in the same lines. As Murali demonstrated, in this case [*...] and [000000...] is preserving the entire directory structure may be a trick with wildcard to use. What version of VMS are you using?


Regards,
Ketan
Jan van den Ende
Honored Contributor

Re: Backup volume to subdirectory

Hohn, Murali:

>>>

BACKUP source:[000000...]*.*;* dest:[000000...]*.*;*
<<<

I strongly advise against that!

As long as dest is a physical device, it is OK, but when dest is defined as DEV:[DEST.] (a conceadled device derived from a directory, you will now create an actual DEV:[DEST]000000.DIR, after which all bets are off.
I have had to deal with several of such occurrences, and repaires are time-consuming at best. (and if it happens to occur on SYSTEM DISK volumes, consider yourself lucky if repair can be done without a full re-init and restore!)

I strongly recommand to always use
$ BACKUP concdev1:[*...] concdev2:[*...]
or for one dir out of concdec1:
$ BACKUP concdev1:[dir...] concdev2:[*...]
I never yet met a situation where it was not possible to easily define (maybe temporarily) concdev1 & concdev2 suitably.

If needs arises, to rename the top dir, output may be chosen as concdev2:[dir2...]

Note that BACKUP/BY_OWN=ORIGINAL maintains all ownerships, protections, and ACLs for you.

Just my EUR 0.02

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
P Muralidhar Kini
Honored Contributor

Re: Backup volume to subdirectory

Hi Jpe,

>> BACKUP source:[000000...]*.*;* dest:[000000...]*.*;*
>> I strongly advise against that!

I agree with you.
I would rather prefer -
$ backup source:[*...] dest:[*...]

This command may work find for "source:[*...]".
But in case you want to backup contents of a particular directory in the disk
(i.e. source:[test...]*.*;*) then it will again give problems.
Check my attachment in my previous reply.

There was this time when i had to move some set of files from one disk to
another. The source directory had a lot of files and directory in it.
I ran in to problems using "[000000...]*.*;*" in the source and destination
of the BACKUP command.

I ended up writing my own command procedure, which would take as input the
"DIR [...]" of the source directory. It would then parse it and create directory at
the destination followed by copy of files from source to destination.
So much work to just copy files around!

Regards,
Murali
Let There Be Rock - AC/DC
John McL
Trusted Contributor

Re: Backup volume to subdirectory

Norm, you mention "$ backup/log/ignore=inter dsa1:[000000...] dnfs3:[0514...] does not preserve directory tree. It creates directories, but not subdirectories"

I can't say that I'm surprised. The presence of the top level directory [000000] is often ignored when you are dealing with a directory just below it (e.g. [000000.HANSEN] will be processed as if it was [HANSEN]). My guess is that BACKUP establishes whether it's a directory tree or not from the first file that it processes and it doesn't repeat the test every time.

I wonder if [000000.*...] would do what you want? I've thought of this while I typed the above, but maybe someone else has already suggested it; unfortunately I can see all the postings while I'm replying.
Norm Hansen
New Member

Re: Backup volume to subdirectory

Thanks to everyone for the input.

RBrown answered the original stated question with something that works. I had tried something similar, but had not been able to get it quite right.

Several people have spoken to advantages of save sets, which would be answers to the followup question. I'll try it out with save sets and see whether the de-dup will work in real life with an aggregated file.
Norm Hansen
New Member

Re: Backup volume to subdirectory

Top points to RBrown for first submitting the concealed logical solution.

High points to P Muralidhar Kini for first pointing out wildcards on both sides. I had expected that this would proceed from current subdirectory (instead of root) on source volume, but it seems to work as advertised.

Also points to those who discussed save sets and contributed pros/cons on backup syntax.