This commit adds incremental backup support. Snapshotting from the server
now creates a full backup if one does not exist and creates numbered
incremental backups after that.
For example, if you ran:
$ influxd backup /tmp/snapshot
Then you'll see a full snapshot in /tmp/snapshot. If you run the same
command again then an incremental snapshot will be created at
/tmp/snapshot.0. Running it again will create /tmp/snapshot.1.
This commit adds the "influxd restore" command to the CLI. This allows
a snapshot that has been produced by "influxd backup" to be restored
to a config location and the broker and raft directories will be
bootstrapped based on the state of the snapshot.
This commit adds the backup command to the influxd binary as well as
implements a SnapshotWriter in the influxdb package.
By default the snapshot handler binds to 127.0.0.1 so it cannot be
accessed outside of the local machine.