How to recover an executable?

Mike McCarty mike.mccarty at sbcglobal.net
Mon Jan 23 21:02:58 UTC 2006


Anne Wilson wrote:
> Following the instructions in a book, I did
> ln -s mta /usr/sbin/sendmail.postfix
> which has exactly the opposite result to what is required, overwriting 
> the executable with a link.
> 
> Is there any way of recovering the executable or must I reinstall 
> postfix?

I see you have some help in another direction already, so...

The very best way to recover from a goof like this is from
your backup. Given your message, I suppose that you don't
have one. So, my suggestion is...

Start making backups, and start doing it today.

Here's a script I use for my backups. I'm sure it won't be
quite what you need, but it might give you a start.
I use "su -" to become root, and I have this script in
/root, for use by root. This is probably best run in
single user mode, but I usually just close all windows
and open one terminal window and run from there.

=======================================================
#!/bin/bash

# Create backups of /etc, /home, /usr/local, and...
PATH=/bin:/usr/bin

#omitteddirs = "/srv /var/backups /var/games"

backupdirs="/boot /etc /home /opt /root /usr/games /usr/local \
     /usr/src /var/lib /var/local /var/log  \
     /var/mail /var/spool /var/tmp /var/www"

echo "System backup beginning" | wall

mv -f /var/backups/backup.tgz /var/backups/backupsave.tgz
mv -f /var/backups/backup.lst /var/backups/backupsave.lst

tar czf /var/backups/backup.tgz $backupdirs

echo "System backups complete, status: $?" | wall

echo "Now verifying system backups" | wall

tar tzf /var/backups/backup.tgz 1> /var/backups/backup.lst && \
         echo "Verified, please burn backup /var/backups/backup.tgz to 
CDROM" \
              | wall || \
         echo "BACKUP FAILED" | wall
=======================================================

I use compression, which is somewhat risky, but it makes
my entire backup fit onto a single CDROM.

If this is not adequate for you, then I suggest you
investigate http://www.bluehaze.com.au/unix/cdbkup.html

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list