data on the home partition safe during new install of 11.2?
openSUSE Forums > Install/Boot/Login
#1 Q data on the home partition safe during new install of 11.2?
Hi!
11.1 was my first linux experience (using linux as my main system) and it’ been a great one.
now it’s time for my first upgrade!
I would prefer a clean install of opensuse 11.2
I have three partitions on my HD. The OS partition, the data partition and the swap.
1)If i understand correctly, i should just format and install on the OS partition, whereas documents, pictures and program data (eg thunderbird emails or tomboy notes) are stored safe in the data partition, so i will find them there after installing 11.2, without the need to backup?
2) After installing 11.2 will i have to reinstall thunderbird, tomboy and any other third program i am using, or 11,2 will find them sitting in the data partition? (that is to say, only program data are preserved there, or the programs themselves?
A1. Always backup important files because Murphy and his whole ratbag family are waiting in the dark corners to get you!
A2. When I do an update, I ALWAYS back up my /home before hand, and keep a separate backup of my /etc directory, and a copy of my /boot/grub/menu.lst. I also check my /home backup to ensure it really DID backup. Including checking the hidden files/directories (such as .thunderbird) to ensure they were COMPLETELY copied. That is 100% essential. CHECK your BACKUP !!
I then do a clean install. My experience, since I have multiple partitions (Free Dos or WinXP, / , /home , swap ) of varying sizes that the openSUSE installer invariably guesses WRONG as to what I wish to do.
Hence BEFORE installing, I make a note exactly what each partition is allocated to do functionally. ie I type:
Code:
df -Th
and keep a record of that. If I do not mount all partitions under Linux, I also run with root permissions:
Code:
fdisk -l
again to keep a record.
Then when the openSUSE installer makes its proposal, I go to advanced and study carefully the WRONG recommendation it is giving, and then I tell the installer to rescan the drive, and I go and do a hand edit, telling the installer to put an EXT4 " / " on top of the old EXT " / " (and to reformat the EXT4 and mount it again as " / " ) . And I tell the openSUSE installer to mount the old EXT3 /home, and do NOT reformat but keep the /home as EXT3 format.
Also important is whether your old desktop was KDE3 or Gnome, and what you plan for your new desktop. In my case, since I moved from KDE3 to KDE4, I did not want to risk having a KDE4 desktop in the same /home/oldcpu directory as my KDE3, so when installing I created a new user “oldercpu” and did NOT create a user “oldcpu”.
After the install was complete, and I was logged in as oldercpu, I noted the old /home/oldcpu was still present, and I copied my .thunderbird directory from /home/oldcpu to /home/oldercpu, and I copied my .mozilla book marks from /home/oldcpu to /home/oldercpu and moved all my relevant folders etc …
I then install all necessary programs again. If you have a high speed connection, and are familiar with setting up repositories, and know how to keep your repositories at a clean and mean trim, this is a breeeze. (I recommend ONLY OSS, Non_OSS, Update and Packman repos).
Then I re-installed thunderbird (this time a beta of version 3) and it was able to read the version 2 thunderbird files (on /home/oldercpu with no problem, and it was all setup. Note I still had my old .thunderbird under /home/oldcpu directory.
Now if I was moving from KDE4 (in 11.1) to KDE4 (in 11.2) I would have kept the same username and it wouldhave been easier (no need to copy .config files nor any need to create a new user).
Now if I have trouble configuring, note I have my old /etc backed up, and I can open the config files in the /etc backup, and compare that to the config files in my new install, to help me figure out what is different and maybe get some ideas as to what is wrong.
As they say, different strokes for different folks, … but I tend to be VERY conservative. So I backed up first, and I did my installation as a new user name, and DID NOT recreate the old username account.
A3. There should be no data in your OS(/root) partition. A backup of your home partition would be a good idea (I confess I did not do that, but was lucky). You will have to reinstall the programms though.
My first linux distro was SuSe 10.3 and I updated both times by clean install (skipped 11.1) with no problems.
A4. Data on the /home partition should be safe as long as you don’t accidentally format it
But keep in mind that a lot of valuable data lives elsewhere. Data for MySQL is under /var/lib/mysql, other apps like mailman keep their stuff under /var as well. You may (or may not) have websites under /srv/www or some extensive DNS configurations under /etc and /var again. It depends a lot on what applications you are running but a good backup is a must. At least for /boot /srv /etc /var and /home. I keep /root as well, because that’s where my crontab files are.
R1. thanks for your answers.
So i should generally backup
/etc …just in case
/boot/grub/menu.lst …the same
/var/lib/mysql, …seems empty on my root folder. What should it contain?
/var extensive DNS configurations?i haven’t done any
/srv/www empty
Backing up my home partition at the moment…
Important programs with lots of data are firefox, thunderbird, tomboy, digikam, amarok as far as i can think, they should all have their data in the /home partition i think
#2 Q data on the home partition safe during new install of 11.2?
What is the philosophy behind it? Should they theoritically be preserved? Back in the windows days i spent a whole day each time i did a format, searching for various important program data either in each program’s folder, or in documents and settings or in AppData or in various other locations, and i always missed something.
I thought that the idea in linux was that all programs should store their data in the home partition and not in the OS, so that they should be fine during update? Or should i also search for data in the OS partition?
A1.
Should they theoritically be preserved?
yes. theoretically all things you have in /home will be untouched and safe…
however!
you do need to pay attention during the install because the script is supposed to ‘see’ the existing openSUSE install and as part of this step <http://en.opensuse.org/INSTALL_Local#Step_6:_Setting_up_your_disk>
offer to keep the existing home and use it and its user on the new install…
however! if you get confused and tell it to format your /home, it will…
or, if it gets confused and in the top part of that screen suggests that it should format three partitions, /swap, /root, and /home and you click “Next” it will do what it suggested and you accepted (and format /home)
therefore, the reason growbag rightly suggested a backup…
but, many folks don’t, and are lucky…some folks don’t and then come crying here that openSUSE destroyed all their photos, music etc etc etc…when we all know they pressed “Next” on that page and pressed “Install” on this page <http://en.opensuse.org/INSTALL_Local#Step_8:_Software_changes> which shows exactly what partitions will be created/formatted…
THEN they pressed “Install” on this page <http://en.opensuse.org/INSTALL_Local#Step_9:_Install_openSUSE.21>
after being warned that your hard disk will be modified according to the previous settings…
A2.
/var/lib/mysql, …seems empty on my root folder. What should it contain?
It would contain your database files. As it seems, you did not create any databases with mysql. I tried to give you some examples of applications storing data outside /home.
A3.
I thought that the idea in linux was that all programs should store their data in the home partition and not in the OS, so that they should be fine during update? Or should i also search for data in the OS partition?
It’s more complicated than that. There isn’t “one user partition and one OS partition”. On Linux there are various directories all of which could be made separate partitions. This flexibility is part of the Unix philosophy. However the /home and / separation is the recommended and most common for openSUSE. As others point out, you may have configuration information and other data elsewhere on the system and it’s your responsibility to ensure they are taken care of.
You should have a normal backup regime that covers /home anyway. I backup to a removable disk once a week and to a DVD also once a week. So my $HOME isn’t at risk for more than a few days. Also I have RAID.
A4.
/var/mysql and /srv/www and others do hold data that you want to keep. My preferred solution is to symlink these into /preserve/ROOT/var/mysql and /preserve/ROOT/srv/www, to let /preserve be a separate file system and leave /home part of the root (“/”) file system. Why? Because every new system has new desktop stuff that does not upgrade smoothly.
So, I keep my home directory stuff in /preserve, too. Then, a new install with new and better config files
do not misinterpret the bad old configury and do bad things. It’s a pain, but less so than finding my
browser not working because it tried and failed to reconfigure my config files.
Oh, do not forget to have spare partitions. Install to a spare and if all goes well, then make the old
installation the spare. So, you should have at least four partitions:
- swap
- known-good install
- test installation
- preserved data (that is backed up, too!)
A5.
The openSUSE installer has never suggested doing, or done, anything amiss to my /home partition when I have let it have its way.
The data most likely to be on / is mysql databases for which I always use mysqldump to make a backup to /home; then a single command to mysql on the new installation restores everything.
I do always backup everything beforehand anyway.
A6.
The openSUSE installer has never suggested doing, or done, anything amiss to my /home partition when I have let it have its way.
The data most likely to be on / is mysql databases for which I always use mysqldump to make a backup to /home; then a single command to mysql on the new installation restores everything.
I do always backup everything beforehand anyway.
Usually I would say your right until I installed upgrades to 3 systems. All were done the same way but hardware was slightly different between the systems. All three installs worked great except… one system decided it was going to replace my /home partition with a newly formated one. Thank g** for back-ups!
All of this was contributed by openSUSE members in the install forum and condensed by me