You need an USB External HDD drive to backup your data.
1. Plug the External HDD in the PS3.
2. Choose Settings > System Settings > Backup Utility > Back Up.
3. Wait.
4. Change the PS3 HDD.
4. Plug the External HDD again in the PS3.
5. Choose Settings > System Settings > Backup Utility > Restore.
5. Wait.
That's all.