There's lots of information on how to do backups. For starters, back up your data and back up your code. If you're using a VPS, see if you can take a snapshot as a backup.
Above all - I learned this the hard way - make sure you can restore from your backups. Try a full rebuild from your backups. You'll learn a lot.