I know I have to burn the OS X on a CD and then install it. But how do
I move all my folders to the SSD?
You should use an external hard drive for that. When you install Mountain Lion on an SSD where you just placed your files, but no operating system, it'll have to overwrite everything on it to create the appropriate partitions and the GUID partition table.
If you aren't already creating Time Machine backups of your Mac, now is the best time to start.
Or, you could exchange the hard drives, install Mountain Lion on the SSD, and use an enclosure for the old hard drive, then pull the folders from there.
What folders should I move to the SSD? (besides my personal documents)
It depends on what you want to keep, but I suggest backing up your personal home folder
/Users/your-username, which includes all your documents and even settings. I wouldn't however recommend copying it entirely to the SSD. Rather copy what you know you'll need, and don't overwrite it.
Will I have to reinstall all my apps or will I be able to move them
from the old HDD?
You can move applications from the old HDD to the new one, but this will not work for all. There are some applications that install additional files to other folders than
/Applications—mostly these that don't come as an
.app, but install with a
.pkg file and guide you through the installation. Programs from Adobe or Microsoft Office are good examples of that, but there are countless others.
It's safest to reinstall all apps.
What about data of the apps? Will it be saved? (Chrome saved tabs,
Most applications store your data in
/Users/your-username/Library/Application Support or
/Users/your-username/Library/Preferences, so if you copy that folder as well as the applications themselves, e.g. Chrome, this should work.
There are, however, many exceptions to that. Adobe and Microsoft use your
~/Documents folder for storing data, which is a no-go in terms of OS X app development. It'd be impossible to list all possible preference locations for all apps though. You'll have to experiment what you can carry across from
Can't I move the apps and the Library folder to the new SSD instead of
reinstalling all the apps?
You could try that in a first instance, but I wouldn't be surprised if not everything worked correctly.
Should I do the clone before or after I upgrade to Mountain Lion?
It doesn't really matter from a technical perspective. The upgrade will be a little bit faster on an SSD, obviously.
Can I do a selective clone?
It depends on what application you're using to clone, but apps like Carbon Copy Cloner allow you to leave out folders you don't want to move.
Will all the system files be replaced? Because I think I kind of
messed up something there (MacPorts, Homebrew, Ruby etc.)... If not,
can I do something like "clean install" to the system?
MacPorts and Homebrew sit in directories (
/usr/local respectively) that aren't used on OS X by default, so it won't touch those.
The system Ruby version will probably be overwritten to a newer one. Custom versions or tools like RVM or rbenv are kept as-is.
Will the data of the apps be saved? (Chrome tabs, Todo lists etc.)
During an upgrade, this data should not be deleted. OS X generally doesn't delete any of your data during an upgrade or re-install unless you specifically erase the volume through Disk Utility. They've made sure you can't just lose everything by accident.
Still, the most important thing is: Before upgrading, make a backup. Always make a backup.