0

The /bin folder of my linux system was accidentally deleted as a superuser. Now the system is corrupted, and restarting it will collapse the system. There are some stackoverflow posts which list what can be done in such case to restore the bin folder. I have tried them and it does not seem to work for my case. Therefore, I would like to backup all my data and softwares, and clean install the OS. My question is how do I create a backup of my data and softwares, and how is the backup restored once the clean install is successful? Using external softwares to back up is not an option now because my system denies permission if I try to do that.

  • What have you tried already, that didn't work? If all your personal data is in your old home, then at least saving only that directory should be possible, I'd use a live ISO/USB/DVD. Lots of program config info is in your home already, but some things in /etc might be of interest (fstab, apt/sources...) – Xen2050 Jan 11 at 5:37
0

There are are a few ways to solve this problem. If you don't have a lot of data and still have an Internet connection and another host with ssh, the easiest way might be to scp the data to the new site (scp is in /usr/bin, not /usr/local/bin).

A more general way would be to remove the disk from your computer, install a new disk and rebuild the OS. Once you have done this, connect up the old disk - which should hopefully find the partitions and auto-mount them, and you can then drag-and-drop the data. This does assume that the drive is not encrypted. (If the drive is encrypted, and you know the key, it can still be done, but might be harder depending on the distro)

  • Does the rebuilted OS need to be the same version as that of the original OS? – dipankar Jan 11 at 16:00
  • No. The only requirements are that the hardware, abstraction layers (if applicable) and filesystem type are known by the new distribution. Generally this is not a problem, and certainly newer versions of distribution are typically backwards compatible. (Abstraction layers are things like LVM, and RAID, if implemented.) – davidgo Jan 11 at 17:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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