All account data (except for documents) can be exported in CSV or XML format by navigating to Options >> Settings & Defaults >> Export Data.
Each major section of your account data is available for export.
Documents have to be manually backed up one at a time and there is not a way to bulk export documents at this time.
In addition to account data, all of the reports can also be exported to a spreadsheet program:
If you do not need to globally export all data running a report and exporting may be more helpful. The Summary report is often used for this purpose because it can be filtered by date range, person, project, client, etc.