You are not logged in.

#1 2009-11-09 01:16:52

andreamer
Member
Registered: 2009-08-11
Posts: 41

HELP! trashed my system after restoring backup. can't load shared libs

Hello, before explaining please know i searched the forum for solutions but couldnt find any.

Please help, i need to work for tomorrow, My system is unusable, cant enter to DE and just get to the CL in tty1, cant do pacman or almost anything else.

The problem is this, I recently made a back-up following some tutorials to a tar file, I used this command:

tar -cvpzf /media/external_device/mybackup.tar.gz --exclude=/{media,home,dev,lost+found,mnt,proc,sys,tmp,}/* /

after making some configuration changes and installing new kernel i didnt like it so i tried to restore my previous system, also from tutorial:

sudo tar xvpfz /media/external_device/mybackup.tar.gz -C /

after rebooting i couldnt enter DE, and after almost every command it gives me an error.

cant startx, pacman, or connect to internet.

the errors are of the kind (multiple shared libraries):
startx => xauth: error while loading shared libraries: /usr/lib/libXau.so.6: file too short
pacman => error while loading shared libraries: /usr/lib/libcrypto.so.0.9.6: file too short

I guess it's something to do with symbolic links when i made the backup with tar, i checked some of the library files and they exist but are empty...

Last edited by andreamer (2009-11-09 01:55:56)

Offline

#2 2009-11-09 18:25:17

andreamer
Member
Registered: 2009-08-11
Posts: 41

Re: HELP! trashed my system after restoring backup. can't load shared libs

Ok, the problem is solved now, but i would like some tips for not making the same mistakes.

what i did was to copy /dev/* to my system from the livecd, because it needed /dev/console.
now i dont exclude /dev in my backup command.

still i had to manually change other things, because my user had no password apparently because /etc/shadow wass missing too, so i did the command "pwconv" to recreate it from /etc/passwd and then reset the passwords, it worked.

I also had to reinstall "sudo" and give my user permissions with visudo.

So, how should i do it for next time? what folders/files exclude or include and in what way?

So, how should i do it for next

Offline

#3 2009-11-10 01:31:53

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: HELP! trashed my system after restoring backup. can't load shared libs

it may be ok for _some_, but I would never, ever, never back up a 'live' filesystem. Yes, it may work (or seemingly do so) every time, but when you try to restore the lot ... that's a different beast alltogether.
_My_ idea of a back up would be to use a live-cd and backup the root filesystem (maybe not /home and not /var/cache (if archlinux)) to an external usb-drive. Whatever you have of 'private' files (probably in /home), I would back up on a more regular basis.
If you do a 'lsof' (list-open-files) - you may get a shock of how many files are actually opened at any one moment - many of these may be in a state where a lot of the content is still in cache ...

Offline

#4 2009-11-10 04:43:20

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: HELP! trashed my system after restoring backup. can't load shared libs

As perbh said, don't backup or restore a running system. Use a live CD or another GNU/Linux setup if you have one.

You might want to look at: Pacman - Backing up and retrieving a list of installed packages for quick restoration.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB