cancel
Showing results for 
Search instead for 
Did you mean: 

COPY Command

Sentosa
Frequent Advisor

COPY Command

Dear All,

I use the following backup command to copy directory (with sub-directories & many files) from one disk to another disk on the same node.

BACKUP/LOG SOURCE TARGET/BY_OWNER
-it can create sub-directories automatically & kept the original timestamp/owner for the files.

However, i need to copy directory from one node to another node.
I understood the COPY command is faster than the backup command.

Could anyone know that the COPY command can do the same function?
If yes, How to do?

Thanks,
Sentosa
8 REPLIES
Jan van den Ende
Honored Contributor

Re: COPY Command

Sentosa,

the COPY command can NOT do directory trees, so you will simply have to make do with BACKUP.
And even that will need a two-step approach, because you can NOT specify a directory tree at the remote node.
Using DECnet, you specify a BACKUP save-set at the remote node, and at that remote node, you unpack the save_set.
If you are limited to TCPIP (without Decnet-over-ip), it even is three (4) steps: Make a local save-set; ftp it over; at remote (reset the file attributes and) unpack the save_set.

Sorry, no shortcuts available.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Robert Gezelter
Honored Contributor

Re: COPY Command

Sentosa,

I concur with Jan. BACKUP is the only tool that will copy directory trees, and that feature is not available node-to-node without going through an intermediate save set.

There are some things that can be done to improve the performance of BACKUP to a save set. What version of OpenVMS is being used.

- Bob Gezelter, http://www.rlgsc.com
Sentosa
Frequent Advisor

Re: COPY Command

Hi Bob Gezelter,

I used OpenVMS v7.3.2

Thanks,
Sentosa
Robert Gezelter
Honored Contributor

Re: COPY Command

Sentosa,

As a general rule, I make it a point of overriding the file extension size and buffering factors on the remote side of the DECnet connection.

The following line in the LOGIN.COM file will reset the buffering, blocking, and file extension defaults for NETWORK logins:

$ IF F$MODE() .EQS. "NETWORK" THEN $ SET RMS_DEFAULT/BLOCK_COUNT=x/BUFFER_COUNT=y/EXTEND_QUANTITY=z

Personally, for BACKUP save sets of significant size, I often use 10,000 or larger extend sizes. Buffering and blocking factors are a different matter of discussion, but I often use tens of blocks in either case.

I hope that the above is helpful.

- Bob Gezelter, http://www.rlgsc.com
Jan van den Ende
Honored Contributor

Re: COPY Command

Sentosa,

>>>
BACKUP/LOG SOURCE TARGET/BY_OWNER
<<<

Realise, that /BY_OWNER is a tricky qualifier.
On the source spec, used without the =, it specifies to select only files owned by the owner of the issuing process.
As a target qualifier, it specifies that the created files are to be owned by the restoring process.
Of course, it is entirely possible that this is what you want, but much more often, it is desired to NOT change things, or create target owned by a specific owner.
Then use target/BY_OWNER= ...
Special keywords here: /BY_OWNER=ORIGINAL and /BY_OWNER=PARENT. For PARENT it is customary to create the top directory first, with the required ownership.
If you want to retain security definitions (protection & ACLs) you are limited to using /BY_OWN=ORIG.

Another qualifier that gets little attention, but can have great value: /TRUNCATE.
Whenever the clustersize of input and output device are different (or HAVE moved some time in the past between differing clustersizes) the default behavior is round the ALLOCATED size UP to the next cluster multiple. /TRUNCATE uses (for sequential files) the USED file size.
And before VMS V7.2 the default and minimum cluster sizes for the (then) big disks were (un-)pretty big!

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Sentosa
Frequent Advisor

Re: COPY Command

Hi All,

Thanks for your information.

If i copy a file with attribute (i.e. file owner & file permission) to a remote node using command "COPY", Could anyone know the actual parameters?

thanks,
Sentosa
Volker Halle
Honored Contributor

Re: COPY Command

Sentosa,

please note that DCL COPY does not propagate file ownership, protection and ACL information - neither locally nor to a remote node. The file ownership, protection and ACL information depends on the user context and the default ACLs on the remote node.

Using BACKUP can keep the original protection and ACL information. Note that this also depends upon whether the user and identifier are present and the same on the remote system.

Volker.

Sentosa
Frequent Advisor

Re: COPY Command

thanks