Abstracted instance configuration.

We need to use instance information in the backup functions, so they needed to
be abstracted.
Added backup and restore tasks.