URGENT: restore a delete file!

I've just delete a script.ksh on my aix. Is there a way to restore it again

thanks
sminfoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sminfoAuthor Commented:
weell, I really make an  error when doing a link, so it delete the script.. the script.ksh is now a link instead a file... damn!
woolmilkporcCommented:
Hi,
I assume you don't have a current backup? And I assume you deleted the file using "rm" at the commandline (not the graphical "dtfile" or the like)?
If so, and if you actually don't have a backup, things are going to get really complicated or expensive, because AIX has no straightforward mechanism to recover deleted files.
There is a company offering a commercial undelete product for AIX - http://www.compunix.com/prod/analyse.html
Prices go from 2.500 EUR to 4500 EUR.
You can try it using by yourself the filesystem debugger "fsdb". It's awfully complicated, but will work in most cases, given that you follow accurately the steps outlined in this paper - http://www.faqs.org/faqs/aix-faq/part1/section-54.html
Note that you will have to umount the filesystem! If this is not possible, you're lost!
Alas the above article deals with legacy jfs. There are some differences in fsdb when it comes to jfs2. Consult the section "JFS2" subcommands" in "man fsdb" to learn about these differences, if some command mentioned in the article doesn't work as expected.
 Please let me know what you're going to do and don't hesitate to ask for assistance!
 Good luck!
 wmp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sminfoAuthor Commented:
well.. I had to make again the script, I had luck because I try  to split scripts regarding it functionality, so I delete the main.ksh.  let me ask you some questions:

- Is there a tool similar to monit in aix?
- Is there a tool to clean temp  unused files and cores files?
- I see rpm is install on my system, is this rpm similar to redhat's? Where can I find aix'rpms files? Can I install a rpm file dependencies like redhat's yum does?
-Is any mail cliente for console similar mutt, or pine in aix?
-last, (for now :-), I have to install mysql, is mysql part of aix, or I have to compile it?

thanks wmp
woolmilkporcCommented:
1) No. For processes started via "inittab" at system startup you can set the "respawn" flag to have them restarted after a failure. That's all, and I'm not aware of a monit port to AIX either.
2) Yes. It's /usr/sbin/skulker, a script from IBM to clean up spool files, old mailq entries, /tmp and /var/tmp stuff, news, core files etc. There is already an entry for it in root's crontab which you only need to uncomment.
3) Yes, rpm is a port of redhat's rpm to AIX. The main repository for AIX RPMs is the AIX toolbox which comes on CD with the OS, and whose contents can be downloaded here -  http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html
There is another great source for AIX RPMs here - http://www.perzl.org/aix/ 
3a) You will have to live with RPM's dependency hell, unfortunately.
4) There is mutt and there is pine in the AIX toolbox (see above). I'd recommend mutt, because pine has too many dependencies, imho.
5) No, mysql is not part of AIX. There is a version on the toolbox, but only 3.23.58. Newer versions must be compiled. GCC and friends are available on the toolbox and at perzl.org.
Thx for the points! Glad to hear that you could recreate your work. fsdb is really horrible, a true last resort.
How about regular backups in the future?
Cheers
wmp
 
sminfoAuthor Commented:
We have backups here, I deleted a personal rbac script when moving from one side to another. Fortunately I was the only affected. This script calls other 10 scripts which are separately in the same folder. I have to backup my scripts... thanks wmp
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.