Home Wiki > SDB:How to migrate to a new openSUSE version
Sign up | Login

SDB:How to migrate to a new openSUSE version

tagline: From openSUSE

Documentation > How to migrate to a new openSUSE version
This article should help those that want to upgrade their openSUSE version by performing a clean installation, keeping personal data and settings. Other methods are the Upgrade option available when booting from the DVD or a distribution upgrade via zypper. The method described here can also be used to migrate from a different Linux distribution.
Tested on openSUSE Recommended articles Related articles

Icon-manual.png Icon-help.png

Preparing the migration

Backup your data

Your users reside in /home/<username>. So if you want to make sure that absolutely nothing gets lost, you have to copy those to some external media. You will have to backup everything within /home if you do not use a separate partition for it.

Backing-up data is a bit different than just copying. Make sure that you preserve the user and permissions of the files, if not you will end-up with read-only settings-files your new system cannot write to.

If you burn your files to a DVD, tell the burning application that you are doing a backup. In K3B you can do this in the dialogue that pops-up when you click on Burn by going to the Filesystem tab, clicking on the Advanced-button next to the filesystem setting and ticking the checkbox for Preserve permissions (Backup).

If you want to copy all of your user's files to an external harddisk, it's easiest to do it via a konsole. Make sure your external harddisk is mounted and accessible. If you did not change anything, it can be found in /media/<folder_of_your_external_harddisk>. You can find out by navigating through your system with your favourite filemanager. If you know the path to your external harddisk, just open a konsole and do:

$ su
# cd /home
# cp -r -b -vvv username_to_be_backed_up /media/<folder_of_your_external_harddisk>

This will copy the whole user's folder to the external harddisk. If you are logged in as the user whose data you copy to an external harddisk (not burning them), you should not have to worry about files' permissions.

Note: with those options cp will preserve mode attributes (read, write, etc.) of files and directories but not ownership (user, etc.). If you want to preserve mode, ownership and timestamps use option -a instead of -r, and an exact backup of selected home data will be created. If you want to overwrite the old versions of files inside <folder_of_your_external_harddisk>, please omit the option -b.

But, if you are updating an old backup of the selected home directory, it will be a lot faster if you replace cp with rsync. E.g.:

# rsync -a -b -vvv username_to_be_backed_up/ /media/<folder_of_your_external_harddisk>
parameters have the same mining, just keep the trailing slash in username_to_be_backed_up/ or data will be copied inside /media/<folder_of_your_external_harddisk>/username_to_be_backed_up.

If you just backup your own user, you do not need to use su.

Selective backup

Backing up everything is the safest method, but might not be necessary. You can copy files manually from your user's folder to the external harddisk. The tricky bit is to know which folder holds what data.

There are the non-hidden files, i.e. those you see, they are straight-forward. Yet there are some important ones that one might forget about.

your.username.revoke - If you created and published an encryption key, you need this file to revoke it

There are hidden folders and files as well. To see them, open your filemanager and enable Show hidden files, which in KDE's Dolphin is situated in the View-menu or can be toggled via ALT+..

The hidden files and folders' name start with a ".". You can back them all up or select those you know are important. Their names are mostly straight-forward:

.kde - KDE3 settings
.kde4 - KDE4 settings
.mozilla - Thunderbird/Firefox settings
.gnome - Gnome settings
.bogofilter - Bogofilter spam-tool settings
.ssh - SSH key
.gnupg - encryption keys for encrypting/signing emails and files, also used by front-ends such as kgpg.
.ooox - OpenOffice settings
.strigi - desktop search indices

Remembering partitions

Your harddisk is divided into so called partitions. You might have one with your Windows on it, another for your Linux and yet another for your data.

To find out, open a konsole and execute:

$ df

You will see a list of all partitions. You need to write down their partition, e.g.

/dev/sda1 = /windows/C
/dev/sda2 = / (Your linux sysstem)
/dev/sdb1 = /home (your users)
/dev/sdb4 = SWAP

If you do not see any /dev/sdX = /home but just /dev/sxyz = /, then you must backup all data within /home since everything in there will be lost! The reason is that a new installation will format the partition the main system is put on, i.e. the root/system partition (/). If your /home folder is not on another partition, i.e. does not have its own /dev/sdX, it is part of the system partition and thus lost when the latter is formated during the installation.


Make sure your webcam, printer etc. are attached and switched on, otherwise the installer cannot detect them.

Start the openSUSE installation and pick new Installation instead of Upgrade. The important bit about the installation is to make sure that the installer gets your harddisk partitions right. So check twice, if it assigns the correct mount-point to the partitions, i.e. that for the example above /dev/sda2 is mounted as /. Same for /home.

The installer will mark all partitions it will format with a F and red font-colour. Make sure it only formats / and not /home. If done correctly, this will result in a new installation of the linux system on '/ but your users, which are on /home will be preserved.

In case the installer wants to resize your partitions you will have to change its recommendation. Make sure to assign the existing partitions to the correct mount-points and only format /.

If asked for a username, pick the same username you used before, the installer will re-use your old data from /home/<username>.

Subsequent work

If everything went as expected you do not need to copy anything from your backup to you system, as everything in your users' folder was preserved.

However you do need to set-up system-wide things like printer and or graphics-drivers. You can do this via YaST.

For multimedia make sure you add the Packman repository, via YaST > Repositories > Add > Community Repositories > Packman. It holds packages like libxine1 which you need to update in order to play mp3 files. See opensuse-community.org/Multimedia for details.

Further articles on how to set-up your printer and other hardware can be found in the HOWTOs-section of this wiki.

See also

Links to other openSUSE sites

External links