Here's a script that grabs a backup of pfSense configuration:
Windows version (requires wget)
*nix version (also requires wget)

Remember, pfSense can automatically restore configuration backup during install.