Operating System - Linux
1827808 Members
2055 Online
109969 Solutions
New Discussion

Files structure change based on the instance

 
bruceedgar
Occasional Advisor

Files structure change based on the instance

Hi Experts ,

I need a favour from you , I have a dump of a instace which contain lots of directories and files , I would like to extract that dump for another instance , The dump will have the strucetue of the old instance Iw ould like to change it to new instance structure .

How to find what are the changes has to be made to get the new instance structure.

Searching and repalcing the strings in a houge file structure is not an easy thing so please suggest me to get optimised.

Thanks & Regards

Bruce.
4 REPLIES 4
Peter Nikitka
Honored Contributor

Re: Files structure change based on the instance

Hi Bruce,

your request is highly missing specific information:
- what dump you are talking about, what dump program was used, what are your basic data the dump was created from?
- what is the relation of (directory) structure to dump?
- do you want to change the structure or its contents or both?
- what do you search and what is the replacement you want to make? Examples?

MfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
A. Clay Stephenson
Acclaimed Contributor

Re: Files structure change based on the instance

Do a "man dircmp" and see if that suggest anything useful though I doubt it will.

My approach (based upon your limited description of the problem) would be to sort the two files into two new files. The good news is that "/" collates before any alphanumerics so directories should sort together. I would then feed these two files to "sdiff -s" and that should at least be a starting point.
If it ain't broke, I can fix that.
bruceedgar
Occasional Advisor

Re: Files structure change based on the instance

Thanks Peter and Clay,

Actually Iam installatin the software ematrix and rmi for one instance , I would like to take the dump of it after installation and resue it in feature , so taht i can minimize the installation time , but it will differ for each instance , Thats why i wolud like to find the difference in path level and file level , If i find it i can replace them based on the new instance.
A. Clay Stephenson
Acclaimed Contributor

Re: Files structure change based on the instance

Ok, my approach would be to get one system just like I like it and back it up using tar, cpio, pax, fbackup, whatever --- pax might be a good choice if you need to do filename substitution but that really shouldn't be necessary. The key is to not do an absolute path backup but rather a relative path backup. Your copies would then be a restore starting from the top-level directory of your choice.
If it ain't broke, I can fix that.