Rolling back Software


7 posts
by myminimonster » Sun Dec 30, 2012 11:19 pm
Hi everyone.
I am new to my Pi and have been playing around with it for the last few days.

I was installing some software one by one. As i am new to the file system and how Linux works was creating a SD card backup after each package was installed.

I installed apache2, php, proftp and then took a backup. I got into some difficulty installing mjpg-streamer. On the list below I couldn't get it to work on step 5. As a result i shut the pi down, formatted the flash and restored the back before downloading the mjpg-streamer file. However after the restore i see the file is still in my files. I can't work out how it go there as i had not downloaded it before the backup and had formatted the SD, so i was expecting it to have gone.

This was the reason for me taking the backups as i progressed to be able to roll back.
Does anyone know why this is happening? I'm sorry if its expected but as i said i have only dabbled with linux in the last day or two.

1 wget http://www.bobtech.ro/get?download=36:mjpg-streamer-rpi
2 mv get\?download\=36\:mjpg-streamer-rpi mjpg-streamer-rpi.tar.gz
3 tar -zxvf mjpg-streamer-rpi.tar.gz
4 cd mjpg-streamer
5 sudo nano mjpg-streamer.sh
6 ./mjpg-streamer.sh start


Thanks in advance.
Adrian
Newbie
Posts: 33
Joined: Sun Dec 30, 2012 11:08 pm
Location: Midlands UK
by bgirardot » Mon Dec 31, 2012 2:38 am
Definitely not the way it should work.

How were you doing the sd card back ups?

How did you do the restore?

My guess is you might have only been backing up the /boot partition that windows can see, and then only formatted and restored the /boot partition.
Posts: 517
Joined: Wed Oct 10, 2012 6:20 am
Location: Switzerland
by myminimonster » Mon Dec 31, 2012 10:35 am
Hi,

Thanks for the reply.

I was using win32diskimager-binary on a windows machine to take the backup by putting c:\xxxxx in the img file box and using the read option. Before doing this i had formatted the Sd card on a windows machine.

To restore I formatted the same but highlighted the .bin file, to restore from and selected 'write'.

I will retrace my steps and check.
So your understanding is that is should have rolled back everything including any installed files.

I first noticed such when i first installed proftpd. I was prompted with an option for inetd or standalone. I selected the wrong one and therefore went back to a restored config but when attempting to reinstall proftpd i didnt get the option again.

I will recheck but your thoughts would be good on how it should behave.
Thanks for your time
Adrian
Newbie
Posts: 33
Joined: Sun Dec 30, 2012 11:08 pm
Location: Midlands UK
by ghans » Mon Dec 31, 2012 11:03 am
On a related note , why wouldn't normal package
managment enough for you ? (remove , purge etc.)
Or if you compile from source , checkinstall ?


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 3901
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by myminimonster » Mon Dec 31, 2012 12:50 pm
HI ghans,

thanks for your reponse.
As mentioned i am totally new to linux and am unsure on how the OS works.
Does a apt-get remove <program name> remove all existance of a program or does it leave any trace of it somewhere?
What does the purge option do.
Sorry for my lack of knowledge
Adrian
Newbie
Posts: 33
Joined: Sun Dec 30, 2012 11:08 pm
Location: Midlands UK
by ghans » Mon Dec 31, 2012 12:58 pm
apt-get purge packagename removes packagename and
configuration files
apt-get autoremove removes all unused packages (who
remained as a result of above
command)

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 3901
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by myminimonster » Mon Dec 31, 2012 1:13 pm
Ok thanks thats great.

I think i have found out what i was doing wrong.
I was reading the SD card and saving it as a *.bin file. I'm not sure what gave me the idea to use .bin but now i have realised it should have been *.img.

Only realised today when i'm am following some steps to upgrade the img onto a bigger SD card.

Thanks for your help. I will try to remove the unwanted package using the commands you suggested above.
Its going to be a lot easier as the img creation is taking a lot longer than the incorrect .bin backup i was taking :oops:


Adrian
Newbie
Posts: 33
Joined: Sun Dec 30, 2012 11:08 pm
Location: Midlands UK