How can I backup and restore Wi-Fi profiles in Lion?

I want to reinstall my Macbook, but i do not want to loose all my saved WPA/WEP Wi-Fi profiles.

Is there a way to back them up and restore them after the reinstall?


If you backup your keychain as well as the file /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist and restore them on a new installed Lion, you won't lose them.

Another way would be to use the Migration Assistant on a Time Machine Backup of your old system, but this would restore ALL your system settings. That's probably not what you want, otherwise you wouldn't consider reinstalling.