Operating System - OpenVMS
1753308 Members
6711 Online
108792 Solutions
New Discussion юеВ

Re: Problem understanding backup script

 
SOLVED
Go to solution
nipun_2
Regular Advisor

Problem understanding backup script

Hi,
I have Openvms 7.3-2 and I am trying move data older than 1-june-2007 from Folder A to another Folder B.

Now in folder A there are lots of subdirectories and files

I used the following script

$ user_acct = "Acct1"
$ backup /del /before=1-jun-2007 -

disk1:['user_acct'.FolderA...]*.*;* -

DISK2:['user_acct'.FolderB.FolderA...]*.*;*

===============================
The result it copied all the files but NO directories ??? I am not sure if the files inside the sub directories of FolderA were copied or not

Any idea as to what I am doing wrong ?

4 REPLIES 4
Steven Schweda
Honored Contributor

Re: Problem understanding backup script

> The result it copied all the files but NO
> directories ???

So? And the date-times of these directories
were ...?

> I am not sure if the files inside the sub
> directories of FolderA were copied or not

You want _me_ to tell you? So far as I can
tell, only _you_ can see what's in these
directories, and you don't seem to want to
tell anyone.

Adding "/LOG" to the BACKUP command should
tell you what's happening as it happens.

> Any idea as to what I am doing wrong ?

With almost no useful information to work
with, what did you expect anyone to tell you?
Hoff
Honored Contributor

Re: Problem understanding backup script

I'd suggest posting up the actual and full text DCL of a reproducer, as well as the dates on the various files.

BACKUP is one of the most confusing and complex commands, and the command is quite sensitive to the syntax. Careful reading of the manuals and the finding and following of the command examples in the manual can be a valuable technique for working with BACKUP.

Until you get this working, I'd suggest avoiding /DELETE, and I might also select (at least) /LOG here, too.

It is also likely that your directories have been modified since 1-Jun-2007, so they'd not likely be selected with the /BEFORE. (/BEFORE assumes /MODIFIED, unless another time is selected as the target.)
Jan van den Ende
Honored Contributor
Solution

Re: Problem understanding backup script

nipun,

>>>
$ backup /del /before=1-jun-2007 -

disk1:['user_acct'.FolderA...]*.*;* -

DISK2:['user_acct'.FolderB.FolderA...]*.*;*
<<<

Is this the _EXACT_ command you used?
Did you re-type it, or use copy-paste?

(Note Hoff's remark on BACKUP complexity, if the acual command was not EXACTLY as presented here, the behavior COULD have been different!)

_IF_ this was the full, excact command, then I would expect any DIRs _within_ [.FOLDERA...] _THAT HAVE ANY FILES IN THEM THAT QUALIFY THE SELECTION_ to be needed, and thus created, with the current date of command execution.
Any DIR file which itself qualifies follows the rule above.
Any DIR file which itself is newer, and does _NOT_ contain any files that needs copying, is NOT copied.

Bottom line: Any file created before=... (same for any other selection qualifier) gets selected.
If in the course of performing that copy a directory that does not exist/has not yet been created will get automatically created.

hth

Proost.

Have one on me.

jpe


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

Re: Problem understanding backup script

Thank you all for your efforts and your patience in working with the limited information.