Difference between revisions of "Ubuntu - Doing Updates"

From Blue-IT.org Wiki

(Troubleshooting)
(2. Save home)
Line 19: Line 19:
 
Save this file to your backup media!
 
Save this file to your backup media!
  
=== 2. Save home ===
+
=== 2. Save Data ===
 
'''Logout !!!'''
 
'''Logout !!!'''
  
 
Switch to a terminal screen via '''Strg+Alt+F1''' and login with your normal username!
 
Switch to a terminal screen via '''Strg+Alt+F1''' and login with your normal username!
  
 +
==== Home ===
 
Then enter the following commands:
 
Then enter the following commands:
 
  cd /home
 
  cd /home
Line 32: Line 33:
 
Switch back to the graphical login screen with '''Strg+Alt+F7''' (sometimes F8) and login.
 
Switch back to the graphical login screen with '''Strg+Alt+F7''' (sometimes F8) and login.
  
 +
==== Evolution ====
 
If you are using '''evolution email''', it is a good idea to backup now your data with the evolution backup procedure which also generates a backup file!
 
If you are using '''evolution email''', it is a good idea to backup now your data with the evolution backup procedure which also generates a backup file!
 +
 +
==== Other Data ====
 +
Remember other data that is not stored in the home directory
 +
# databases (e.g. for mythtv)
 +
# programs or scripts in ''/usr/local/bin''
 +
# special customized scripts in ''/etc'' (e.g. in /etc/modprobe.d, /etc/rc.local, ...)
  
 
Now burn your backup files (don't forget the myselections file) from your desktop to a CD/DVD and/or - dependent to the size - to a backup drive. Be careful!!! Better save your data twice. A CD or DVD could be defective. The securest way is a backup onto an external hard drive.
 
Now burn your backup files (don't forget the myselections file) from your desktop to a CD/DVD and/or - dependent to the size - to a backup drive. Be careful!!! Better save your data twice. A CD or DVD could be defective. The securest way is a backup onto an external hard drive.

Revision as of 19:47, 17 October 2010

The Problems

A system upgrade via update manager is not working or not intended. Several ppa archives are installed. A complete new installation is needed.

Be warned: I am not responsible for any damage on you system or dataloss. I only can confirm, that I am doing ubuntu updates (formerly debian updates) with this method without any problems since years.

In any case

  1. Backup or keep your home directory!!!
  2. Be sure which ppa's you did install and if they are avaiable for your new distribution
  3. Remember your Username and Password (don't change this)
  4. Be sure you are connected to the internet

The best is to keep your home data on a seperate partition. Then you only have to select this partition during a new install and NOT (!!!) to format it.

In case you need a new install of the whole hard disk, this is very easy. Mount an external backup drive or insert a dvd. Save the following files onto that media.

1. Save Package informations

sudo dpkg --get-selections > ~/Desktop/myselections

Save this file to your backup media!

2. Save Data

Logout !!!

Switch to a terminal screen via Strg+Alt+F1 and login with your normal username!

= Home

Then enter the following commands:

cd /home
tar cjvf ~/Desktop/${USER}.tar.bz ${USER}

This creates a file called "yourUserName.tar.bz" on your Desktop.

Switch back to the graphical login screen with Strg+Alt+F7 (sometimes F8) and login.

Evolution

If you are using evolution email, it is a good idea to backup now your data with the evolution backup procedure which also generates a backup file!

Other Data

Remember other data that is not stored in the home directory

  1. databases (e.g. for mythtv)
  2. programs or scripts in /usr/local/bin
  3. special customized scripts in /etc (e.g. in /etc/modprobe.d, /etc/rc.local, ...)

Now burn your backup files (don't forget the myselections file) from your desktop to a CD/DVD and/or - dependent to the size - to a backup drive. Be careful!!! Better save your data twice. A CD or DVD could be defective. The securest way is a backup onto an external hard drive.

3. Install your new ubuntu

You can savely install your new ubuntu using and erasing (!) the whole partition using your old (!) username an password.

4. Recover

After you installed your new ubuntu (you can savely use the whole partition) do the same as above.

Copy back your backupfiles

Login to your new ubuntu with the same (!) username you used before. Establish an internet connection via the network manager.

Be sure you reenabled all your ppa archives. The easiest way is to to it in a terminal whith

sudo apt-add-repository ppa:YOUR_PPA/SUBDIR
sudo apt-get update

Copy the backup bakcup files from your backup media

  1. myselections
  2. yourUserName.tar.bz
  3. evt. evolution.tar.gz

to your desktop.

Now Logout.

Replay the backup

Switch to a terminal screen via Strg+Alt+F1 and login with your normal username!

Then enter the following commands:

cd /home
mv ${USER} ${USER}.save
tar xjvf ~/Desktop/${USER}.tar.bz

cd ${USER}/Desktop
sudo dpkg --set-selections < myselections
sudo apt-get dselect-upgrade

The last command could take a lot of time depending to your sources and internet connection.

Switch back to the graphical login screen with Strg+Alt+F7 (sometimes F8) and login with your username / password.

You should be able to login seeing your old desktop environment again.

Troubleshooting

Pulseaudio

Sometimes your audio might not work.

Deletion of the following folders / files might (!) help.

cd ~
rm -rf .pulse

Reboot and sound should appear (if there are no hardware restrictions).