1751903 Members
5243 Online
108783 Solutions
New Discussion юеВ

Copy dirs and files

 
SOLVED
Go to solution
vmsserbo
Super Advisor

Copy dirs and files

What is the simplest way to copy the Directories from one disk to another .

Ex. I need to move the contents of dka300 on to dka100 and then defrag the system disk using dka300, then move contents of dka300 back from dka100.

6 REPLIES 6
Andy Bustamante
Honored Contributor
Solution

Re: Copy dirs and files


You could use BACKUP to create a save set of DKA300 to copy to directory structure.

If there were a large amount of files on DKA300, I would probably copy dka300 to tape, use BACKUP/IMAGE to move the system disk to DKA300, switch DKA300 and the system disk and restore the tape to the "new" DKA300.

Why do you need to defragment the system disk?

Andy
If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
Jan van den Ende
Honored Contributor

Re: Copy dirs and files

Miles,

the way you formulate it
"then move contents of dka300 back from dka100.", am I to understand that you want to _ADD_ dka300 to dka100?
I do _NOT_ think that would be a wise move for a SystemDisk, because it would make you loose the structure, which would make it unusable as a system disk.
(Technically it _IS_ possible, but it would be WAY more delicate and complicated as what Andy suggested, should probably NOT be tried if you have to ask. Although, on a hobby system in your private time it WOULD be interesting and educational.

But I am also interested in Andy's last question: WHY?
There only VERY rarely is a serious need to defrag a VMS disk, even less a system disk.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
vmsserbo
Super Advisor

Re: Copy dirs and files

I want to upgrade the OS to V7.3 So, we have been defragin the system disk befor e the upgrade>
John Gillings
Honored Contributor

Re: Copy dirs and files

Miles,
You'd probably be better off defragging the disk AFTER the upgrade, as it will involve the movement of many files.

The best advice I can give is make sure you always have an immediate fallback every step of the way.

Also note that you CANNOT get a useable backup of your system disk while booted from it. You need to boot minimum VMS and take a standalone backup.

So, plan something like this:

1) Shutdown
2) reboot minimal
3) backup/IMAGE system disk to spare1
(spare1 is now your fallback)
4) reboot
5) perform upgrade
6) shutdown
7) reboot minimal
8) backup/IMAGE system disk to spare2
9) now physically swap the original system disk for spare2

You now have a clean, defragged, new system disk. You also have a fallback to immediately after the upgrade (though perhaps somewhat fragmented) and immediately before the upgrade.

Note that if you have a shadowed system disk you can take several shortcuts in this sequence.

A crucible of informative mistakes
Chinraj Rajasekaran
Frequent Advisor

Re: Copy dirs and files

Miles,

The best way to defrag the disk is

1. Do image backup and then
2. restore the backup

When you do the restore to the disk, The space for each file allocates contiguous space for all the files.

Anyway, for upgrade consider John's advise keep fallback option.

regards
Raj
John Gillings
Honored Contributor

Re: Copy dirs and files

Raj,

Sorry to disagree!

>The best way to defrag the disk is
>
>1. Do image backup and then
>2. restore the backup

If the backup is disk to disk, then skip step 2, just physically swap the disks. Don't overwrite the original.

If the backup is to tape them DON'T restore the tape to the same disk. If anything goes wrong you've lost everything. Tapes break, get chewed up or lose blocks. Power gets cut, systems crash. It's not worth the risk.

Perhaps restore it from tape to a different disk (but if you've got another disk then skip the tape and just go disk to disk!)

Bottom line here is storage is cheap enough these days that there is no need to ever "burn bridges". ALWAYS keep an immediate fallback, and NEVER overwrite anything that you don't have a confirmed, ready to spin copy of somewhere else.

The best way to defrag a disk is tune files so they don't get fragmented. Know your data, preallocate and specify appropriately large extend sizes.

Second best is to use a product like DFG so you don't have to take your system down or dismount the disk.

Finally, don't ASSUME that a VMS disk NEEDS defragging, most disks that aren't subject to outright abuse are probably OK. Install DEFRAG off a CONDIST and use the SHOW command to analyze the disk and see how bad it is (no license PAK required).
A crucible of informative mistakes