I've started working on an existing app and the only copy of the code is in SalesForce. How do I back this up (export it) such that I can rollback to this original code if I make a mess?
There are a few options to backup or add version control to your Salesforce configuration or Apex code.
Only edit code or make configuration changes in a Sandbox (Setup -> Administration Setup -> Data Management -> Sandbox) or Developer Edition. This keeps your changes separate from your production instance in case something goes wrong, and if the Sandbox gets too messed up, you can always refresh it from production and start clean (losing all previous work).
You can use Subversion through the Force.com Eclipse IDE for version control (for code or object configuration). Check out this answer for details on how to set it up.
Another option is to create multiple Sandboxes, if your Salesforce edition allows it, as "snapshots" of your instance. However, Sandboxes do expire (after 30 days of being inactive).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With