1

I was working on a ubuntu 12.04 server, testing to restore a backup (how ironic, I didn t done the "real" backup).

Tried a rsync with --delete flag on /, I ctrl+c almost immediately, but rsync prompted a lot of files to be deleted (enought for putty to can t handle it all).

Is there any way to restore the system in a stable state?

I DO NOT ASK ABOUT RESTORING DATA, thoses are gone and I don t care about them, only about getting back to a stable system. I can t access physically the server to make a clean reinstall easily, any other way (or definitive no) is worth it.

1 Answer 1

1

Ouch :-(

If there's enough of a system left for it to run, you could try

apt-get --reinstall install `dpkg -l | awk '{print $2}'`

It's pretty drastic stuff, but it sounds like you're in a pretty drastic state. Good luck.

6
  • Well, it do is still running, so I can try.
    – DrakaSAN
    Mar 5, 2014 at 16:28
  • Just wondering what it does exactly? It reinstall dpkg which tell awk to do... I don t know.
    – DrakaSAN
    Mar 5, 2014 at 16:29
  • 1
    It tries to force a reinstall on all installed packages... but it depends on certain things still being there, so it might not work for you if your rsync got too far.
    – Flup
    Mar 5, 2014 at 16:30
  • /var/lib/dpkg/statu is missing, preventing dpkg from starting. (Also, ask me for superuser when I m root)
    – DrakaSAN
    Mar 5, 2014 at 16:39
  • Ugh I'm sorry to hear that. If it was me I'd bite the bullet and reinstall. Any time spent negotiating the physical access problems will be dwarfed by a manual repair and sorting out the myriad problems you'll face further down the line.
    – Flup
    Mar 6, 2014 at 8:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .