Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Last night I did rm -Rf /tmp as root. I wasn't drunk. But I definitely feel I was dumb to do so. Now X doesn't work. I read few days back that after doing rm, one can't recover the lost data. I mounted a USB stick but it doesn't show up in /media directory. I need to backup the data in /home folder. I think I can recover that data by some live usb.

Is there a way to backup the rpms that are installed on Fedora machine? I wish to save bandwidth. So if it's possible, I'd prefer saving all the installed rpms in a directory and then re-installing them simply by doing rpm -i. I earlier posted this question but YUMonCD package doesn't work fine on my Fedora 14. I found this to create a list of installed rpms and then re-installing it after formating. But it doesn't save any bandwidth for me.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Just recreating the /tmp directory with proper permissions should do the trick.

mkdir /tmp
chmod 777 /tmp
chmod +t /tmp

/tmp does not contain any crucial data that needs to be kept intact between reboots, but it is crucial for quite a number of applications that the directory exists and can be written to.

share|improve this answer
    
Wow!!! You're the savior... Thanks a lot.. Can't express the gratefulness in words.. You saved me from formatting. –  Dharmit Apr 11 '11 at 9:30

RPMs that are downloaded and installed by yum are stored in /var/cache/yum/<repo name> so just back up those directories if you need to.

EDIT: you have to set keepcache=1 in /etc/yum.comf if you don't want the downloaded rpms to be deleted after successful installation.

share|improve this answer
    
I think it's "yum.conf", not "yum.comf" –  user7538 May 17 '11 at 6:26

There is a new version of yumoncd in this link http://sourceforge.net/projects/yumoncd/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.