Best way is to use the built in backup utility as suggested.
If you can get your hands on an external USB hard drive which is 32gig or less, connect it to your PC and format it as FAT32 - then you can plug it into the PS3 and back up onto that. Once you fit the new drive you use the backup utility to restore from the USB drive.
I did this before I had to format the PS3 drive and partition it to install Linux - works a treat. Keeps all your downloaded games, media, settings, saved games, etc...