August 2016
Beginner to intermediate
665 pages
14h 11m
English
Since we're sending our commands on the wire, so to speak, our backup process needs to listen on that wire and respond with any changes. Given that modifications will be sent via localhost, we should have minimal latency on both the network and the file side.
We'll also return some information as to what happened with the file, although at this point we're not doing much with that information. The code for this is as follows:
package main import ( "fmt" "net" "io" "os" "strconv" "encoding/json" ) var backupFolder = "mnt/backup/"
Note that we have a separate folder for backups, in this case, on a Windows machine. If we happen to accidentally use the same directory, we run the risk of infinitely duplicating and backing up files. ...
Read now
Unlock full access