svnadmin dump /path/to/repository | bzip2 -9c > svn-backup.bz2
The compression step is optional, of course.
The primary advantage of this over the "copy the tree" method recommended in another answer is that the Subversion "dump" format is a better archival format than most of the database formats used by Subversion under the hood in its repository. (It's a speed vs. simplicity tradeoff.) You can read a dump file in a text editor, parse it easily, and — most important — import it into a different Subversion repository using a different database back-end.
Restore the above file with:
bzip2 -dc svn-backup.bz2 | svnadmin load /path/to/repository