I have mentioned this before, but actually got to setting it up on my study rack today finally.
Because I have quite a bit of equipment now, and mixed Junos and Cisco, It's helpful now to have an archive of saved configs as I study.
There are several references I used for this:
And Daniel Patrick's RouterWrangler.com Blog:
it's a simple config:
The $h is a variable that will save the config with a name including the current hostname:
This pic is an example of one config saved without the $h variable, and one with.
This is basic setup. There are other options that you can set for the naming, and scheduled archiving.