Difference between revisions of "Ubuntu - Doing Updates"

From Blue-IT.org Wiki

(4. Recover home)
Line 8: Line 8:
 
# Be sure which ppa's you did install and if they are avaiable for your new distribution
 
# Be sure which ppa's you did install and if they are avaiable for your new distribution
 
# Remember your Username and Password (don't change this)
 
# Remember your Username and Password (don't change this)
 +
# 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.
 
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.
Line 43: Line 44:
 
==== Copy back your backupfiles ====
 
==== Copy back your backupfiles ====
 
Login to your new ubuntu with the same (!) username you used before.
 
Login to your new ubuntu with the same (!) username you used before.
 +
Establish an internet connection via the network manager.
  
Copy the backup of your home directory (''yourUsername.tar.bz'') and the paket selections (''myselections'') to your desktop.
+
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
  
==== Reselect archives ====
+
Copy the backup bakcup files from your backup media
Be sure you reenabled all your ppa archives and all package sources you previously had.
 
Login and copy your backuped files
 
 
# myselections
 
# myselections
# youUserName.tar.bz
+
# yourUserName.tar.bz
 
# evt. evolution.tar.gz
 
# evt. evolution.tar.gz
to your Desktop.
+
to your desktop.
 +
 
 +
'''Now Logout.'''
  
 
==== Replay the backup ====
 
==== Replay the backup ====
Line 59: Line 63:
 
Then enter the following commands:
 
Then enter the following commands:
 
  cd /home
 
  cd /home
 +
mv ${USER} ${USER}.save
 
  tar xjvf ~/Desktop/${USER}.tar.bz
 
  tar xjvf ~/Desktop/${USER}.tar.bz
 +
 
  cd ~/Desktop/${USER}
 
  cd ~/Desktop/${USER}
 
 
  sudo dpkg --set-selections < myselections
 
  sudo dpkg --set-selections < myselections
 
  sudo apt-get dselect-upgrade
 
  sudo apt-get dselect-upgrade
  
This could take a lot of time depending to your sources.
+
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.
 
Switch back to the graphical login screen with '''Strg+Alt+F7''' (sometimes F8) and login with your username / password.

Revision as of 19:42, 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 home

Logout !!!

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

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.

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!

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 ~/Desktop/${USER}
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

Sometimes your multimedia might not work.

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

cd ~
rm -rf .pulse