Create Backup Image of OS X Lion Before Upgrading to Mavericks
Before you start, I would strongly recommend MacWorld's excellent series of articles on upgrading to Mavericks.

For taking a copy of your internal disk Carbon Copy Cloner is the best way to go. SuperDuper! is good too, but it's not compatible with Mavericks which might cause you problems if you want to back out.  You can use CCC to create a separate bootable external disk (or even an internal partition).  Try to use a USB 3 or FireWire disk as USB 2 is painfully slow to boot from.

Once you have taken your copy, upgrade your internal disk to Mavericks.  If you don't like Mavericks you can undo your work by booting off your external disk and from there overwrite your internal disk using CCC.