Tag: Program Design Documents

  • ZFS Backup Tool Part 6

    Now that I can read and write a snapshot, how do I process a list of snapshots in a useful manner? First, let me define what I mean by a useful manner. I want the tool to keep a copy of all automatic snapshot on the source ZFS tree on the destination tree as an […]

  • ZFS Backup Tool Part 5

    Now that I can read a list of snapshots, I need to read a snapshot and transfer it to the destination. The three functions that allow me to do that are exec.StdinPipe(), exec.StdoutPipe(), and io.CopyBuffer(). The process consists of the following steps: Create an exec.Cmd representing the zfs send command Use exec.StdoutPipe() to connect a […]

  • ZFS Backup Tool Part 4

    Welcome to Part 4 of my series on my tool for backing up ZFS Snapshots to an external device. In this part, I am discussing how to exec a command and read its output. To deal with external commands in Go, you use the os/exec package. The primary pieces of the package that I need […]

  • ZFS Backup Tool Part 3

    Today’s project is parsing a snapshot into a custom datatype that gives us more accessible options to manipulate snapshots. First, the regular expression strings need to be moved into separate files so I can reference them across other files. The essential parts of a snapshot are: the pool name the filesystem tree the Interval the […]

  • ZFS Backup Tool Part 2

    Recognizing a snapshot made by zfs-auto-snapshot. First, what does a list of these snapshots look like? I trimmed the previous list down a bit. So what is a regular expression that will match this? The first question is which regular expression library am I using? I am writing this tool in Go. Thus I will […]

  • ZFS Backup Tool Part 1

    I haven’t seen a lot of tools that are designed to backup ZFS snapshots to removable media. So, I am writing my own. I am going to document the process here. The basic loop for a backup tool is Read a list of snapshots on the source Read a list of snapshots on the destination […]