cancel
Showing results for 
Search instead for 
Did you mean: 

DC migration.

SOLVED
Go to solution
himacs
Super Advisor

DC migration.

Hi Admins,

We have DR migration activity scheduled coming week.All the DBs ,apps will be starting in DR,similar to Production boxes.

Now i want to compare 2 mount points including the sub directories.If any directory not available in DR similar to prod, we have to create it.

Please let me know the simplest way to compare 2 mount points including sub directories.

Regards
himacs


6 REPLIES
Jose Mosquera
Honored Contributor

Re: DC migration.

Hi,

If mount points belong to same server you can use dircmp command.
To compare the two directories /slate and /sleet and produce a list ofchanges that would make the directories identical:
#dircmp -d /slate /sleet

To extra info:
#man dircmp

Rgds
James R. Ferguson
Acclaimed Contributor

Re: DC migration.

Hi:

You don't offer the mechanism by which you will replicate data ('cp', 'cpio', 'tar', pax', 'fbackup', LVM mirroring, etc.

That said:

Should you wish to further compare *directory* sizes, don't.

The size of directories on your source system may be larger than the destination system. This is quite normal. Disk blocks allocated to directories are not deleted when the file metadata they contain is removed because the corresponding file is removed.

As for the sizes of individual files, beware comparing those too. Sparse files may be "inflated" depending on the copy mechanism you use. The 'cksum' will not change, though.

The 'dircmp' comparison suggested by Jose is a good check.

Regards!

...JRF...
himacs
Super Advisor

Re: DC migration.

Hi Admins,

Thanks for the responses.

Actually i don mind about size.

I want any clue for a script that lists only directories under mount point.if there are sub directories script should give absolute path also.

Regards
himacs
Zinky
Honored Contributor

Re: DC migration.

A DR Strategy that involves comparing directory structures is at best indicative of flawed and poor procedures and processes in place.

Directory comparison tools work very slow. Besides - if it were a REAL disaster - you would not have PROD to compare with - don't you?

Best Practice is to ensure your BACKUPS are good and current so whatever you need to re-CREATE at DR is complete -- no asking if all dirs and subdirs, etc have been created.

Cheers
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Jose Mosquera
Honored Contributor
Solution

Re: DC migration.

Hi,

To see a directory tree from /mount_point:
#find /mount_point -type d -exec ls -d {} \;

or with extended ls -l command format:
#find /mount_point -type d -exec ls -ld {} \;

Rgds.
himacs
Super Advisor

Re: DC migration.

useful thread.Thanks to all

Regards
himacs